Is there any way to create a virtual machine that you can use in VirtualBox from a physical installation that you have? For instance, if I have Windows XP installed on a physical computer and want to have a virtual version of that machine on a different computer. This would save a ton of time by not having to reinstall and reconfigure the whole OS.
I would think there would be issues with Microsoft's licensing. But even if it's not possible with Windows would it be possible to take a physical Linux machine and create a VirtualBox version of that? Does any other desktop virtualization software provide this feature?
Windows is a bit different, see How to migrate existing Windows installations to VirtualBox for a guide.
From memory you can use VMware's converter and VirtualBox will read VMDK files.
For Linux, if you want the easy solution, boot a live CD,
Do that for every partition mounted in
/etc/fstab
of your machine, and then setup those images in VirtualBox.Windows is pretty easy to clone to virtual machine with Microsoft tool called Disk2vhd. You can do it on a running Windows system as I did with my Windows 2008 server.
If you are migrating a Windows installation to VirtualBox you might want to check out the how-to on on the VirtualBox website
I prefer the network cloning methods using a live CD or ISO images (Clonezilla, Ghost, etc. there are many to choose from). See my previous post regarding increasing disk size in virtual machines.
The network cloning methods work physical to physical, physical to virtual, virtual to virtual and between any virtualization platforms supporting booting to ISO/CD.
You shouldn't use APIC anyway unless using a laptop or you need extra interrupts (lots of addin cards, old ports still being used, etc.). PIC is much better for physical machines if you're doing anything realtime based like audio/video, CNC, etc.. These days with USB and eSATA interrupt stacking isn't as often needed as before.
To do this...Shutdown Windows or whatever you are using
Force Boot a live linux CD.
Open a terminal window and type:
In the command... 'if' is Input File (or source) and 'of' is Output File (or destination).
This takes your OS HDD or OS install CDROM and creates an ISO from it in FILE format and stores it in your Homedir.
Open VitrualBox and Create your new VM.
Right click the VM, select settings, click Mount a CDROM, Select Mount an ISO or Image file.
Select ADD.
Browse and Locate the ISO you created with the "sudo dd if=/dev/cdrom of=cd5.iso" command.
Select it and double click it (or hit OK).
Click OK.
Start the VM.
Voila! Your boot OS HDD or CDROM is now running in a VM ;-)
Most virtualization software has the ability to run an installation straight off the physical drive or from an image made from that drive.
For example, I've routinely created images from hard drives using "dd" and then "booted" the installation on that image using Qemu under FreeBSD. Other than the OS having some issues with the new virtual hardware, things worked as expected.
I'd use Clonezilla to do it. Way easier. Just make sure that when you create the virtual machines hard drive, that it is approximately slightly larger or the same size as the old hard drive.
It's not a straightforward method to create a virtual machine from a physical and run in VirtualBox. But, it's possible with the steps mentioned in Sun VirtualBox P2V.
I did this, but not using Virtualbox. I would have liked to, but the solution was not available. This is entirely possible and relatively easy to do with VMware's free tools. Take the drive that you want to turn into a VM out of the box it's in and drop it in a Windows or Linux box, create a full disc image, and convert it to a VM using either the vmware supported VMware vCenter Converter (http://www.vmware.com/products/converter/) or using qemu-img, which works just as well. There are tons of walkthroughs on how to create images using qemu-img, and the man page is very good.
I would copy an image.
Be careful, as if you don't follow the guide after restoring the image on the virtual machine, the virtualized Windows won't boot anymore as VirtualBox by default does not emulate I/O APIC (as it is faster, they say).