VMware Cloud Community
zenomorph
Contributor
Contributor

Force create new UUID for VM

Hi,

Our co. started using ESXi a few months ago and its been great, I understand that there isn't the template feature available in ESXi because its part of vCentre. So to get around this what we;ve done is build a default VM and duplicate its directory within the ESXi storage and then add as a new VM to get around it.

Recently we built a second ESXi and used the same approach and found that sometimes we don't get the GUI prompting if we want to create a new UUID and the result is we get VMs with the same UUID and MAC addresss.

Is there some way we can force when we add the new VM derived from duplicating a directory to prompt to ask if we want to create a new UUID for the VM such that we don't get duplicate UUID and MAC addresses. I've done some reading of the posts here and found there's a setting in the "vmx" file something like;

contain uuid.action "create" / "keep" but I can't seem to find that in the VM we created;

config.version = "8"

virtualHW.version = "4"

floppy0.present = "true"

nvram = "test.nvram"

deploymentPlatform = "windows"

virtualHW.productCompatibility = "hosted"

tools.upgrade.policy = "manual"

powerType.powerOff = "default"

powerType.powerOn = "default"

powerType.suspend = "default"

powerType.reset = "default"

displayName = "test"

extendedConfigFile = "test.vmxf"

numvcpus = "2"

scsi0.present = "true"

scsi0.sharedBus = "none"

scsi0.virtualDev = "lsilogic"

memsize = "2048"

scsi0:0.present = "true"

scsi0:0.fileName = "test.vmdk"

scsi0:0.deviceType = "scsi-hardDisk"

sched.scsi0:0.shares = "normal"

ide0:0.present = "true"

ide0:0.clientDevice = "true"

ide0:0.deviceType = "atapi-cdrom"

ide0:0.startConnected = "false"

floppy0.startConnected = "false"

floppy0.fileName = "/dev/fd0"

floppy0.clientDevice = "true"

ethernet0.present = "true"

ethernet0.networkName = "QualysGuard"

ethernet0.addressType = "vpx"

guestOSAltName = "Microsoft Windows Server 2003, Standard Edition (32-bit)"

guestOS = "winNetStandard"

annotation = "- Win2K3 system template updated on 10 Feb 2009|0A- C: 5GB volume|0A- Standard Windows Hardening|0A- McAfee engine 5300|0A- NBU 6.0MP4 backup client (disabled)|0A|0A^ ET QualysGuard vLan|0A ip 10.150.8.242 |0A ms 255.255.255.248|0A gw 10.150.8.241|0A"

uuid.bios = "50 39 8d 60 69 ca bd a7-23 4d c4 70 19 d6 0c 43"

log.fileName = "vmware.log"

snapshot.action = "keep"

sched.cpu.min = "0"

sched.cpu.units = "mhz"

sched.cpu.shares = "normal"

sched.mem.minsize = "0"

sched.mem.shares = "normal"

toolScripts.afterPowerOn = "true"

toolScripts.afterResume = "true"

toolScripts.beforeSuspend = "true"

toolScripts.beforePowerOff = "true"

scsi0:0.redo = ""

scsi0:1.redo = ""

scsi0:3.redo = ""

vmware.tools.requiredversion = "7299"

is there any work around for this, can someone please advise.

many thanks, much appreciated..................

0 Kudos
4 Replies
lamw
Community Manager
Community Manager

It's an advanced feature that's not really documented other than at: You'll need to manually add it to the .vmx file.

If you're using ESXi 3.5u2/u3, you can take a look at this script to help you create full clones: http://communities.vmware.com/docs/DOC-9321 (the script will automatically generate a new UUID)

If you're using the latest ESXi 3.5u4, this script will not work due to a recent fix, you'll need at least Foundation license to be able to make use of the VI API

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
zenomorph
Contributor
Contributor

William,

Thanks for the reply. I had a look at the website and found the setting

uuid.action = "create"

however how do I use the parameter setting if our vmx file looks like below:

config.version = "8"

virtualHW.version = "4"

floppy0.present = "true"

nvram = "test.nvram"

deploymentPlatform = "windows"

virtualHW.productCompatibility = "hosted"

tools.upgrade.policy = "manual"

powerType.powerOff = "default"

powerType.powerOn = "default"

powerType.suspend = "default"

powerType.reset = "default"

displayName = "test"

extendedConfigFile = "test.vmxf"

numvcpus = "2"

scsi0.present = "true"

scsi0.sharedBus = "none"

scsi0.virtualDev = "lsilogic"

memsize = "2048"

scsi0:0.present = "true"

scsi0:0.fileName = "test.vmdk"

scsi0:0.deviceType = "scsi-hardDisk"

sched.scsi0:0.shares = "normal"

ide0:0.present = "true"

ide0:0.clientDevice = "true"

ide0:0.deviceType = "atapi-cdrom"

ide0:0.startConnected = "false"

floppy0.startConnected = "false"

floppy0.fileName = "/dev/fd0"

floppy0.clientDevice = "true"

ethernet0.present = "true"

ethernet0.networkName = "QualysGuard"

ethernet0.addressType = "vpx"

guestOSAltName = "Microsoft Windows Server 2003, Standard Edition (32-bit)"

guestOS = "winNetStandard"

annotation = "- Win2K3 system template updated on 10 Feb 2009|0A- C:

5GB volume|0A- Standard Windows Hardening|0A- McAfee engine 5300|0A-

NBU 6.0MP4 backup client (disabled)|0A|0A^ ET QualysGuard vLan|0A ip

10.150.8.242 |0A ms 255.255.255.248|0A gw 10.150.8.241|0A"

uuid.bios = "50 39 8d 60 69 ca bd a7-23 4d c4 70 19 d6 0c 43"

log.fileName = "vmware.log"

snapshot.action = "keep"

sched.cpu.min = "0"

sched.cpu.units = "mhz"

sched.cpu.shares = "normal"

sched.mem.minsize = "0"

sched.mem.shares = "normal"

toolScripts.afterPowerOn = "true"

toolScripts.afterResume = "true"

toolScripts.beforeSuspend = "true"

toolScripts.beforePowerOff = "true"

scsi0:0.redo = ""

scsi0:1.redo = ""

scsi0:3.redo = ""

vmware.tools.requiredversion = "7299"

I tried just sticking the command in above

uuid.action = "create"

uuid.bios = "50 39 8d 60 69 ca bd a7-23 4d c4 70 19 d6 0c 43"

and then added the VM but nothing seemed to happen am I doing something wrong?

Can you please advise, many thanks cheers.............

0 Kudos
athlon_crazy
Virtuoso
Virtuoso

Just want to make you clear :

"The UUID is based on the physical computer's identifier and the path to

the virtual machine's configuration file. This UUID is generated when

*you power on or reset the virtual machine. As long as you do not move

or copy the virtual machine to another location, the UUID remains

constant."

So,since you duplicated the VM to the same datastore & the path to the VMs configuration file didn't change, propbably new UUID wont get generated.

2. uuid.action = "create" parameter will only happen when the new UUID need to be generated.

What I did was, put the base VM on separate datastore, copy and duplicate it to another datastore & power on the VM. Since you match the rule (Move

or copy the virtual machine to another location) hence, the new UUID need to be generated.

VMware newbie..

Zen Systems Sdn Bhd

www.no-x.org

http://www.no-x.org
zenomorph
Contributor
Contributor

Thanks guys I'll try it out.

0 Kudos