vmware / vmware/pyvmomi

Increase capacity of disk of thick provisioned eager zeroed ends up with disk type thick provisioned lazy zeroed

Open
#648 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Python
Stars
2.3k
Forks
763
PR merge metrics
No merged PRs in 30d

Description

Hi all,
I am trying to extend a disk with reconfigure_vm of type thick provisioned eager zeroed but afterwards the disk type is always changed to thick provisioned lazy zeroed. Please see code snipped below:

    spec = vim.vm.ConfigSpec()
    disk_devices = get_disk_devices(vm)
    vdevice_spec = vim.vm.device.VirtualDeviceSpec()
    disk_spec = disk_devices[0]
    disk_spec.capacityInKB = 100 * 1024 * 1024
    vdevice_spec.device = disk_spec
    vdevice_spec.operation = vim.vm.device.VirtualDeviceSpec.Operation.edit
    spec.deviceChange = [vdevice_spec]
    self.reconfigure_vm(vm, spec)

Remark: The get_disk_device gets all disk devices from the vm_object. Only the first one in the list gets extended.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reconfigure_vm call and the vim.vm.device.VirtualDeviceSpec edit shown in the issue, then inspect how get_disk_devices supplies the disk object. Reproduce the capacity increase for a thick provisioned eager-zeroed disk and determine why the resulting type becomes lazy-zeroed. Done means the disk capacity increases without changing its provisioning type.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.