7.14 create Command
Use the --create
command to create a disk image.
Syntax
vm_maker --create --disk-image image_name [ --size size ] [ --filesystem filesystem_type ]
[ --from-zip zipfile ] [ --attach --domain guest_name [ --no-reflink ]]
Options
-
--disk-image
: Create a disk image using the specified image name:-
If you specify a disk image name that is not a fully-qualified file name (for example,
shared.img
), a shared disk image file is created in/EXAVMIMAGES
on the KVM host. In this case, the disk image file can be attached to any guest, either by adding the--attach
option or by using a separatevm_maker --attach
command. -
If you specify a fully-qualified disk image name in a guest-specific directory (for example,
/EXAVMIMAGES/GuestImages/guest01.example.com/pv2_vgexadb.img
), a guest-specific disk image file is created in the specified location. In this case, the disk image file can only be attached to the guest identified in the file path (for example,guest01.example.com
).
-
--size
: Optionally specifies the size of the image. If not specified, the default size is 50 GB.--filesystem
: Specifies the filesystem type to use for the disk image. Allowed filesystem types are:ext3
,ext4
, andxfs
. The default isxfs
.--from-zip
: Indicates the disk image should be created from the specified ZIP file.-
--attach
: Use this option to directly attach the disk image to a guest after creation. If you specify this option, then you must also specify the--domain
option.-
If you are attaching a shared disk image (created in
/EXAVMIMAGES
), then a copy of the shared disk image file is created in the guest-specific directory at/EXAVMIMAGES/GuestImages/guest_name
. By default, a reflink copy is created in the guest-specific directory, which references the shared image file in/EXAVMIMAGES
. To attach a shared disk image file without using a reflink, add the--no-reflink
option. In this case, the new disk image in the guest-specific directory is a discrete copy of the image file in/EXAVMIMAGES
. -
No additional copy occurs when you attach a non-shared image file that resides in a guest-specific directory.
-
--domain
: Use this option to specify which guest to attach the disk image to after creation.--no-reflink
: Use this option to create a discrete copy in the guest-specific image directory of a shared image file (not a reflink). This option is ignored for non-shared image files.
Usage Notes
- A KVM guest can have a maximum of 112 disks attached.
Parent topic: VM_MAKER Command Reference