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

vm-reprovision

Usage

avcli vm-reprovision --name name [--cpu number] [--memory size] [--addVolumes volumes] [--deleteVolumes volumes] [--keepVolumes volumes] [--interfaces networks] [--disabled-interfaces networks]

Description

The vm-reprovision command reprovisions the specified VM.

Options

--name name

Specify the VM to reprovision. Reprovision only one VM at a time. Specify a VM either by name or ID.

--cpu number

The number of virtual CPUs. This defaults to the VM's current amount.

--memory size The size of memory, in megabytes. This defaults to the VM's current amount.
--addVolumes volumes

The 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).
--deleteVolumes volumes The list of volume(s) that are currently attached to the specified VM to be deleted. Specify a volume either by name or ID.
--keepVolumes volumes The list of volume(s) that are currently attached to the specified VM to be kept attached to the VM. If you specify a volume that is currently attached but not specified in this list, the volume is detached (not destroyed) from the VM. Specify a volume either by name or ID.
--interfacesnetworks The list of networks to attach to the VM. Specify a network only once. The attached network must not be private.
--disabled-interfaces networks A list of networks to attach to the VM, but which should not be enabled. Specify a network only once. The attached network must not be private.

Examples

$ avcli vm-reprovision --cpu 2 --name vm1
$ avcli vm-reprovision --cpu 2 --name vm:o100
$ avcli vm-reprovision --cpu 2 --memory 2048 --name vm:o100
Reprovision a VM named vm001 that has a CPU, 512 MB of memory, a 1,024 MB volume and is attached to network0, and then allocate storage from Pool-0001 for the volume. The volume is named vm001_vol0.
$ avcli vm-reprovision --cpu 1 --memory 512 --interfaces network0 \
--addVolumes 1024,Pool-0001,vm001_vol0 --name vm1
Reprovision VM vm1, and then delete the volumes volume:o411, data-vm1, and data-vm2 associated with it.
$ avcli vm-reprovision --deleteVolumes volume:o411 data-vm1 data-vm2 --name vm1
Reprovision VM vm1 with the new data volume data-1-7, delete volume volume:o1043, keep volumes volume:o1, volume:o2, volume:o4, and attach network interfaces sharednetwork:o129 and sharednetwork:o130.
$ avcli vm-reprovision --cpu 3 --memory 3359 --addVolume 2500,storagegroup:o54,data-1-7 --deleteVolumes volume:o1043 --keepVolumes volume:o1 volume:o2 volume:o4 --interfaces sharednetwork:o129 sharednetwork:o130 --name vm1
of