Changing the location of VMDK files?

This is for discussing general topics about how to use VirtualBox.
Post Reply
wb666greene
Posts: 9
Joined: 29. Sep 2011, 18:52
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 7

Changing the location of VMDK files?

Post by wb666greene »

I've a mish-mash of small VMs created going back to 1.5, they all seem to work fine in 4.1.4, my question is can I move the VDMK and associated files to match the "new" default locations and simplify my directory tree?

I tried just moving the VDMK file to where I wanted it, figuring I could detach and then reattach in its new location, but this complained about duplicated UUIDs and wouldn't work.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Changing the location of VMDK files?

Post by Sasquatch »

You have to move the file after you unregistered the VDI from the Media Manager. Another option, which is a little daunting, is to move the file and modify the corresponding XML files that hold the file location. If you have snapshots, you shouldn't touch the VDI. You have to flatten the whole tree, removing all the snapshots by discarding them or merging the data into it's parent if you really want to move it. If you don't want to break the tree, don't move the VDI.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Post Reply