{"id":1581,"date":"2013-04-20T18:27:39","date_gmt":"2013-04-20T16:27:39","guid":{"rendered":"http:\/\/sickel.net\/blogg\/?p=1581"},"modified":"2013-04-20T20:43:42","modified_gmt":"2013-04-20T18:43:42","slug":"how-to-move-a-virtual-machine-to-another-pc-using-vboxmanager","status":"publish","type":"post","link":"https:\/\/sickel.net\/blogg\/?p=1581","title":{"rendered":"How to move a VboxManager virtual machine to another host"},"content":{"rendered":"<p>Officially, this has to be done using the clone function in vboxmanager &#8211; but you may (as I did) come up in a situation where the virtualbox system in the original host for some reason is not usable.<\/p>\n<p>I moved my virtual machine between two 64-bits linux systems (the original host running ubuntu, the new host running debian). First I copied the entire directory containing the vm from the old host to the new one. Then I had to look at the .vbox file in that directory (the vm is called dbserver) which starts like this:<\/p>\n<p><code>< ?xml version=\"1.0\"?><br \/>\n&lt;!--<br \/>\n** DO NOT EDIT THIS FILE.<br \/>\n** If you make changes to this file while any VirtualBox related application<br \/>\n** is running, your changes will be overwritten later, without taking effect.<br \/>\n** Use VBoxManage or the VirtualBox Manager GUI to make changes.<br \/>\n--><br \/>\n&lt;VirtualBox xmlns=\"http:\/\/www.innotek.de\/VirtualBox-settings\" version=\"1.12-linux\"><br \/>\n  &lt;Machine uuid=\"{29fc488f-7e02-4564-b407-373dd72731c3}\" name=\"dbserver\" OSType=\"Ubuntu_64\" currentSnapshot=\"{bf8a6162-452f-4433-b0ac-20732c166748}\" snapshotFolder=\"Snapshots\" lastStateChange=\"2013-04-20T16:07:17Z\"><br \/>\n    &lt;MediaRegistry><br \/>\n     ...<br \/>\n <\/code><br \/>\nThe important part is the &#8220;Machine uuid&#8221; In the global settings file for vboxmanager, Virtualbox.xml, I had to add a line within the &lt;MachineRegistry><\/p>\n<p><code><br \/>\n&lt;MachineRegistry><br \/>\n&lt;MachineEntry uuid=\"{29fc488f-7e02-4564-b407-373dd72731c3}\" src=\"\/home\/morten\/VirtualBox VMs\/dbserver\/dbserver.vbox\"\/><br \/>\n<\/code><\/p>\n<p>&#8211; then the vm could be started with the disks in the same state as it was on the old host.<\/p>\n<p>There might be that I also should have added some information within &lt;MediaRegistry>, but so far it seems to run just fine &#8211; and I can do a clone for backing up.<\/p>\n<p>On the linux systems, the files for the vm are stored within \u0303~\/VirtualBox VMs\/&lt;vmname&gt; &#8211; ie in my case ~\/VirtualBox VMs\/dbserver. The global settings file is ~\/.VirtualBox\/VirtualBox.xml &#8211; in other systems, it may be stored other places. &#8211; I have no idea if this will work to move a vm between two hosts with different OSs.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Officially, to move a vbox virtual machine to another host, you have to clone it. But &#8211; what if vboxmanager for some reason has stopped working on the host you want to move the vms from? <a href=\"https:\/\/sickel.net\/blogg\/?p=1581\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4,25],"tags":[],"class_list":["post-1581","post","type-post","status-publish","format-standard","hentry","category-data","category-linux"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pnVtD-pv","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/sickel.net\/blogg\/index.php?rest_route=\/wp\/v2\/posts\/1581","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sickel.net\/blogg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sickel.net\/blogg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sickel.net\/blogg\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sickel.net\/blogg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1581"}],"version-history":[{"count":8,"href":"https:\/\/sickel.net\/blogg\/index.php?rest_route=\/wp\/v2\/posts\/1581\/revisions"}],"predecessor-version":[{"id":1589,"href":"https:\/\/sickel.net\/blogg\/index.php?rest_route=\/wp\/v2\/posts\/1581\/revisions\/1589"}],"wp:attachment":[{"href":"https:\/\/sickel.net\/blogg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1581"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sickel.net\/blogg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1581"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sickel.net\/blogg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1581"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}