Hello everyone!

I have been learning QEMU for the past day and so I’ve almost finished building my perfect VM from the qemu cli, and I was wondering if there is any method to say, copy a partition(+bootloader) of a physically installed system (in this case, Windows) over a hard disk image and run it with QEMU

Unfortunately I’ve had no luck searching online about it and I’m unsure how to proceed myself since I’ve never done any disk-cloning or anything like that

My best guess would be to dump the contents of the partitions into a shared folder with the VM, then use a live media to copy those contents over into the hard disk image and finally install a bootloader to work with the Windows boot manager, but I’m all ears for what anyone has to say about it.

Thanks for reading and please let me know what you know!

  • enumerator4829@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    3
    ·
    23 hours ago

    Here be dragons. But basically:

    • Run a VM from contents of a physical disk: use ’dd’ to create disk image. If on linux, try to boot and fix all the errors, hopefully few.

    • Run VM as physical machine: other way around.

    You won’t find this in a tutorial. You need to understand concepts, read manuals, fit everything together, execute, fail and retry until it works.

    For Windows, I have no idea. Conceptually, I figure it’s similar.

    • Coki91@dormi.zoneOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      22 hours ago

      The Host is Linux (arch, btw) so just the guest would be Windows and im ready to squash errors too, so thanks for the heads up