Resize vCenter disks when the VM is in Poweroff
|Assignee:||Miguel Ángel Álvarez Cabrerizo||% Done:|
|Target version:||Release 5.4|
When a VM is in poweroff state it should be possible to resize (increase) disks.
#1 Updated by Miguel Ángel Álvarez Cabrerizo about 4 years ago
- % Done changed from 0 to 90
A tm/resize action has been added to vCenter driver. When a disk is going to be resized the tm/resize will check if the disk has been added to the VM, if not the VM will be added and then a resize will be performed. If the disk has been added to the VM previously only the resize operation is performed. The resize action is done in a ReconfigureVM_Task where the disk gets a new capacity.
The resize action have the following limitations:
- It cannot be used unless the VM is in poweroff. vCenter complains about it can't lock the file associated to virtual hard disk as it's in use.
- It cannot be used if the VM has snapshots. Maybe in vCenter 6.5 we can avoid this limitation.
The following actions have been tested:
- Resize unmanaged disks either the disks are in a StorageDRS or in a regular datastore.
- Resize a volatile disk either if the volatile disk is created in a datastore or in a StorageDRS.
- Resize a persistent disk.
- Resize a non-persistent disk that resides in a regular datastore (non-persistent disks are not supported with StorageDRS).
#2 Updated by Miguel Ángel Álvarez Cabrerizo about 4 years ago
- Status changed from Pending to Closed
- % Done changed from 90 to 100
A disk can be resized if the VM is powered on using the ReconfigVM_Task instead of ExtendVirtualDisk_Task but the VM won't recognize the new space until the VM is rebooted hence it's best to allow resize from poweroff.
The following tests have been added:
Disk Resize when VM in poweroff
ssh and context
create persistent datablock
create non-persistent datablock
attach volatile, persistent and non-persistent disks
resize persistent disk
resize non-persistent disk
resize volatile disk
check number of disks in VM
check persistent disk size
check non-persistent disk size
check volatile disk size
terminate vm and delete images
And information about the limitations on this resize operation has been included in docs.