VMware Cloud Community
EdSp
Enthusiast
Enthusiast

Adding capacity to Eager Zeroed disk makes it Lazy Zeroed?

Hi,

We are creating Thick, EagerZeroed virtual disks using createVirtualDiskFlatVer2ConfigSpec. After that we set "deviceConfigSpec.device.backing.eagerlyScrub = true" etc and run "vm.reconfigVM_Task( configSpec )".

If I display the value of disk property "disk.backing.eagerlyScrub" to true, which is what we expect.


We run a workflow in vRO that uses vm.reconfigVM_Task(spec) to change the disk capacity.

Increasing the capacity of a disk seems to change the value of eagerlyScrub, as after the change it shows up as Lazy Zeroed ?!

Displaying the property again after the capacity has been changed, shows it being null, resulting in Lazy Zeroed.

If I then try and set eagerlyScrub to true, to ensure it stays eager zeroed, it fails. From that point on, I can't change any disk info as the disk file is locked.

Are we doing something wrong or could this be a bug or ...?

Many thanks,

Ed

PS To change the capacity of a disk, we use the following steps:

<loop over vm.config.hardware.device to retrieve the disk object with all current information of the disk>

var spec = new VcVirtualMachineConfigSpec();

spec.changeVersion = vm.config.changeVersion;

spec.deviceChange = System.getModule("com.vmware.onyx").array(VcVirtualDeviceConfigSpec, 1);

spec.deviceChange[0] = new VcVirtualDeviceConfigSpec();

spec.deviceChange[0].operation = VcVirtualDeviceConfigSpecOperation.edit;

spec.deviceChange[0].device = new VcVirtualDisk();

spec.deviceChange[0].device.key = disk.key;

spec.deviceChange[0].device.deviceInfo = new VcDescription();

spec.deviceChange[0].device.deviceInfo.label = disk.deviceInfo.label;

spec.deviceChange[0].device.deviceInfo.summary = disk.deviceInfo.summary;

spec.deviceChange[0].device.backing = new VcVirtualDiskFlatVer2BackingInfo();

spec.deviceChange[0].device.backing.fileName = disk.backing.fileName;

spec.deviceChange[0].device.backing.diskMode = disk.backing.diskMode;

spec.deviceChange[0].device.backing.split = disk.backing.split;

spec.deviceChange[0].device.backing.writeThrough = disk.backing.writeThrough;

spec.deviceChange[0].device.backing.thinProvisioned = disk.backing.thinProvisioned;

spec.deviceChange[0].device.backing.uuid = disk.backing.uuid;

spec.deviceChange[0].device.backing.contentId = disk.backing.contentId;

spec.deviceChange[0].device.backing.digestEnabled = disk.backing.digestEnabled;

spec.deviceChange[0].device.backing.sharing = disk.backing.sharing;

//

spec.deviceChange[0].device.backing.eagerlyScrub = disk.backing.eagerlyScrub; // when true - set to eager zero policy

System.log("disk.backing.eagerlyScrub="+disk.backing.eagerlyScrub);

//

spec.deviceChange[0].device.controllerKey = disk.controllerKey;

spec.deviceChange[0].device.unitNumber = disk.unitNumber;

spec.deviceChange[0].device.capacityInKB = newSizeKB;

spec.deviceChange[0].device.shares = new VcSharesInfo();

spec.deviceChange[0].device.shares.shares = disk.shares.shares;

spec.deviceChange[0].device.shares.level = disk.shares.level;

spec.deviceChange[0].device.storageIOAllocation = new VcStorageIOAllocationInfo();

spec.deviceChange[0].device.storageIOAllocation.limit = disk.storageIOAllocation.limit;

spec.deviceChange[0].device.storageIOAllocation.shares = new VcSharesInfo();

spec.deviceChange[0].device.storageIOAllocation.shares.shares = disk.storageIOAllocation.shares.shares;

spec.deviceChange[0].device.storageIOAllocation.shares.level = disk.storageIOAllocation.shares.level;

System.log("Extending disk: " + dskFileName);

task = vm.reconfigVM_Task(spec);



Message was edited by: EdSp (added in first sentence that when creating disk we also use reconfigVM_Task)

0 Kudos
1 Reply
iiliev
VMware Employee
VMware Employee

Hi,

I think this is the expected behavior. Arguably, can be interpreted as a bug or a feature Smiley Happy

There are some discussions available online (eg. http://blogs.vmware.com/vsphere/2012/06/extending-an-eagerzeroedthick-disk.html ).

0 Kudos