Storage setup for virtual machines

still in draft

Use a raw image

This is pretty easy to accomplish with good performance.
For my 120GB SSD I created the raw image via:
fallocate -l 111G /media/vm/win10.img

edit the settings via the GUI.

In order to access the storage space in windows use the VirtIO windows drivers.
Select in the GUI the image, set it to VirtIO and use the driver (viostor\w10\amd64\viostor.inf) during installation of windows.

pass entire device to VM

in case a complete harddrive is passed to the VM, find out the correct device-id.
ls -l /dev/disk/by-id

to get the id by with the mount points

<disk type='block' device='disk'>
<driver name='qemu' type='raw'/>
<source dev='/dev/sdc'/>
<target dev='vdb' bus='sata'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
where <source dev=’/dev/sdc’/> should

On Ubuntu, when use this, take care of the apparmor first!

Edit the /etc/apparmor.d/abstractions/libvirt-qemu file and add your passed in device like this:

/dev/sdc rw,


service apparmor restart

pass entire sata controller to device

(only possible if conviniet immo group).
proceed as one would do with pci passthrough.


sources: Really comprehensive guide (see part 8)

1 Comment

  1. […] this guide I use a raw image container, see the storage post for further […]

Leave a Reply