Recent Changes - Search:


Code:


Social:


My journals will take the place of a blog. If you go to the Journal page there is an RSS feed to subscribe with.

« September 2017 
SunMonTueWedThuFriSat
     12
3456789
10111213141516
17181920212223
24252627282930

Sites I take responsibility for

West Volusia, Florida

Documents

Technical

General

Me

Living

Places I frequent

Hobbies

Humor

Items for sale:


Clipboard

edit SideBar

Moving VM disks to another location

Include our styles below Infobox - invoke as >>infobox<< ... >><<

Codebox: - invoke as >>codebox<< ... >><<

warnbox: - invoke as >>codebox<< ... >><<

editingbox: - invoke as >>codebox<< ... >><<

noticebox: - invoke as >>codebox<< ... >><<

Page bread crumbs: Welcome to ke3vin.org! - My Public Technical Notes - Software And Operating Systems - Software - Virtualization - Virtual Box - Moving VM Disks To Another Location

Pages by tags: (:listtags:)
Subscribe to this wiki: RSS Feed RSS or subscribe to this page for changes: RSS Feed RSS
496 articles have been published so far. Recent changes
Share

2016-03-22: This site is being moved to my main site at https://kevininscoe.com/wiki as part of a consolidation to one domain.


Moving VirtualBox VM disks to another location

First shutdown VirtualBox.

Next copy (not move) the VM files (*.vdi) to their new location.

Now the problem will be the original and new files both have the same UUID embedded in them. This will become a problem when you try to add in the new files into your VM (Settings->Storage->Storage Tree). You will get an error message akin to "Cannot add this disk "/path/to/new disk.vdi" because "/old/path/to/old disk.vdi" is already registered with this UUID. This will happen even if you have deleted the original files. The problem is each disk file in the VirtualBox is registered with a unique UUID and you cannot have two of a particular UUID at the same time registered. To resolve this problem you will need to change the UUID of the newly copied disk(s). Below is the command I used on a Mac (also works in Windows command line or Linux):

I moved the files due to space restrictions to a USB disk on my MacBook Pro. Note that I was using SecureCRT logged into my local shell on the MacBook but the Terminal.app could alos be used for this.

kevin@Macbook> ls -l "/Volumes/General Backup/VirtualBox VMs/Windows 8 Clone from Windows XP"                                 
total 141301792
-rw-------  1 kevin  staff    119537664 Jan  7 18:16 Windows 8 Clone from Windows XP-disk1.vdi
-rw-------  1 kevin  staff    342884352 Jan  7 18:16 Windows 8 Clone from Windows XP-disk2.vdi
-rw-------  1 kevin  staff        16110 Jan  7 18:16 Windows 8 Clone from Windows XP.vbox
-rw-------  1 kevin  staff  71884079104 Jan  8 07:05 Windows 8 Clone from Windows XP.vdi
kevin@Macbook> VBoxManage internalcommands sethduuid \
"/Volumes/General Backup/VirtualBox VMs/Windows 8 Clone from Windows XP/Windows 8 Clone from Windows XP.vdi"
UUID changed to: 7590c57b-9545-4893-91b1-4e40b9558425
kevin@Macbook> VBoxManage internalcommands sethduuid \
"/Volumes/General Backup/VirtualBox VMs/Windows 8 Clone from Windows XP/Windows 8 Clone from Windows XP-disk1.vdi"
UUID changed to: 7a0273b6-1ff4-49da-8880-a0581603fd48
kevin@Macbook> VBoxManage internalcommands sethduuid \
"/Volumes/General Backup/VirtualBox VMs/Windows 8 Clone from Windows XP/Windows 8 Clone from Windows XP-disk2.vdi" 
UUID changed to: 8a1caf2e-592e-437a-95a6-af3e17c655c1

You should now be able to attach the new VDI disk files to the VM (VM->Settings->Storage->Storage Tree) while de-registering the old files and removing them from the old location on disk.


Notes:

http://stackoverflow.com/questions/17803331/how-to-change-uuid-in-virtual-box

https://forums.virtualbox.org/viewtopic.php?f=35&t=55003


Kevin's Public Wiki maintained and created by Kevin P. Inscoe is licensed under a
Creative Commons Attribution 3.0 United States License.

Back to my web site - http://kevininscoe.com

Edit - History - Print - Recent Changes - Search
Page last modified on January 08, 2015, at 07:49 AM EST