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.
use
ls -l /dev/disk/by-id

lsblk
to get the id by with the mount points

add
<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'/>
</disk>
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,

and

service apparmor restart

pass entire sata controller to device

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

 

sources:

heiko-sieger.info: Really comprehensive guide (see part 8)

https://level1techs.com/article/ryzen-gpu-passthrough-setup-guide-fedora-26-windows-gaming-linux

2 Comment

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

  2. Kees says: Reply

    pass entire device to VM

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

    lsblk
    to get the id by with the mount points

    add

    Where should I add? What file?

Leave a Reply

Wir benutzen Cookies um die Nutzerfreundlichkeit der Webseite zu verbessen. Durch Deinen Besuch stimmst Du dem zu.