How to Move VirtualBox’s Guest Hard Drives to Another (Physical) Location

If you ever wanted to move your (very large) file that contains a Virtualbox’s guest hard drive (file extension is .vdi) to another location and did so just like that Virtualbox wouldn’t find it the next time you wanted to boot into your guest system. The only thing Virtualbox needs to be pointed to is the new location of that file.

The standart location of VDI files is (for Linux) ~/.VirtualBox/VDI/ (see global settings, where you could also change this if that’s all you want). Remember the old file name and close Virtualbox, just in case it would overwrite settings when closed after the following changes. Now let’s move one file to, say, /media/USBDrive/virtualbox/. Now do:

  1. Use your favorite editor to open ~/.VirtualBox/Virtualbox.xml
  2. Find the line that says something like:
    <VirtualDiskImage filePath="VDI/old file name.vdi"/>
    
  3. Change it to point to your new location. So it should read something like:
    <VirtualDiskImage filePath="/media/USBDrive/new file name.vdi"/>
    
  4. Done.

8 Comments

  1. domi235 said,

    Friday, 2nd Oct 2009 at 12:24

    Thanks! Worked like a charm!

  2. sandrar said,

    Thursday, 10th Sep 2009 at 22:33

    Hi! I was surfing and found your blog post… nice! I love your blog. :) Cheers! Sandra. R.

  3. koyas said,

    Wednesday, 19th Aug 2009 at 21:18

    thanks, needed this a lot, very short but helpful.

  4. Alexandros said,

    Monday, 3rd Aug 2009 at 11:52

    Thanks ! helpful tip !

  5. Smooth Gecko said,

    Monday, 5th Jan 2009 at 02:40

    Thank you, I backed everything up, copied the vdi files to new location,
    and booted.
    Most helpful.

  6. Adil said,

    Thursday, 1st Jan 2009 at 16:37

    First remove old guest drive then add new which you coppied some where else

  7. e said,

    Tuesday, 21st Oct 2008 at 04:14

    thanks!it worked just fine!

  8. samuel said,

    Tuesday, 22nd Jul 2008 at 17:21

    short and sweet. thx, that was helpful!


Post a Comment