0

I have a single 500 GB NVMe drive. I'm using GPT and I have the following partitions:

  1. 1G of ef00 / EFI System for /boot
  2. 4G of 8200 / Linux swap
  3. 245G of 8300 / Linux filesystem for a Linux install, my host/primary OS

The rest of the drive, 250G, is free space. I'd like to use it for my Windows 10 VM, virtualized with KVM, while avoiding as much overhead as possible. I've seen three approaches to this:

  1. Have a single large partition, and put a raw image on it.
  2. Have a second 8300 partition, and pass it as a disk to KVM.
  3. Software RAID trickery (the complexity is off-putting).

However, I was wondering, is there any way to let the Windows 10 installer take care of the free space partitioning for me, by giving it access to a certain range of sectors, and pretending that it's an actual standalone physical drive?

Alternatively, wouldn't it be possible for me to just pre-allocate all necessary partitions for Windows (namely a system partition, an MSR, a Windows partition, and a recovery tools partition, as described here), and somehow pass them to KVM?

And my theories aside, what's the best performance-first solution? I've googled this for a while, but no luck. Not even a single anecdote or casual comparison, not to mention proper benchmarks.

6
  • If you give the raw free partition as a device to KVM the Windows Installer will see it as a disk and partition it. However you lose a lot of flexibility if you have not multiple images and snapshots, so maybe raw partition is not the best thing to do.
    – eckes
    Jun 25, 2017 at 16:07
  • My main concern is that there's an unnecessary level of abstraction: Windows 10 will be allocating partitions inside another partition. I'm trying to find out how much overhead that introduces, if any, and whether it's possible to skip this abstraction.
    – Alec Mev
    Jun 25, 2017 at 16:30
  • Partitions are no overhead, the device driver basically only gets start/stop sectors from it. There is no enforcement layer. It is only minor space wasted, but not sure if there is a way around it. You could skip the recovery/repair partition however.
    – eckes
    Jun 25, 2017 at 16:32
  • Okay, thanks for the information! I'll use a second partition then. About your note in the first comment, what kind of flexibility are you talking about? Being able to move/resize VM's image?
    – Alec Mev
    Jun 25, 2017 at 16:41
  • Snapshots and Clones mostly.
    – eckes
    Jun 25, 2017 at 16:42

1 Answer 1

1

So there are two levels to consider, in the Windows guest having a single system drive with multiple partitions is probably the easiest to setup. It is also low overhead since a partition table (or dynamic disk meta data) is basically only a mapping of sector offsets.

On the host you can provide a disk from a physical disk or a disk partition or a logical volume. Those three options basically have the same overhead (negligible sector offset calculations).

If you put the device in a file then the overhead is a bit bigger since it has to go through the filesystem translation layer.

I would probably go with a logical volume or even file to have the flexibility benefit of multiple clones, snapshots and be able to resize. That depends on what are you doing. If you regularly have to try different software and Windows versions it is better to have a less static setup. With fixed volumes you get the performance advantage of avoiding the host filesystem.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .