You are here: Supporting Documents > everRun Command Line Interface Reference > AVCLI Command Descriptions > vm-create

vm-create

Usage

avcli vm-create --name name --cpu number --memory memory --cdrom cd-name | --kickstart template [--interfaces networks] [--disabled-interfaces networks] [--storage-group group] --volumes volumes [--wait]

Description

The vm-create command creates a new VM.

Options

--name name

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.
--cdrom cd-name The CD-ROM from which you initially boot the VM. You cannot specify this option with --kickstart.
--kickstart template The kickstart template to use when booting the VM. You cannot specify this option with --cdrom.
--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 to use to carve VM volumes from. If you do not specify this value, the storage group with the most free space is automatically selected.
--volumes volumes

List of volumes to attach to this VM. A volume is made up of four components, separated by commas:

  • Size of the volume; required.
    By default, the volume size is specified in megabytes, but you can use standard qualifiers such as KB, MB, GB, and TB.
  • Storage-group name or ID from which to carve storage.
  • Volume name.
  • Volume disk image format (raw or qcow2).

--wait

-w

Wait for the command to complete.

Examples

Create a VM named vm001 with a CPU, 512 MB of memory, a 1,024 MB volume, and that is attached to network0.
$ avcli vm-create --name vm001 --cpu 1 --memory 512 --cdrom linux.iso \
--interfaces network0 --volumes 1024
Create a VM named vm001 with a CPU, 512 MB of memory, a 1,024 MB volume, and that is attached to network0. Then allocate storage from Pool-0001 for the volume.
$ avcli vm-create --name vm001 --cpu 1 --memory 512 --cdrom linux.iso \
--interfaces network0 --volumes 1024 \
--storage-group Pool-0001
Create a VM named vm001 with a CPU, 512 MB of memory, a 1,024 MB volume, and that is attached to network0. Then allocate storage from Pool-0001 for the volume. The volume is named vm001_vol0.
$ avcli vm-create --name vm001 --cpu 1 --memory 512 --cdrom linux.iso \
--interfaces network0 --volumes 1024,Pool-0001,vm001_vol0
Create a VM named vm001 with a CPU and 512 MB of memory, and that is attached to network0 and network1. Create two volumes, where the first is 10 GB and the second is 50 GB. Allocate storage for these volumes from Pool-0001 and Pool-0002, respectively.
$ avcli vm-create --name vm001 --cpu 1 --memory 512 --cdrom linux.iso \
--interfaces network0 network1 \
--volumes 10GB,Pool-0001 50GB,Pool-0002
Create a VM based on a kickstart template.
$ avcli vm-create --name vm001 --cpu 1 --memory 512 --kickstart template:o81 \
--interfaces network0 --volumes 10GB
of