Moving from VirtualPC to VirtualBox

This is for discussing general topics about how to use VirtualBox.

Moving from VirtualPC to VirtualBox

Postby mwsealey » 29. Jun 2007, 21:26

I have a Gentoo VirtualPC install which I use for crosscompiling at work, which I am eager to move to a VirtualBox system - if only because I can run the same virtual machine image under any system I run into (this is far better option for me as I may not be logged into Windows at all, and I do not want to "trash" a real system with a cross compiler setup and all the quirks it entails). VirtualBox also seems a great deal faster than VirtualPC here, and using USB drives makes moving the data to the target machine so much more friendly.

I have already prepped the system and kernel to use the drivers present in both systems (tulip & pcnet, vesa & vesa :), soundblaster & ac97, it's a 2.6.21 kernel and I put USB back into it) so it really is a matter of simply getting the VHD disks into VirtualBox.

However while it seems I can use VMDK disks directly, and convert a VMDK disk to a VirtualPC disk, I cannot do the reverse, or convert to VirtualBox's native VDI format.

Since the VHD format is well documented now, is anyone working on a converter (or perhaps support inside VirtualBox?).

Thanks for your time and effort,
Matt Sealey
Genesi USA, Inc. http://www.genesi-usa.com/
Product Development Analyst
mwsealey
 
Posts: 9
Joined: 29. Jun 2007, 21:16

Postby Technologov » 1. Jul 2007, 09:58

VirtualBox doesn't provide a converter. Look elsewhere... or install guest from scratch.
Technologov
Volunteer
 
Posts: 3313
Joined: 10. May 2007, 16:59
Location: Israel

Postby mwsealey » 1. Jul 2007, 12:36

Technologov wrote:VirtualBox doesn't provide a converter. Look elsewhere... or install guest from scratch.


But, nobody else provides a converter? No tools or so on online? No hints? No way to mount and make a raw disk? ANYTHING?

So far I have found a VMDK to VHD converter, VMware's Converter (however it wants to convert the entire virtual machine setup, and fails miserably), a Virtual HD migration kit for Xen (converts VHD/VMDK to Xen's format, actually this looks like a great start for a generic Virtual HD migration tool that converts between all formats..).

Considering the amount of derision VirtualPC gets (I can agree with some on performance and complete lack of features) I find it hard to believe that nobody has made any tools to migrate from it to VirtualBox.

As for reinstalling the system from scratch, it has a good 1000 hours of compiling having been done on it and a very specific system setup. Doing that all again is just not an option.

Am I to understand the 'official' route to move to VirtualBox is "reformat and reinstall"? :D
Matt Sealey
Genesi USA, Inc. http://www.genesi-usa.com/
Product Development Analyst
mwsealey
 
Posts: 9
Joined: 29. Jun 2007, 21:16

Postby stefan.becker » 1. Jul 2007, 16:09

I think because of Problems with different virtual hardware, its the best to make a clean install.
stefan.becker
Volunteer
 
Posts: 7603
Joined: 7. Jun 2007, 21:53

Postby Martin » 2. Jul 2007, 11:55

Why don't you try an image tool like Ghost or Trueimage?
Martin
Volunteer
 
Posts: 2343
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Linux, OS/2

use ssh to image the disk

Postby calmond » 12. Jul 2007, 03:31

Try this - I used to do this with solaris all the time
boot the Virtual Box system with a live CD of Linux (I would recommend CentOS 4.4 live cd or SimplyMepis, although anything with networking and an ssh client will work) - make sure it gets networking and can ping the gentoo VM in Virtual PC.

Make sure you are running an ssh server in Gentoo, and that it is started - I don't use Gentoo, but I think this is highly likely to be in place already.
On the VirtualBox system, boot the live cd, and run this command as root

# ssh root@gentoo dd if=/dev/hda | dd of=/dev/hda

This will take a long time to complete, because it runs dd on the gentoo system, reading the entire hard drive and sending the output to your live cd console in VirtualBox - you then use the pipe ( | ) to send this as input to the local dd command and put the data on the local hard drive. You may need to do this for more than one disk if you have more than one virtual hard drive. Make sure of your drives first, and it is best to do nothing at all on the gentoo system while this runs. This will make an identical copy of your hard dri ve using the network only, it won't take care of any hardware differences though. Given that Gentoo is compiled with hardware specific options, it may not work, but it will only cost you some time to find out. Good luck.
calmond
 
Posts: 28
Joined: 13. Jun 2007, 14:19
Location: Parkersburg, WV U.S.A.

Postby Albatros » 2. Aug 2007, 10:15

To convert a vhd to vdi:
- If the vhd is not fixed-size, make it so, using Virtual PC's disk wizard (VPC 2005 or later.)
- Using VirtualBox 1.4.x, run:
Code: Select all   Expand viewCollapse view
vboxmanage convertdd the_disk.vhd the_disk.vdi


You can make the vdi dynamic if you want:
Code: Select all   Expand viewCollapse view
vboxmanage modifyvdi the_disk.vdi compact


Note: ideally, you should delete (or exclude) the last 512 bytes of the vhd file before using convertdd, but it still works fine if you don't (the vdi disk will have an extra sector.)
Albatros
 

Re: use ssh to image the disk

Postby Kayle » 4. Nov 2008, 19:42

calmond wrote: dd if=/dev/hda | dd of=/dev/hda


Yes ! And with box 2.0, this method works for .vhd write through (expensable) disk !

And this method is much less disk expensive than converting a vhd disk to a solid disk then to a vdi disk (avoid huge disk creation if virtual vhd is, let says 200Go....)

And at last, a simplier way to do things :

1/ find a small linux live cd (Knoppix?) to boot a new fresh virtuale machin

2/ attach source vhd disk as first master ide disk

3/ attach a new vdi (write through) disk as second slave ide disk with at least as much free space as source disk

4/ start virtual machine and run as root 'dd if=/dev/hda of=/dev/hdb'
(there is no need for hda or hdb to be mounted)

5/ wait a long, long time... You can still monitor copy progression by looking at vdi file size growing in guest os or see Bytes in/out under session information dialog box of running virtual machine
Kayle
 
Posts: 2
Joined: 4. Nov 2008, 19:24

Postby jspraul » 14. Nov 2008, 05:56

Needed to be sure to point out the ideal LiveCD for this:

http://clonezilla.org/

with extensive documentation:

http://clonezilla.org/clonezilla-live/
jspraul
 
Posts: 5
Joined: 31. Oct 2008, 06:40

Postby TerryE » 14. Nov 2008, 13:22

The advantage of clonezilla is that it understands most underlying file systems (NTFS,Ext3,FAT32,...) and only writes used clusters whereas dd copies every cluster. This latter means that a 30Gb partition will always occupy 30Gb. However if you are going to be using snapshots etc., then there is little point in filling your filesystem with zero blocks. Use a dynamic VDI + clonezilla. This way only the 1Mb chunks which have content are written to the VDI.

Since you are converting VHDs, I assume that your guest is Windows+NFTS, so also defrag your FS before converting it. See my tutorial All about VDIs for more on this.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
TerryE
Volunteer
 
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS

Re:

Postby Mactop » 15. May 2009, 12:52

Hello, I'm trying to get the latest IE6 XP VHD from Microsoft working on VirtualBox 2.2.2 for Mac, and would really appreciate some help (please!).

So far, I've tried the following:
Albatros wrote:Using VirtualBox 1.4.x, run:
Code: Select all   Expand viewCollapse view
vboxmanage convertdd the_disk.vhd the_disk.vdi


You can make the vdi dynamic if you want:
Code: Select all   Expand viewCollapse view
vboxmanage modifyvdi the_disk.vdi compact

The conversion appears to have worked (no reported errors in Terminal), but I'm getting an error in VirtualBox when I start the converted image:
VirtualBox wrote:FATAL: No bootable medium found! System halted.

I've set the virtual machine up as normal, pointing it at the converted VDI image to use as the hard drive instead of creating a new one. I've checked the boot order for the VM and it's set to CD/DVD and then HDD. I've set system RAM and VRAM to reasonable amounts, too, but other than that I'm not sure what else to look at.

Thanks in advance for any help--I'm really stuck at the minute. :oops:
Mactop
 
Posts: 5
Joined: 15. May 2009, 12:44
Primary OS: Mac OS X Leopard
VBox Version: OSE self-compiled
Guest OSses: XP, Vista

Re: Moving from VirtualPC to VirtualBox

Postby Sasquatch » 15. May 2009, 13:39

You should test the converted image before compacting it. If you know that the normal image boots, then it's an issue after you used the compact option.
Another possibility is that the MBR is missing and needs to be rewritten again. Run a recovery on the Guest and rewrite it's MBR.
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.
Sasquatch
Volunteer
 
Posts: 17800
Joined: 17. Mar 2008, 13:41
Location: /dev/random
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux

Re: Moving from VirtualPC to VirtualBox

Postby MKhaos7 » 15. May 2009, 14:09

The compact option is broken on VirtualBox 2.2.2. Non bootable images is the result of it.
Try running the converted image without compacting it.
MKhaos7
 
Posts: 81
Joined: 6. Apr 2009, 16:19
Location: Brazil - Aracaju/SE
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows, Linux, BSD

Re: Moving from VirtualPC to VirtualBox

Postby Sasquatch » 15. May 2009, 14:26

It's broken on Windows Hosts. Some users have reported a working compact function in Linux Hosts. Could be that it's a lucky hit, or they used an old version of VB. Status about MAC is unknown, but better be safe than sorry.
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.
Sasquatch
Volunteer
 
Posts: 17800
Joined: 17. Mar 2008, 13:41
Location: /dev/random
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux

Re: Moving from VirtualPC to VirtualBox

Postby Mactop » 15. May 2009, 15:18

Thanks for the quick responses.

I neglected to mention I got that error both before and after I tried compacting the converted VDI file. I tried compacting the image after the first time I saw the error to see if that would solve the problem, but apparently not.

It sounds like it could be an MBR issue, but I don't understand your instruction:
Sasquatch wrote:Run a recovery on the Guest and rewrite it's MBR.

Could you give a few more details, please? (Sorry if these are stupid questions.)
Mactop
 
Posts: 5
Joined: 15. May 2009, 12:44
Primary OS: Mac OS X Leopard
VBox Version: OSE self-compiled
Guest OSses: XP, Vista

Next

Return to Using VirtualBox

Who is online

Users browsing this forum: No registered users and 16 guests