Solved

Chaning UUID on Boot drive

Posted on 2014-03-06
8
3,272 Views
Last Modified: 2014-03-17
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
0
Comment
Question by:TrowbridgeHouse
  • 5
  • 3
8 Comments
 
LVL 23

Expert Comment

by:Mysidia
Comment Utility
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.
0
 

Author Comment

by:TrowbridgeHouse
Comment Utility
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.
0
 
LVL 23

Expert Comment

by:Mysidia
Comment Utility
(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.

(2)
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:
    /vmfs/volumes/mydatastorename/SERVER1/SERVER1.vmx

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>
Password:
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.
0
 

Author Comment

by:TrowbridgeHouse
Comment Utility
that did not change the UUID inside of windows.
0
Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

 

Author Comment

by:TrowbridgeHouse
Comment Utility
BTW, this is the problem we are having.

https://support.software.dell.com/appassure/kb/118254
0
 
LVL 23

Assisted Solution

by:Mysidia
Mysidia earned 500 total points
Comment Utility
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
    then
     SELECT DISK 0
     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
0
 

Accepted Solution

by:
TrowbridgeHouse earned 0 total points
Comment Utility
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


DISKPART
SELECT DISK 0
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:

reboot.
0
 

Author Closing Comment

by:TrowbridgeHouse
Comment Utility
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.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
In this article, I will show you HOW TO: Create your first Windows Virtual Machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, the Windows OS we will install is Windows Server 2016.
Advanced tutorial on how to run the esxtop command to capture a batch file in csv format in order to export the file and use it for performance analysis. He demonstrates how to download the file using a vSphere web client (or vSphere client) and exp…
This Micro Tutorial steps you through the configuration steps to configure your ESXi host Management Network settings and test the management network, ensure the host is recognized by the DNS Server, configure a new password, and the troubleshooting…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now