vm-create-from-snapshot

Usage

avcli vm-create --vm-snapshot-oid oid [--name name] [--cpu number] [--memory memory] [--availability level] [--interfaces networks] [--storage-group group] [--volumes volumes] [--volume-prefix prefix] [--no-auto-start]

Description

The vm-create-from-snapshot command creates a new VM from a VM snapshot.

Options

--vm-snapshot-oid oid The vm snapshot OID from which to create the VM.
--namename

The name of the VM to create.

--cpu number The number of virtual CPUs to assign to the VM.
--memory memory The amount of memory, in megabytes, to assign to the VM.
--availability level The availability level, high availability (ha) or fault tolerant (ft).
--interfaces networks The list of networks to attach to the VM. Specify a network only once. The attached network must not be private.
--storage-group group The storage group from which to carve the VM volumes. If you do not specify this value, the storage group with the most free space is automatically selected. (If the storage group is configured with 4 kB sectors, ensure that the guest OS supports the 4 kB sector size.
--volumes volumes Restrict the included volumes to those specified; otherwise, all volumes will be created. Specify volumes by configuration name or ID, boot volume first.
--volume-prefix prefix Adds the specified prefix to the beginning of the newly imported volume names to prevent conflicts with existing volumes on the system. For example, if a source volume is ocean_boot, and you specify --volume-prefix new, the imported volume would be new-ocean_boot.

--no-auto-start

If set, the VM is not started after creation has finished.

Examples

$ avcli vm-create-from-snapshot --vm-snapshot-oid vmsnapshot:o41963 --name vm001
$ avcli vm-create-from-snapshot --vm-snapshot-oid vmsnapshot:o41963 --name vm001 --availability ha --interfaces network0 --volumes centos-boot centos-data --volume-prefix minimal
$ avcli vm-create-from-snapshot --vm-snapshot-oid vmsnapshot:o41963 --name vm001 --availability ha --interfaces network0 net_143 --storage-group initial-group --volumes centos-boot centos-data --volume-prefix minimal --no-auto-start