Hey What i do for my work machine, i have a dual boot with windows so. $ fdisk -l Disk /dev/sda: 250.0 GB, 250059350016 bytes 255 heads, 63 sectors/track, 30401 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x57c207a1 Device Boot Start End Blocks Id System /dev/sda1 * 1 15171 121861026 7 HPFS/NTFS /dev/sda2 15172 30401 122334975 5 Extended /dev/sda5 15172 29777 117322663+ 83 Linux /dev/sda6 29778 30401 5012248+ 82 Linux swap / Solaris ===================================================== #So you can see windows is on /dev/sda1. What i do for now is: #!/bin/bash set -x sudo modprobe kqemu sudo qemu -hda /dev/sda -m 1024 -name small-contained-windows -localtime -net nic,macaddr=00:0F:FE:75:53:FF,model=rtl8139 -net tap & ==================================================== It does for now. But you could be clever and use dd to get /dev/sda1 into a raw file. So you would do something like $ dd if=/dev/sda1 of=/home/$whoami/windows.raw So this has the windows now in a raw file, but you wont be able to boot this but you could like get the MBR with $dd if=/dev/sda of=/home/$whoami/system.mbr bs=512 count=1 And maby dd this into the raw file. but that may fail for booting... but you could give it ago. But running the whole disk with qemu as i do works fine for me :) to have them at the same time. There is a tutorial on ubuntu forums on migrating your windows into virtual box! Which puts it all into a .vmdk image which you can run from kvm also. But i am having trouble finding it! Anyways hope this helps! -Phil http://redbrain.co.uk 2009/2/2 Martin Maurer <martin@xxxxxxxxxxx> > > Hi, > > I prefer using the free vmware converter to migrate physical hosts > (using the vmware converter boot CD) to virtual. (Citrix Xenserver also > offer something, but I did not test it yet). Now, test the xp on a > vmware host. Check if everything is running, if necessary adapt the > registry to use IDE disks instead of SCSI. > > And finally, convert the vmdk disk files to your preferred disk format > (I use qcow2) - vmware machines can the moved to any other > virtualization technology. > I wrote the following howto: > http://pve.proxmox.com/wiki/Migration_of_servers_to_Proxmox_VE (Proxmox > VE includes KVM and OpenVZ) > > Br, Martin > > > -----Original Message----- > > From: kvm-owner@xxxxxxxxxxxxxxx [mailto:kvm-owner@xxxxxxxxxxxxxxx] On > > Behalf Of Rich Duzenbury > > Sent: Montag, 2. Februar 2009 00:13 > > To: kvm@xxxxxxxxxxxxxxx > > Subject: Proper way to convert an existing xp machine to kvm? > > > > Hi, > > > > I've been googling for the 'proper' way to migrate an existing windows > > box to kvm, but so far, no joy, so I've taken a stab at it. The old > > box doesn't do a whole lot, so I'm looking to virtualize it, and then > > shrink it to about 10G (from 250). > > > > I use LVM on the vmserver. So, first things first, I created a plenty > > big space (300G) for the old server using system-config-lvm and called > > it vmwindows. > > > > Then, I copied the drive from the old server to the new server. I > > booted the ubuntu hardy live CD on the old machine, and then, from > > that machine > > > > cat /dev/sda | ssh -C vmserver "cat > /dev/vg/vmwindows" > > > > Now, on the vmserver, I verify that the image is ok: > > > > root@vmserver:/mnt# fdisk /dev/vg/vmwindows > > > > The number of cylinders for this disk is set to 41610. > > There is nothing wrong with that, but this is larger than 1024, > > and could in certain setups cause problems with: > > 1) software that runs at boot time (e.g., old versions of LILO) > > 2) booting and partitioning software from other OSs > > (e.g., DOS FDISK, OS/2 FDISK) > > > > Command (m for help): p > > > > Disk /dev/vg/vmwindows: 322.1 GB, 322122547200 bytes > > 240 heads, 63 sectors/track, 41610 cylinders > > Units = cylinders of 15120 * 512 = 7741440 bytes > > Disk identifier: 0xcab10bee > > > > Device Boot Start End Blocks Id > System > > /dev/vg/vmwindows1 * 1 31129 235335208+ 7 > > HPFS/NTFS > > /dev/vg/vmwindows2 31131 32301 8852760 c W95 > > FAT32 (LBA) > > > > This is what I expected, in terms of the partitions. The first > > partition has the windows install. The second is, I believe, a > > recovery partition. > > > > Also, I can mount this image: > > mount -o loop,offset=$((63*512)),rw /dev/vg/vmwindows /mnt > > > > root@vmserver:/mnt# ls -al WINDOWS/system32/hal.dll > > -rwxrwxrwx 1 root root 131968 2004-08-03 22:59 > WINDOWS/system32/hal.dll > > > > After unmounting, I try to boot the image: > > kvm -drive if=ide,boot=on,file=/dev/vg/vmwindows -name foo > > > > Result (in a new window): > > > > QEMU BIOS - build: 07/09/08 > > $Revision: 1.182 > > Options: apmbios pcibios eltorito rombios32 > > > > ata0 master: QEMU HARDDISK ATA-7 Hard-Disk ( 300 GBytes) > > ata1 master: QEMU DVD-ROM ATAPI-4 CD-Rom/DVD-Rom > > > > Booting from Hard Disk... > > > > A disk read error occurred > > Press Ctrl+Alt+Del to restart > > > > Hmm, not good. What am I doing wrong? > > > > Thank you. > > > > Regards, > > Rich > > -- > > To unsubscribe from this list: send the line "unsubscribe kvm" in > > the body of a message to majordomo@xxxxxxxxxxxxxxx > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html