Hi,
I am looking for help to change the configuration after moving the VM from one Esx to other. I am also not clear what all I need to change.
If I dont change the config and try to power on, Vcenter is showing msg asking whether we have moved or copied. We can proceed selecting 'Moved' and I believe Vcenter is changing the config. I want to achieve the same thing using VI sdk. Great if someone can give me some pointers or point me to any code for reference.
Thanks,
Prasad
Hi vpnprasad,
Welcome to the communities.
If you need exact copy of source system then please select copy option and then change IP & host name .
If you are moving completely then select move option and change IP if require and as per sub net that network using.
How did you move the files?? Copy paste the config files of the VM??? if that is the case,
Each virtual machine is automatically assigned a UUID and associated PID also will be created while creation.
when copy or move the file to other ESX manually then it need to be registerd in the ESX. Cold or Hot migration helps you in soft movement instead of copied files manually.
Thanks for the replies...the files are replicated through mirroring across FC LUNs. Here is the usecase. There are two sites...VMs will be up on Esx1 at site1...when user initiates failover, we need to bring the VMs down on Esx1, and bring them up on a diff Esx2. Now when I register the VMs to Esx2, and try to power on, VC is showing the msg "Copied/Moved". I want to suppress this programmitically in our client code.
I manually edited the vmx file and put an entry "uuid.action = create" which resulted in creating new uuid and suppressed this msg. I am just wondering if there is any API to do this...or I should do this only by opening the file and updating the content.
Also as this is move of VM from one Esx to other, what all config changes we need to take care.
Thanks,
Prasad
I have set the config.locationId to blank which made the locationId to get it generated during the poweron. This suppressed the Moved/Copied msg.
Code snippet: