[Solved] Proper way to import a VM?
-
- Posts: 83
- Joined: 7. Mar 2016, 13:28
- Primary OS: Linux other
- VBox Version: OSE other
- Guest OSses: ArchLinux; Fedora; Ubuntu; Win7pro64; WinXP
- Contact:
[Solved] Proper way to import a VM?
I have a question (and not sure if this is the correct forum, moderators please move if/as needed, thank you) regarding copying an existing vdi from an external backup drive to a Windows host and importing it to use in VirtualBox on the Windows host. I copied an Ubuntu guest from an external drive to "Downloads" on Windows 10 pro 64bit laptop. Then in VirtualBox imported the Ubuntu image (vdi) from Downloads to create new Ubuntu guest. It works and everything but I thought I could delete the vdi in Downloads afterwards but see that I cannot as it updates whenever Ubuntu guest is run, even though there is also the vdi in the proper VirtualBox folder (the one that gets set up from installing the VirtualBox software). So my question is, should I have performed the clone cli operation instead and just clone it straight from the external backup drive? Or, can I now remove the Ubuntu vdi from VirtualBox and then clone the one from Downloads to VirtualBox directory and once cloned and useable, delete the one in Downloads? What I prefer is to just have the Ubuntu vdi and all that goes with it only reside in the VirtualBox folder like creating new guests from an iso does and not have the vdi in two different places as it is now. I do not want to install Ubuntu from an iso, because the one from the backup drive has data in it. Thank you for your consideration.
Last edited by WFV on 24. Jun 2018, 22:39, edited 5 times in total.
-
- Site Moderator
- Posts: 27329
- Joined: 22. Oct 2010, 11:03
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Win(*>98), Linux*, OSX>10.5
- Location: Greece
Re: Proper way to import a VM?
It wasn't the correct topic. You didn't use CloneVDI and it didn't belong in the discussion for that tool. Split and given a new title.WFV wrote:I have a question (and not sure if this is the correct forum, moderators please move if/as needed, thank you)
As for your question, see the FAQ "Moving a VM".
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
-
- Posts: 83
- Joined: 7. Mar 2016, 13:28
- Primary OS: Linux other
- VBox Version: OSE other
- Guest OSses: ArchLinux; Fedora; Ubuntu; Win7pro64; WinXP
- Contact:
Re: Proper way to import a VM?
Thank you socratis, I will review the link you sent and go from there and get back to this thread to mark solved when solved.
-
- Posts: 83
- Joined: 7. Mar 2016, 13:28
- Primary OS: Linux other
- VBox Version: OSE other
- Guest OSses: ArchLinux; Fedora; Ubuntu; Win7pro64; WinXP
- Contact:
Re: Proper way to import a VM?
I'm marking this solved although I haven't made the changes or tested yet on the Windows pc, work is too busy haven't had time to get back to this so will open a new thread later if/when i get to it if any problems. Thank you!
-
- Site Moderator
- Posts: 27329
- Joined: 22. Oct 2010, 11:03
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Win(*>98), Linux*, OSX>10.5
- Location: Greece
Re: Proper way to import a VM?
Then don't mark it as [Solved], you don't have to. First test (if you can), then if successful mark it as such. I'm going to unmark it as {Solved] until you're comfortable enough. No pressure, no one gets extra points for solved threads...WFV wrote:although I haven't made the changes or tested yet on the Windows pc
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
-
- Posts: 83
- Joined: 7. Mar 2016, 13:28
- Primary OS: Linux other
- VBox Version: OSE other
- Guest OSses: ArchLinux; Fedora; Ubuntu; Win7pro64; WinXP
- Contact:
Re: Proper way to import a VM?
Ok, thanks Socratis. Moved it today.
Removed the guest from VirtualBox including disk files via VirtualBox application. Then in Windows host, deleted the guest folder from <C:\users\me\VirtualBox VMs>
Moved the original Ubuntu guest folder from <C:\users\me\Downloads> to <C:\users\me\VirtualBox VMs>
this was not a downloaded image, it was the entire guest folder from a backup of a different pc (Linux host --> backup-drive --> Windows host).
Added VBoxManage.exe to Windows path from Windows cli
Then navigate to the guest folder while in cli and run closed cli, opened VirtualBox and created new machine using the existing Ubuntu.vdi
I see the error, perhaps I should rename thread "improper way..." all that needed to be done was the first part removing guest, then move the files from the original Download folder to the Guest folder and do the two CMD operations, then set the vdi... the way I did it still ended up with two folders for one guest... doh! one step fwd, two back
Removed the guest from VirtualBox including disk files via VirtualBox application. Then in Windows host, deleted the guest folder from <C:\users\me\VirtualBox VMs>
Moved the original Ubuntu guest folder from <C:\users\me\Downloads> to <C:\users\me\VirtualBox VMs>
this was not a downloaded image, it was the entire guest folder from a backup of a different pc (Linux host --> backup-drive --> Windows host).
Added VBoxManage.exe to Windows path from Windows cli
Code: Select all
PATH=%PATH%;C:\Program Files\Oracle\VirtualBox
Code: Select all
VBoxManage internalcommands sethduuid Ubuntu.vdi
I see the error, perhaps I should rename thread "improper way..." all that needed to be done was the first part removing guest, then move the files from the original Download folder to the Guest folder and do the two CMD operations, then set the vdi... the way I did it still ended up with two folders for one guest... doh! one step fwd, two back
-
- Site Moderator
- Posts: 27329
- Joined: 22. Oct 2010, 11:03
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Win(*>98), Linux*, OSX>10.5
- Location: Greece
Re: [Solved] Proper way to import a VM?
Why did you even feel the need to do this? Why you thought that you had to change the UUID of the VDI? I don't get it...WFV wrote:VBoxManage internalcommands sethduuid Ubuntu.vdi
You didn't have to perform any of these two commands. The first is nice to have, the second (as I said) is completely unnecessary.WFV wrote:and do the two CMD operations
Again, there is a FAQ which works: "Moving a VM". Read it again and follow the instructions. If you want to experiment feel free, but the FAQ actually works.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
-
- Posts: 83
- Joined: 7. Mar 2016, 13:28
- Primary OS: Linux other
- VBox Version: OSE other
- Guest OSses: ArchLinux; Fedora; Ubuntu; Win7pro64; WinXP
- Contact:
Re: [Solved] Proper way to import a VM?
socaratis, I did follow Moving a VM however, I moved the folder from the Download to VirtualBox VMs but it didn't show up as a machine when I launched VirtualBox - so I had to add a new machine.
If the second command is completely unnecessary, how do I get the vdi re-registered when VirtualBox won't allow me to use it because its UUID is already used?
from Moving a VM
I'll unsolve this again for now and give it another shot today, as will be using that box later this afternoon.
When I went to select the VDI from the folder I moved, VirtualBox wouldn't accept it saying the UUID is already used.Why did you even feel the need to do this? Why you thought that you had to change the UUID of the VDI?
In WIndows command prompt to reset the UUID, Windows err'd saying VBoxManage was not a recognizable command, hence I had to add it to the path (the first operation), then I was able to run the VBoxManage command to do the second operation. I realize why there are two folders in VirtualBox VMs, because the one I moved from Downloads has a different name "VBuntu" and the machine created is "Ubuntu" using the VBuntu.vdi file.You didn't have to perform any of these two commands. The first is nice to have,
If the second command is completely unnecessary, how do I get the vdi re-registered when VirtualBox won't allow me to use it because its UUID is already used?
from Moving a VM
I did remove it and it and it still didn't let me add the copy. Host was also rebooted (but that was because Windows wanted to reboot for unrelated updates).Of course, if the copy is on the same host as the original VM then VirtualBox will object to your attempt to register the same UUID twice. You must remove the original VM from the manager before the copy can be added (*).
I'll unsolve this again for now and give it another shot today, as will be using that box later this afternoon.
-
- Posts: 83
- Joined: 7. Mar 2016, 13:28
- Primary OS: Linux other
- VBox Version: OSE other
- Guest OSses: ArchLinux; Fedora; Ubuntu; Win7pro64; WinXP
- Contact:
Re: Proper way to import a VM?
Opened VirutalBox and removed the vdi from Storage in the Ubuntu guest. Closed VirtualBox
In Windows File Explorer: moved the vdi from <c:\users\me\VirtualBox VMs\VBuntu> to <c:\users\me\VirtualBox VMs\Ubuntu> this is fundamentally no different than copying the entire folder from/to as mentioned in the "Moving a VM" tutorial - only thing is I already did that originally and it did not show up as a machine in VirtualBox at all, and deleted the VBuntu folder. This is on a Windows10Pro 64bit Lenovo T430 laptop for what its worth.
When I tried to add the vdi to Storage, it err'd on UUID already used and would not add. Incidentally the aforementioned first Windows cli operation isn't persistent, so had to rerun it:
reopen VirtualBox and add the vdi, no errors - and now have what was after originally, the vdi resides in the guest folder in VirtualBox VMs and nowhere else (except for a backup copy)
In Windows File Explorer: moved the vdi from <c:\users\me\VirtualBox VMs\VBuntu> to <c:\users\me\VirtualBox VMs\Ubuntu> this is fundamentally no different than copying the entire folder from/to as mentioned in the "Moving a VM" tutorial - only thing is I already did that originally and it did not show up as a machine in VirtualBox at all, and deleted the VBuntu folder. This is on a Windows10Pro 64bit Lenovo T430 laptop for what its worth.
When I tried to add the vdi to Storage, it err'd on UUID already used and would not add. Incidentally the aforementioned first Windows cli operation isn't persistent, so had to rerun it:
Code: Select all
c:\users\me\VirtualBox VMs\VBuntuMicrosoft Windows [Version 10.0.17134.48]
(c) 2018 Microsoft Corporation. All rights reserved.
C:\Users\me>cd VirtualBox VMs
C:\Users\me\VirtualBox VMs>cd Ubuntu
C:\Users\me\VirtualBox VMs\Ubuntu>dir /p
Volume in drive C is Windows
Volume Serial Number is 1C6E-A489
Directory of C:\Users\me\VirtualBox VMs\Ubuntu
06/24/2018 01:16 PM <DIR> .
06/24/2018 01:16 PM <DIR> ..
06/23/2018 03:18 PM <DIR> Logs
06/24/2018 01:15 PM 4,337 Ubuntu.vbox
06/23/2018 03:27 PM 4,547 Ubuntu.vbox-prev
06/24/2018 01:17 PM 30,027,022,336 VBuntu.vdi
04/30/2017 09:38 AM 2,892,577 VirtualBox_VBuntu_30_04_2017_09_37_35.png
4 File(s) 30,029,923,797 bytes
3 Dir(s) 195,464,921,088 bytes free
C:\Users\me\VirtualBox VMs\Ubuntu>VBoxManage internalcommands sethduuid VBuntu.vdi
'VBoxManage' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\me\VirtualBox VMs\Ubuntu>PATH=%PATH%;C:\Program Files\Oracle\VirtualBox
C:\Users\me\VirtualBox VMs\Ubuntu>VBoxManage internalcommands sethduuid VBuntu.vdi
UUID changed to: a12b3456-7890-1c23-de45-f67ghi8jkl9m
C:\Users\me\VirtualBox VMs\Ubuntu>