Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Chaning UUID on Boot drive

Posted on 2014-03-06
8
3,520 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
ID: 39911558
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
ID: 39912610
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
ID: 39914022
(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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:TrowbridgeHouse
ID: 39918252
that did not change the UUID inside of windows.
0
 

Author Comment

by:TrowbridgeHouse
ID: 39918368
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
ID: 39919794
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
ID: 39923425
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
ID: 39933754
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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Last article we focus in how to VMware: How to create and use VMs TAGs – Part 1 so before follow this article and perform the next tasks, you should read the first article how to create the TAG before using them in Veeam Backup Jobs.
When rebooting a vCenters 6.0 and try to connect using vSphere Client we get this issue "Invalid URL: The hostname could not parsed." When we get this error we need to do some changes in the vCenter advanced settings to fix the issue.
Teach the user how to use create log bundles for vCenter Server or ESXi hosts Open vSphere Web Client: Generate vCenter Server and ESXi host log bundle:  Open vCenter Server Appliance Web Management interface and generate log bundle: Open vCenter Se…
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…

860 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