Hi All,
I got a problem here. So, request any help from you guys .
I wrote a powershell script with PowerCLI, to scheduled clone some VMs in vCenter 4.1.0.
Problem:
There are 2 ESX servers, ESX A has two vNetwork Distributed Switchs, another ESX B has one switch. The name for the 3 switchs is different.
I used below command and parameters to backup VM. But, due to the switch is different, it prompts "A specified parameter was not correct. spec.deviceChange.device.port.switchUuid".
New-VM -Name "VM_Backup" -VM (Get-VM "VM") -VMHost "ESX B" -Datastore "Store 1"
Temp Soluation:
I final use the vSphere GUI to complete the backup job, which i need to check "edit virtual hareware (experimental)", then edit the networkname to switch name on ESX B. click ok, then works.
VMware KB: Cloning a virtual machine connected to a virtual distributed switch fails
Question:
My question is, at first place i want to use the script i wrote to do the job, cause i can customize many things. So, since to use "edit virtual hardware (experimental)" can continue the copying, i just wondering how could i use PowerCLI to do this?
thanks for your time and any help.
Larry.