0

I'm moving a Windows 10 install from dedicated hardware to a KVM VM. The disk (SSD) is being physically moved from the current machine to the VM host machine. Is there a way to just pass the entire existing disk to the VM, as-is?

The simple option (for me) would be to dd the Win10 disk to an img file, then convert that to a qcow2, which I can move to the original SSD and then attach to the new VM. But it seems like there would be less host CPU overhead if I were able to just hand control of the whole disk to the VM (and then tell the host to never touch it, ideally).

(Also, a solution using virt-manager would be nice - it looks like it might be possible in Add Hardware -> Storage, but there isn't enough guidance in the UI for me to be sure.)

I found this RedHat article that looks like it might have a solution or two, but again my knowledge of command line virtualization on Linux is still shaky so I'm not sure.

Motherboard and CPU both support IOMMU, I kind of doubt that will help here though.

1 Answers1

1

Yes you can do this. Install the virtio drivers before you decommission the old system. All you have to do then is configure the VM to use the existing block device instead of a virtual disk. You will have to relicense Windows 10.

It's pretty straightforward and IIRC it can all be done from virtmanager.

user9517
  • 115,471
  • 20
  • 215
  • 297
  • Finally got back to this project and seem to have figured out how to do it via virt-manager. But OVMF (the UEFI shell) doesn't want to boot to the disk no matter how I pass it through (whole device, partitions, SATA/SCSI/IDE/VirtIO). Any ideas? – ACK_stoverflow Sep 17 '16 at 02:02