vote up 3 vote down star
3

Is there any way to create a virtual machine that you can use in virtual box from a physical installation that you have. So 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 its not possible with windows would it be possible to take a physical linux machine and create a virtualbox version of that? Do any other Desktop Virtualizations provide this feature?

flag

8 Answers

vote up 6 vote down check

Windows is a bit different, see here for a guide: http://www.virtualbox.org/wiki/Migrate_Windows

From memory you can use vmwares converter and virtualbox will read vmdk's

for linux if you want the easy solution, boot a live cd

dd if=/dev/sda1 of=/path/to/images/sda1.img bs=1024

do that for every partition mounted in /etc/fstab of your machine then setup those images in virtualbox

link|flag
vote up 0 vote down

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.

link|flag
vote up 0 vote down

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.

link|flag
vote up 0 vote down

I would copy an image. Be careful as if you don't follow the guide after restore the image on the vm, the virtualized windows won't boot anymore as virtualbox by default does not emulate IO APIC (as is faster, they say)

link|flag
vote up 0 vote down

I prefer the network cloning methods using livecd or iso images (clonezilla, ghost, etc. 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.

link|flag
vote up 0 vote down

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.

link|flag
vote up 0 vote down

To do this...Shutdown Windows or whatever you are using

Force Boot a live linux CD.

Open a terminal window and type:

sudo dd if=/dev/YOUR DEVICE (hdd,cdrom) of=A UNIQUENAME.iso (WINBoot,cd5,Hacktoolz).iso.

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 ;-)

link|flag
vote up 0 vote down

Its not straight forward method to create virtual machine from physical and run in VirtulBox. But, its possible with following steps mentioned here.Sun VirtualBox P2V

link|flag

Your Answer

Get an OpenID
or
never shown

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