vmware / pyvmomi-community-samples

A place for community contributed samples for the pyVmomi library.
Apache License 2.0
1.02k stars 923 forks source link

I created a virtual machine "test0408" through a template of vmware "centos7.4", but the error "A specified parameter was not correct: spec.location.pool', #698

Open z287415696 opened 2 years ago

z287415696 commented 2 years ago

Describe the bug

amples> python .\clone_vm.py -s "10.108.1.1" -u "administrator@vsphere.local" -p "xx" --template "centos7.4" -v "test0408" -nossl --datacenter-name 'NSKF-BACKUPDATA' cloning VM... there was an error (vmodl.fault.InvalidArgument) { dynamicType = , dynamicProperty = (vmodl.DynamicProperty) [], msg = 'A specified parameter was not correct: spec.location.pool', faultCause = , faultMessage = (vmodl.LocalizableMessage) [], invalidProperty = 'spec.location.pool' } VM cloned. PS E:\svn2\work\pyvmomi-community-samples-master\pyvmomi-community-samples-master\samples>

Reproduction steps

amples> python .\clone_vm.py -s "10.108.1.1" -u "administrator@vsphere.local"  -p "xx" --template "centos7.4"  -v "test0408"  -nossl --datacenter-name 'NSKF-BACKUPDATA'
cloning VM...
there was an error
(vmodl.fault.InvalidArgument) {
   dynamicType = <unset>,
   dynamicProperty = (vmodl.DynamicProperty) [],
   msg = 'A specified parameter was not correct: spec.location.pool',
   faultCause = <unset>,
   faultMessage = (vmodl.LocalizableMessage) [],
   invalidProperty = 'spec.location.pool'
}
VM cloned.
PS E:\svn2\work\pyvmomi-community-samples-master\pyvmomi-community-samples-master\samples>

Expected behavior

amples> python .\clone_vm.py -s "10.108.1.1" -u "administrator@vsphere.local" -p "xx" --template "centos7.4" -v "test0408" -nossl --datacenter-name 'NSKF-BACKUPDATA' cloning VM... there was an error (vmodl.fault.InvalidArgument) { dynamicType = , dynamicProperty = (vmodl.DynamicProperty) [], msg = 'A specified parameter was not correct: spec.location.pool', faultCause = , faultMessage = (vmodl.LocalizableMessage) [], invalidProperty = 'spec.location.pool' } VM cloned. PS E:\svn2\work\pyvmomi-community-samples-master\pyvmomi-community-samples-master\samples>

Additional context

No response