Feature #5207

Resize vCenter disks when the VM is in Poweroff

Added by Miguel Ángel Álvarez Cabrerizo about 4 years ago. Updated about 4 years ago.

Status:ClosedStart date:06/28/2017
Priority:HighDue date:
Assignee:Miguel Ángel Álvarez Cabrerizo% Done:

100%

Category:vCenter
Target version:Release 5.4
Resolution:fixed Pull request:

Description

When a VM is in poweroff state it should be possible to resize (increase) disks.

Associated revisions

Revision 00b7d860
Added by Miguel Ángel Álvarez Cabrerizo about 4 years ago

F #5207: vCenter disks can be resized when VM in poweroff

Revision c28157cd
Added by Abel Coronado about 4 years ago

F #5207: Added disk_resize action in yamls (#372)

  • Added disk_resize action in yamls
  • Solved bug resize_disk for vCenter VM

History

#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
deploys
ssh and context
poweroff
create persistent datablock
create non-persistent datablock
attach volatile, persistent and non-persistent disks
resize persistent disk
resize non-persistent disk
resize volatile disk
resume
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.

#3 Updated by Miguel Ángel Álvarez Cabrerizo about 4 years ago

  • Resolution set to fixed

Also available in: Atom PDF