storadm
- manages virtual machine storage
storadm
[-h]
storadm list
storadm create
[-v] name
storadm clone
[-v] name template version
storadm export
[-v] name
storadm hide
[-v] name
The storadm
command allows you to manage virtual machine storage all in
one place. It creates, clones and destroys storage spaces. And if you want
to separate storage machines from the hosts that run virtual machines (a SAN
style setup), you can - storadm
provides two subcommands for this setup.
Virtual machine storage is based on ZFS and uses the following dataset layout:
vm_name # base dataset
vm_name/disk1 # first block device (zvol)
These subcommands are defined:
storadm list
Lists all virtual machine storage spaces on this machine. For all storage spaces that have an iSCSI export, it lists the corresponding IQN.
storadm create
[-v] nameCreates a new storage space. name should be a full zfs path to where
you want to create the storage space, something like pool1/foo
.
-v
storadm clone
[-v] name template versionClones a new storage space from a template. template refers to a storage space that has a recursive snapshot called version.
-v
storadm export
[-v] nameCreates an iSCSI export for the storage space. All disks of the storage space are mapped to LUNs in the iSCSI target.
-v
storadm hide
[-v] nameHides a storage space by removing the previously created iSCSI export from the system.
-v
The following command creates an empty virtual machine storage space with one disk drive of 10GB.
# storadm create pool1/foo 10G
The following command lists all available storage spaces.
# storadm list
pool1/foo
The following commands snapshot an existing storage space called
pool1/template
with the version tag 0.1.0
. A clone is then created based
on that version of pool1/template
.
# zfs snapshot -r pool1/template@0.1.0
# storadm clone my_vm pool1/template 0.1.0
Only the unknown.
qemu-toolkit-overview(7), qemu-toolkit-install(7), qemu-toolkit-configuration(7), storadm(1), vmadm(1), README(7)
Copyright (c) 2012 Kaspar Schiess.
This tool is under a MIT license. Please see the LICENSE file in the original source.