3 Apr 2012

Change Virtual HD (VHD) UUID in Oracle VirtualBox without Clone

This tips really helped me out when I want to copy a VHD and add a new virtual machine to my Oracle VirtualBox. I really liked VirtualBox, working fine until now, liked the integration between host and guest OS, really manageable but still have Cons on file Copy and Paste between host and guest OS. But when you tried to copy VHD to another location, and just add it to a new virtual machine, this thing came out!

image

Last time, I must clone that VHD which will create a new VHD/VDI with a new UUID, which was took very long time if your VHD more than a Gigs. Now, not anymore! Just ran this command, and in seconds, the UUID changed without clone the HD! And you can start creating your brand new virtual machine.

vboxmanage internalcommands sethduuid <the VHD path>

image

So sorry if my language screwed up Smile….

4 komentar:

  1. thank You very much for this note! Best Regards, Rob.

    BalasHapus
  2. I've made my batch file with name NewUUID.bat to do it.
    Use : > NewUUID.bat Win7CleanD.vhd
    where Win7CleanD.vhd - file/copy of your new virtual hdd. You should copy file NewUUID.bat to the same folder as this Win7CleanD.vhd and then run such comand.
    Below the code of NewUUID.bat :
    @echo off

    set path=%~dp0%1
    set command=internalcommands sethduuid
    cd "c:\Program Files\Oracle\VirtualBox\"
    echo VBoxManage %command% "%path%"
    start c:\"Program Files"\Oracle\VirtualBox\VBoxManage %command% "%path%"

    BalasHapus
    Balasan
    1. Nice... thanks for adding notes to make it easier.

      Hapus

[give me your ideas, hopes, comments and compliments below...]
[aaand...... +1 if you need to....]