Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Virtualization»How to Change the UUID of Virtual Disk (.VDI)

    How to Change the UUID of Virtual Disk (.VDI)

    RahulBy RahulApril 8, 20171 Min ReadUpdated:January 23, 2020

    VirtualBox provides an utility named VBoxManage to create the clone of existing disk. In case you already created a copy of the disk and try to create the VM using this. You will face an issue of UUID already registered like below:

    Failed to open the hard disk D:\NewVM\myDisk1.vdi.
    Cannot register the hard disk ‘D:\NewVM\myDisk1.vdi’ {9ad88130-26ce-45e1-b415-b1b3a42d749a} because a hard disk ‘D:\myOldVM\oldDisk1.vdi’ with UUID {9ad88130-26ce-45e1-b415-b1b3a42d749a} already exists.

    To solve this issue, Use the VBoxManage utility to change the UUID of the VDI disk using the command line.

    Change the UUID of Virtual Disk

    VBoxManage command is installed with VirtualBox installation on your system. So, its available for all operating systems having VirtualBox installed.

    Windows Users can use the following command to change UUID of D:\NewVM\myDisk1.vdi disk.

    c:\> cd "C:\Program Files\Oracle\VirtualBox\"
    c:\> VBoxManage.exe internalcommands sethduuid "D:\NewVM\myDisk1.vdi"
    

    Linux Usersc an also use the VBoxManage command to change UUID of a disk.

    VBoxManage internalcommands sethduuid "/var/vdisks/myDisk1.vdi"
    

    Best Way to Clone VDI Disk:

    VBoxManage provides an option to make a clone of the existing disk. Where the utility creates a copy of the disk with different UUID and you will not face the above issue.

    VBoxManage clonevdi myDisk1.vdi cloneDisk.vdi
    
    UUID VDI VirtualBox
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow to Prevent SQL Injection in PHP
    Next Article How to Enable Basic Authentication on NGINX

    Related Posts

    How To Install Oracle VirtualBox on Debian 11

    2 Mins Read

    How to Install VirtualBox 6.1 on Ubuntu 20.04

    Updated:December 13, 20202 Mins Read

    How To Install VirtualBox 6.1 on Fedora 35/34

    Updated:February 18, 20222 Mins Read

    How To Install VirtualBox 6.1 on Ubuntu 18.04 LTS

    Updated:June 27, 20202 Mins Read

    How to Convert VMDK to VDI Disk using VirtualBox

    Updated:August 29, 20181 Min Read

    How to Convert VDI to VMDK Disk using VirtualBox

    Updated:August 30, 20181 Min Read

    6 Comments

    1. Bogdan Florin on August 4, 2019 11:14 pm

      I Export Apliance operation from Host01 and Import Apliance to Host02 and .. suprise … however Host01 and Host02 are Hardware/Software IDENTICALY .. After Import and Start Virtual Machine … I can not ping over network …

      I begin to belive that THERE IS NOT OFFICIAL METHOD for Transfer Virtual Machine from a Host to Another using Virtual Box 🙁 Disapointing.

      Reply
    2. Bogdan Florin on August 4, 2019 10:35 pm

      I try to move a Virtual Image from Host01 to Host02 both Windows 10 Up to date.
      I perform the following operations:
      – closing image on Host01
      – removing Virtual machine from Host01
      – copying Virtual Machine Folder to Host02 computer
      – Open Virtual Box on Host02 and trying to ADD image > Gotting Error about UUID existing …
      – Google-ing and find command to change UUID
      – Run Change UUID comand to Copied Virtual Machine on Host02
      – Closing Virtual Box on Host02 … wait 2 minutes … Opening Virtual Box and ADD-ing Virtual Machine … not bad ..
      – Trying to Start Virtual Machine … UUID nnn of the medium ‘D:\…….vdi’ does not match the value {0f9050c6-8c2d-4353-bb81-a2cc69539e77} stored in the media registry (‘C:\Users\florinb\.VirtualBox\VirtualBox.xml’).

      What to do now ? 🙁 Please advice.

      Reply
    3. derek on November 20, 2018 4:16 pm

      In vbox 5.2.10 the command is slightly different.
      VBoxManage internalcommands sethduuid “path/to/file”

      Reply
    4. Argenis on October 16, 2018 4:29 am

      Excelente información, thanks!

      Reply
    5. Olivier Louet on January 29, 2018 8:44 am

      Il faut des guillemets autours de “D:\NewVM\myDisk1.vdi”

      Reply
      • Rahul K. on February 1, 2018 6:24 am

        Thanks Olivier, I have updated article.

        Reply

    Leave A Reply Cancel Reply

    Recent Posts
    • How to Enable / disable Firewall in Windows
    • How to Install JAVA on Ubuntu 22.04
    • Switching Display Manager in Ubuntu – GDM, LightDM & SDDM
    • Changing the Login Screen Background in Ubuntu 22.04 & 20.04
    • How To Install PHP (8.1, 7.4 or 5.6) on Ubuntu 22.04
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.