vmware / vmware/pyvmomi

VM Migration

Open
#271 8 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 seeing the below issue when trying to do vm migration from one node to another one.
Always it is throwing the below error, any body have a clue?

vm_relocate_spec = vim.vm.RelocateSpec()
vm_relocate_spec.host = destination_host
vm_relocate_spec.pool = resource_pool
datastores = destination_host.datastore
print datastores
#Assuming Migrating between local datastores
for datastore in datastores:
    print datastore.summary.type
    if datastore.summary.type == 'VMFS':
        vm_relocate_spec.datastore = datastore
        #dump(datastore)
        break
dump(vm_relocate_spec)
task = vm.Relocate(spec=vm_relocate_spec)

# Wait for Migrate to complete
wait_for_task(task, si)

except vmodl.MethodFault, e:
print "Caught vmodl fault: %s" % e
return 1

<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>
Caught vmodl fault: (vmodl.fault.InvalidArgument) {
dynamicType = ,
dynamicProperty = (vmodl.DynamicProperty) [],
msg = 'A specified parameter was not correct. \n',
faultCause = ,
faultMessage = (vmodl.LocalizableMessage) [],
invalidProperty =
}
<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>

<<<<<<<<<>>>>>>>
obj.str = dynamicType = ,
dynamicProperty = (vmodl.DynamicProperty) [],
datastore = 'vim.Datastore:datastore-37',
diskMoveType = ,
pool = 'vim.ResourcePool:resgroup-30',
host = 'vim.HostSystem:host-36',
disk = (vim.vm.RelocateSpec.DiskLocator) [],
transform = ,
deviceChange = (vim.vm.device.VirtualDeviceSpec) [],
profile = (vim.vm.ProfileSpec) []
}>

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 by reproducing the migration using the shown vim.vm.RelocateSpec setup and the vm.Relocate call, then inspect the vmodl.InvalidArgument details and the populated relocation fields. The issue does not name a repository file or test; done would require identifying the invalid parameter and documenting or correcting the migration usage.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.