Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've got a VirtualBox Windows 7 virtual disk image (.vdi) disk. This .vdi boots Linux 64 bit on my 32 bit ubuntu on a 64-bit machine with virtualization enabled.

I have installed a lot of programs in this guest Windows 7 system. If the system crashes and cannot be restored, I don't want to have to waste all these hours all over again to reinstall everything. So, my question is:

  1. I shut down my Windows 7 and copy the entire .vdi image to an external hard drive, or external usb mass storage device, and install Linux on another machine, and install the same version of VirtualBox on that machine, and copy the .vdi image to that machine, then can I boot it on that machine? Do I need to back up anything else other than the .vdi image to do a proper backup so I can boot the machine in the same state again?

  2. Suppose I create 3+ install DVDs for the .vdi. These would require less space, but require more time to write the CDs and then boot the windows 7 image inside VirtualBox. Would this also work?

  3. If I do the CDs from part 2, and then use them to install a version of Windows on a completely blank physical hard drive then would I have any problems? (presumably when the installation is complete I would have to install all the machine specific drivers).

  4. If I go ahead with 3, then can I also install Windows on half a parition/disk, or does Windows always delete everything when you install it, including the Linux OS installed on the other half of the partition?

  5. If the answer to 4 is no, than is there a way, ANY way, to get Windows to play nice?

share|improve this question
    
how would you create (and use) the DVDs from #2? –  tapped-out Jul 24 '12 at 17:45

2 Answers 2

Thats pretty much it moving the VDI to the other system, but there are some more things to consider if you do not want to have to reactivate Windows 7. See the following information as noted in the End user forums for VirtualBox

Q: I want to move my VM to a different host, how do I do that?

Q: I want to share my VM with my dual-boot, how do I do that?

A: The VDI need to be on a shared location so both OSses can read and write to the file in case you want to share it between your dual-boot Host.

You can ignore the shared location, since you are doing a move.

Create a new VM on the other system, select the VDI from the first Host as hard drive instead of creating a new one and make sure that every setting is exactly the same. The MAC addresses of the virtual NICs also need to be the same, to avoid possible Windows activation prompts and new interface names on Linux.

For Windows 7, there is one additional step that needs to be the done to avoid reactivation. The VM UUID need to be transferred from the original VM to the new one. Open the XML file of the original VM and copy the UUID and transfer that to the new VM XML file. Look for this line at the start of the file:

Machine uuid="{075d42da-6025-4a95-a1d5-57b1f4b09dd7}" name="Windows 7" OSType="Windows7"

The 'hash' in curly brackets is the UUID you need to copy and replace in the new VM XML. This change is not yet done, because the VirtualBox.xml file doesn't know that UUID, it still holds the old UUID of the VM. Open the VirtualBox.xml file in a text editor like with the machine.xml file and look at a line that looks like the following and replace the UUID.

<MachineEntry uuid="{075d42da-6025-4a95-a1d5-57b1f4b09dd7}" src="/media/Extern/Virtual Machines/Windows 7/Windows 7.xml"/>

The src= line is how you can spot your VM. The actual location of the XML depends on the Host and configuration of the VM location. By default it's in the user profile folder.

share|improve this answer

Shut down the VM and close Virtualbox. Go to the location the files are stored, should be a folder with the name of the VM containing the .vdi, .vbox and maybe some other files and/or a logs folder. Just go ahead and backup the entire 'Your VM Name' folder to another drive. You now have a snapshot of your VM at that point in time.

Yes, you can also just save the .VDI file alone, and then create a new VM in the wizard later and use the existing drive rather than create a new one, it should boot. Might as well just backup all the files though.

If you want to restore the VM into a different host OS than it was created, you'll likely just want to create a new VM there and load that .VDI file as the drive. Though I'm not 100% sure if the other files are different cross platform, I always do it this way to be safe.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.