You are not logged in.

#1 2007-09-30 12:35:41

Kienja Kenobi
Member
Registered: 2007-08-17
Posts: 62

Virtualize an Installed OS

My computer came installed with Windows XP, but we did not buy a Windows XP install disk, so is there any way I can virtualize my already installed Windows XP through Arch?  All of the virtualization software I have tried so far can only virtualize an OS from some sort of installation medium.  It seems like there should be SOME way to do it.  Any ideas?

Offline

#2 2007-09-30 12:54:54

magotari
Member
Registered: 2007-09-26
Posts: 12

Re: Virtualize an Installed OS

Hmm...

One idea would be to dd the Windows XP partition to a file.

The other would be to use Xen, but for that you would need hardware support, if your cpu is really new, you could try it. Highly involved too, new kernel needed. Seems safe though.

I got pretty close to running my real system under qemu, but it did not work in the end, grub protested. If I had a separate /boot/ partition, it might have even worked, I think. Not sure though. I used -hda /dev/sda to get there. You need superuser priviliges too, and it sounds damn dangerous.
EDIT: Bochs can use a device file as a disk image too. I never tried doing it, the configuration of that thing is a monster sometimes.

User Mode Linux can run a real system with not much trouble, but only if it is a Linux.

That is all I know. I have tried most virtual machines out there, with the exception of closed source ones, which I don't intend to try.

Karol Swietlicki

Last edited by magotari (2007-09-30 13:45:01)

Offline

#3 2007-09-30 13:10:59

Kienja Kenobi
Member
Registered: 2007-08-17
Posts: 62

Re: Virtualize an Installed OS

Unfortunately, my CPU does not have the Intel VT, so Xen is not a possibility. 

I do have a separate /boot partition that GRUB is on, so I might try doing this with QEMU, but I agree that needing root privileges for everything would not only be risky but annoying.  I might try it though. 

So the idea is to turn my Windows partition into a file using the dd command?  I then can use that file through Bochs or QEMU as if it were a disk image?  I do not think I want to do that, because a file with my entire Windows partition would be enormous.

Last edited by Kienja Kenobi (2007-09-30 13:26:48)

Offline

#4 2007-09-30 13:35:42

magotari
Member
Registered: 2007-09-26
Posts: 12

Re: Virtualize an Installed OS

Precisely. I am not familiar with Bochs, but QEMU should handle it somehow. I don't know exactly what you would need to do to get such a thing running, but that is a first step.
There is a need to partition the image. You will also need a bootloader in the image, to boot the thing. cfdisk won't like a file to partition, but fdisk did not complain as much. After you get grub or whatever into the image you can use dd to move the windows partition over to the image. Complicated, eh? But I think quite doable.

I don't think you can just take a single partition and get it booting by itself, but it might be possible. If I understand right, grub boots Windows by chainloading the first sector of the partition. If you could do the same in QEMU, it could work. Maybe Bochs could do better here, but no idea really. I need to read up more about it.
EDIT: Actually, booting a hard drive image involves something like chainloading too. You should try just booting the single partition.

If you are going with using the real partition here are some bits that I found:
Here is a bit from QEMU documentation: http://fabrice.bellard.free.fr/qemu/qemu-doc.html#SEC21
And here from Bochs: In Unix it is possible to use a raw device as a Bochs hard disk, but we don't recommend it for safety reasons. In Windows, there is no easy way.

Last edited by magotari (2007-09-30 13:39:33)

Offline

#5 2007-09-30 16:47:11

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,155

Re: Virtualize an Installed OS

It is possible with VMware workstation , see   

Running a Windows Partition in VMWare Without Installing Windows Again


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#6 2007-09-30 16:59:19

Kienja Kenobi
Member
Registered: 2007-08-17
Posts: 62

Re: Virtualize an Installed OS

