VMware Cloud Community
vMarkusK1985
Expert
Expert
Jump to solution

Change uuid (bios.uuid) of a VM

Hi,

I tried to change the UUID this way:

var UUIDlog = vcVM.config.uuid;

System.log("UUID at the moment: " + UUIDlog);

System.log("UUID to set : " + UUIDnew);

vcVM.config.uuid = UUIDnew;

var UUIDcontrol = vcVM.config.uuid;

System.log("UUID after change: " + UUIDcontrol);

vCO shows the mo correct value but the VMX File isn’t updated.


[2015-01-07 17:05:48.923] [I] UUID at the moment: 564dc846-3c30-b95f-84fc-4d9e168ecd07

[2015-01-07 17:05:48.923] [I] UUID to set : 42286f25-0cfe-4a18-ffd4-79a682663297

[2015-01-07 17:05:48.923] [I] UUID after change: 42286f25-0cfe-4a18-ffd4-79a682663297


Does anybody know what’s wrong?

https://mycloudrevolution.com | https://twitter.com/vMarkus_K | https://github.com/vMarkusK
0 Kudos
1 Solution

Accepted Solutions
iiliev
VMware Employee
VMware Employee
Jump to solution

Use reconfigVM_Task() scripting method. Something like the following code:

var spec = new VcVirtualMachineConfigSpec();

spec.uuid = "..."; // place your new UUID value here

vm.reconfigVM_Task(spec);

View solution in original post

0 Kudos
1 Reply
iiliev
VMware Employee
VMware Employee
Jump to solution

Use reconfigVM_Task() scripting method. Something like the following code:

var spec = new VcVirtualMachineConfigSpec();

spec.uuid = "..."; // place your new UUID value here

vm.reconfigVM_Task(spec);

0 Kudos