pyvmomi-community-samples
pyvmomi-community-samples copied to clipboard
Failed to clone vm to Datacenter_B from a template in Datacenter_A
./clone_vm.py -s 10.113.216.254 -u [email protected] -p Abcd@1234 -v RHEL7.7_Clone1_poolB --template RHEL7.7 --datacenter-name DC_B --datastore-name "datastore1\ (1)" --resource-pool poolB
cloning VM... there was an error
@pietervogelaar
BTW, The datastore name in HostA is same as HostB -- they both renamed as "datastore1 (1)" when add HostA and HostB into VCenter different DataCenter (say, DC_A and DC_B).
e.g. I have a template which is stored in a poolA (a pool created on Host A) in datacenter DC_A, I want to clone a cloneVM in poolB (a pool created on HostB) in datacenter DC_B.
VCenter | DC_A | |-HostA | |-poolA | |-RHEL7.7 (template) | DC_B |-HostB |-poolB |-RHEL7.7-Clone1-poolB (I want to create a cloneVM here)
The tool works well when the template and cloneVM are in the same DC, but if I have created host/pool in different DCs, it would fail.
The clone operation will be OK if do this in Web GUI.