Run VM off Hard Drive

Discussions related to using VirtualBox on Linux hosts.
Post Reply
rabbit20
Posts: 2
Joined: 4. Apr 2009, 08:18
Primary OS: Ubuntu 8.10
VBox Version: OSE Debian
Guest OSses: Ubuntu Server 8.10 x64

Run VM off Hard Drive

Post by rabbit20 »

I have looked and found some posts on this. I know its not a good idea to run XP that is already installed on a hard drive on a virtual machine but this is why I want to do it.

I would like to boot a virtual machine off a hard drive that has XP installed on it so that I can repair the operating system and clean it of any bugs. This would save me from having to down my desktop to work on a friends desktop since I do not have separate hardware to run the desktop on. If i could get this to work it would be great!

Thanks
Martin
Volunteer
Posts: 2562
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: Run VM off Hard Drive

Post by Martin »

If you don't need to boot the other XP installation and only need to access the disk, the easiest way would be to use an IDE/SATA to USB adapter cable to attach the disk to a running XP VM.
fry@linux
Posts: 5
Joined: 18. Oct 2010, 14:56
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Ubuntu

Re: Run VM off Hard Drive

Post by fry@linux »

Hi,
I think there is a way to do that, but you will need many empty space on your harddrive!
1. Make a full copy of the XP harddrive with a linux-live-system and the tool "dd". (like sudo dd if=/dev/sda of=xp.image)
2. Create a new Linux-VM with two virtualharddrives.
3. Install a linux-system, for example ubuntu on the first HDD
4. Copy the dd image to the linux guest (scp xp.image user@guest_ip:/)
5. Open a Shell and do "sudo fdisk -l". One HDD is empty! (for example /dev/sdb)
6. Now you can copy the image back (sudo dd if=xp.image of=/dev/sdb)
7. Create a Windows VM and use the second vdi file

Tell me when it works ;)
Post Reply