magotari: Thank you very, very much for your hard work and for sharing your knowledge.  I do not think I will try the idea of turning my entire Windows partition into a single file to use with QEMU.  That is indeed involved, and the sheer size of such a file would take 1/4 of my Linux hard drive's space.  I will try the idea of booting the Windows partition that already exists through QEMU.  It looks like Bochs does not like that idea. 

Lone Wolf: Awesome!  That is EXACTLY what I have been wanting, but VMware Workstation requires money, right?  The thread that your link sends me to has a link from which it got its information (http://oopsilon.com/Running-a-Windows-P … -in-VMware) and that website recommends having VMware Player, which I think is free?

Last edited by Kienja Kenobi (2007-09-30 17:01:16)

Offline

#7 2007-09-30 17:31:25

magotari
Member
Registered: 2007-09-26
Posts: 12

Re: Virtualize an Installed OS

What can I say, I am crazy about virtual machines. Right now I have memsplit problems with User Mode Linux, so I am bored as hell and I have time to burn. When I saw a topic about virtualization it made my day.

If you try the idea, please please please be careful not to boot into your linux twice. Two copies of the same operating system trying to use the same partition = disaster waiting to happen.
If you want I can spend some time and try to do it myself, I routinely run a real system on a virtual machine. Never in QEMU, but as I said: I am bored. I could then share some tips.

VMware * is closed source, so I don't know anything about it. I can't say either pro or contra. I imagine it would be able to do such a thing, they sure have the financial backing for it.

What really pains me is that User Mode Linux not only allows, but actually seems to recommend using a real partition for IO performance reasons. I use it to run my very first linux distribution. Sadly, UML is good only for Linux systems.

Karol Swietlicki

Offline

#8 2007-09-30 17:45:36

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,155

Re: Virtualize an Installed OS

vmware player is indeed free, and there are aur packages for it.

you'll need vmware-player and vmware-player-modules


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#9 2007-09-30 18:17:05

Kienja Kenobi
Member
Registered: 2007-08-17
Posts: 62

Re: Virtualize an Installed OS

I can not connect to the Internet on my Linux system, so I can not use the Arch Build System.  Can I install VMware with the .tar file for Linux found here: http://www.vmware.com/download/player/download.html and install the kernel modules with the vmware-any-any-update113.tar.gz file found here: http://platan.vc.cvut.cz/ftp/pub/vmware/ ?  Those are the two main files that VMware Player and kernel modules pointed to in the AUR.  VMware Player also pointed to two other sources, "vmware" and "vmplayer.patch", but they are both very short scripts, so do I need to do anything with those?

Offline

#10 2007-09-30 23:18:19

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,155

Re: Virtualize an Installed OS

All vmware products need several changes to run succesfully on arch, the aur packages have been tested by others and work.
While it is possible to achieve the same result manually, the aur packages make it  a lot easier.

Just download the tarballs from aur + the necessary source files on any system with internet access.
Transfer them to your arch box and put the source files in the same folders where you extract the aur tarball.
makepkg is smart enough to see the source files are present.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#11 2007-10-04 19:47:14

Kienja Kenobi
Member
Registered: 2007-08-17
Posts: 62

Re: Virtualize an Installed OS

Thank you very much!  This makes things much easier.  I figured I was in deep water trying to install VMware myself.

Offline

#12 2007-10-05 03:59:57

kishd
Member
Registered: 2006-06-14
Posts: 401

Re: Virtualize an Installed OS

I would suggest creating a backup image of your windows install using some disk imaging software before proceeding just in case things do not go too well.


---for there is nothing either good or bad, but only thinking makes it so....
Hamlet, W Shakespeare

Offline

#13 2007-10-05 20:15:20

Kienja Kenobi
Member
Registered: 2007-08-17
Posts: 62

Re: Virtualize an Installed OS

The VMware method is not working so well for me, so I think I will attempt the method using QEMU.  When I first turn my Windows partition into a file for QEMU to use it will be enormous, but if I will be able to uninstall programs and delete users in the QEMU file without affected my real Windows partition, I will be able to bring it down to a manageable size.

Offline

Board footer

Powered by FluxBB