Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4257
  • Last Modified:

Chaning UUID on Boot drive

I have an issue where in my "greenness" I made a Windows server VM, and made copies all over the place.  this worked fine for a while, but now my backups are running into issues.  It's all because the DISK UUID's are the same on a few servers.  
Long story short, I can't use Sysprep to change them because if I do, I think I will lose a lot of data and/or settings.

so I am looking into other options.  one option was "diskpart" using the command "uniqueid disk=<NEWID>"  this would work, but since it's on a boot drive, it crashes and tells me that the drive is no longer accessible.

is there any other way to change the UUID of the boot drive?

thank you
  • 5
  • 3
2 Solutions
Which virtualization software product are you using, and how did you create the clones?

Which backup product are you using, and did you open a ticket with their support?
Duplicate file system UUIDs really should not be an issue with backing things up.

I would consider this to be a serious bug/defect in the backup software you have chosen, that the vendor ought to be willing to address by fixing their product.

The rule is:  Any one server/VM should never have multiple disks on the same VM with the same UUID.

BUT different servers/VMs/machines,  can definitely have disks/file systems with the same UUID as another machine, and it commonly occurs through cloning ----- although the VMware vCenter clone command,  or VM converter will generally  produce a new disk UUID for all disks during the cloning or conversion process.

 In VMware, you could also change the Virtual disk disk UUIDs by examining the proper VMDK descriptor file  with a text editor  and changing the UUID.

The disk UUID is distinct and different from  other GUIDs  inside  the virtual machine that identify a NTFS filesystem volume.

These should never be assumed to be unique across different systems either.  
Again,  if backup software is making these faulty assumptions ---  it could cause problems.

You can get around most of this  by using the VMware converter to make another copy of the VM.    When setting up the destination,  pick 'advanced',  and  change the volume size in some way, E.g.   create a VM with  each file system a little bit smaller or larger than the source originally had,  so the cloning mode switches from  Block/Image based  to  File-based cloning mode.
TrowbridgeHouseAuthor Commented:
To answer the questions.
1. Vmware 5.1 , and as stated I did not create clones, I just made copies and renamed them, so when I go into DISKPART and do a UNIQUEID DISK I get the same UUID on each of the servers .  In other words, I made the mistake.

2. Appassure, and since it backsup the same servers with the same UUID, its getting confused.  and their support clearly states from the error that I am getting that the UUID on several servers are the SAME!.

I do not know how to check the VMDK Descriptor file or even change it, can you supply me with info?  the GUID is not an issue here, just the UUID.

My problem is, these are live boxes, and was looking for a "quicker" fix.  Clone is not an option anymore , because I am afraid of loseing databases and files.
(1) If you do not have the ESXi shell or SSH service started,    browser to the Configuration > Security Profile  of the host the VM is running on,   open the service properties, find the SSH service, and start it.

Find the filename that is listed in the virtual machine's .VMX file, for  the SCSI devices, for example   for a virtual machine named SERVER1:

Or  just  browse the datastore in the vSphere client, select the virtual machine's directory -- and download the .vmx file to take a look at it offline.

[root@cnfdl ~]# ssh root@<ESXI SERVER IP>
The time and date of this login have been sent to the system logs.
VMware offers supported, powerful system administration tools.  Please
see www.vmware.com/go/sysadmintools for details.

The ESXi Shell can be disabled by an administrative user. See the
vSphere Security documentation for more information.

~ # cd /vmfs/volumes/mydatastorename/SERVER1
/vmfs/volumes/86601112-10058cf1/SERVER1 # grep fileName SERVER1.vmx
scsi0:0.fileName = "SERVER1.vmdk"
scsi0:1.fileName = "SERVER1_1.vmdk"
scsi0:2.fileName = "SERVER1_2.vmdk"
floppy0.fileName = "vmware-null-remote-floppy"
/vmfs/volumes/86601112-10058cf1/SERVER1 #

ASSUMING there are no snapshots for the virtual machine  (this doesnt work if there are any snapshots)

The result of the grep command are the 3 current  DESCRIPTOR files for the 3 virtual disks the VM has on virtual SCSI channel 0   ID numbers 0, 1, 2, respectively..   SERVER1.vmdk is the  descriptor file for a virtual disk.

In order to see and edit the descriptor file you need to download or view SERVER1.vmdk  which  will  contain  geometry information  and the filename of the raw disk file, and other information about the virtual disk,  including the UUID.   the db.uuid

While the VM is powered off.
vmkfstools -J setuuid  /path/to/descriptorfile.vmdk

Re-register the VM.
Power on.

You may need to consult the details of your specific OS,  if a  startup recovery is required after changing the disk UUID ----  some operating systems, may be configured to mount the root filesystem based on the UUID;  in that case,  you may need to use a boot CD image to get the system up, and then reconfigure system startup.

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

TrowbridgeHouseAuthor Commented:
that did not change the UUID inside of windows.
TrowbridgeHouseAuthor Commented:
BTW, this is the problem we are having.

Well... you said you want to change disk UUIDs.   The article you referenced is actually talking about guest OS signatures used to record drive letter assignments to disks.

This is a 32-bit Signature that is created when building the partition table,  NOT the disk UUID.   UUIDs are 128 bits.

For non-boot disks, just use diskpart to assign a new signature  using the UNIQUEID command.     Make sure to keep note of which disk drives have which drive letters, as drive letter assignments may get lost  after reboot.

Ensure you have a good verified backup before proceeding.

For the system boot disk:
Assuming DISK 0 is your bootdisk;  C:

1. Open a cmd prompt with admin privileges. (elevated)
2. Run the following: DISKPART
     UNIQUEID DISK ID=<random_disk_signature>
      e.g.  1234abcd

  3. Exit diskpart, remain within the command prompt

  4.  Enter the commands to rebuild BCD  using the new boot disk signature.
      bcdboot C:\windows /s C:
      bcdedit /set {DEFAULT.EN_US} device partition=c:

      bcdedit /set {DEFAULT.EN_US} osdevice partition=c:
      bcdedit /set {BOOTMGR.EN_US} device partition=c:

   5. Close command prompt
   6. Reboot
TrowbridgeHouseAuthor Commented:
I was not able to use exactly the commands that you gave me, BUT, with that info I was able to find some more info,  these are the exact steps that worked for me.  the BCDBOOT and BCDEDIT were still used as you can see

thank you

UNIQUEID DISK ID=<random_disk_signature>

exit DISKPART - !!!! DO NOT REBOOT !!!!

bcdboot C:\windows /s C:
bcdedit /set {default} device partition=c:
bcdedit /set {default} osdevice partition=c:
bcdedit /set {bootmgr} device partition=c:

TrowbridgeHouseAuthor Commented:
With the info given, I was able to research the issue further, and was able to resolve and change the UUID of the boot drive.

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now