vmware / vmware/pyvmomi

Is it possible to relocate a parent disk?

Open
#725 0 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

I have a VM that I relocated using diskMoveType of 'createNewChildDiskBacking'. The result (as expected) is that the VMDKs remained on the source datastore and redo logs/delta disks were created on the destination datastore in the same directory as the vmx file.

Now I'm trying to move the base/parent disk to the destination datastore but have not been able to figure out how to do it. I tried using various diskMoveTypes but the relocate task completes immediately (with success) but doesn't actually move anything. I suspect this is happening because the child disk is already on the destination datastore so it doesn't think it needs to move anything but the parent disk remains on the source datastore.

I then tried a different approach of manually copying the parent disk to the destination datastore and then using a reconfigure VM task to change the backing info of the disk so that its parent points to the disk that I copied to the destination datastore. This also completes successfully but does not change the disk backing info.

I know if I power of the VM I can manually fix this up but I'm trying to do this without powering off the VM. Is it possible to achieve this?

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

No repository file or test is identified. Start with the vSphere API behavior for diskMoveType='createNewChildDiskBacking' and the reconfigure VM task, then determine whether an online parent-disk relocation is supported; document the supported API path or confirm that powering off is required.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.