Re: Converting QEMU Harddisk to native Partition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 02/15/2011 10:06 AM, Erik Rull wrote:
Hi all,

I have currently virtualized two partitions (/dev/sda2 and /dev/sda3)
that are exposed as QEMU Harddisks to the Windows XP Guest (Drive C and
D there).
Are there possibilities to convert or adapt those to native partitions
or native disks so that I could theoretically boot the Windows that is
placed in the virtual disk natively?

Thanks!

Anything that works on real hardware is likely to work if run in a guest. At the very least, one of several similar and equivalent methods would be, create another virtual disk a bit bigger than the Windows partition you want to make native and attach it to a VM with the Windows partition you want to make native and boot a linux rescue disk. Put a linux file system on the new disk and mount it (say at /mnt/workspace) then, assuming the Windows partition you want to make native is hda1:

# dd if=/dev/sda2 of=/mnt/workspace/windowsCdrive.img bs=1M
# dd if=/dev/sda3 of=/mnt/workspace/windowsDdrive.img bs=1M
# scp /mnt/workspace/windows*img user@vmhost:~/

I'm assuming you get how that would give you a block copy of the guest partitions as files on the host, which you could then lay down on a real disk via dd and a USB device for example.

--
David.
--
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


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux