Switching from VirtualBox to KVM/QEMU

I switched Linux distributions and the new one dose not have VirtualBox in its repository (Fedora). I do not want to use external Resources where possible so I had to switch. I wanted to do this for a good while now but finally did it LOL. Below I will document the Stuff I had to do, figure out and find. A LOT of stuff I did I did find online. I linked to the posts and entries of the respective pages, they did most of the hard work.


Converting VDI to QCOW2:

Thanks to "Computing for Geeks" for documenting this, link is in the Sources! QEMU dose not support the VDI images of VirtualBox. The only way I found was to flatten the images (Delete every snapshot from new to old) and then use the tool qemu-img. It converted my IMG no problem and I could create a new Virtual Machine in virt-manager (Virtual Machine Manager) and use it as the Image to use it on. From there I configured my Machines as needed.

qemu-img convert -p -O qcow2 WinShit10.vdi WinShit10.qcow2


Driver:

First you will have to uninstall the VirtualBox drivers. On Windows just uninstall it and hope it works. On Linux just use this command with your version:

sudo /opt/VBoxGuestAdditions-X.X.X/uninstall.sh

Reboot!

In the VMs you will then need the QEMU/KVM driver for Linux and Windows.
On Linux you need:"spice-vdagent xserver-xorg-video-qxl spice-webdavd".

After that you just need to enable its service and maybe reboot.
sudo systemctl enable --now spice-vdagentd

If the config is missing, by default it just uses channel 0 so you can use a default configuration:
sudo nano /etc/spice-vdagentd/vdagentd.conf

Then paste the following:
port = 0

And on Windows grab yourself the latest unofficial driver ISO and mount it. hen install the driver and Tool:

https://github.com/virtio-win/virtio-win-pkg-scripts/blob/master/README.md

Spice Resolution Limit fix (Tested only on Linux):

Spice has with QXL a limit of 2560x1600. It is really fast but that limitation is an issue if you have a stupid wide (5120x1440) display and want the VM fullscreen. For that I just changed the Virtual Machine “Video"-Settings of my VM from “QXL to “Virtio". It is slower, dose (I think) not really use Spice but it works for basic stuff.


BluRay/DiskDrive full passthrough:

That was an annoying one. A BIG THANKS goes to "stevenewbs" on GitHub. Without their Blog entry I would probably never figured this out. I searched the internet up and down and the way everyone dose it is different LOL. But this worked for me:

https://github.com/stevenewbs/blog/blob/master/libvirtd%20qemu%20Blu%20Ray%20passthrough.md

I opened the VM-Details and clicked "Add Hardware", selected "Controller" and inserted this XML:

<controller type='scsi' index='0' model='virtio-scsi'>
   <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/>
</controller>

Now that the SCSI/SATA controller is faked I still needed to attach my BluRay drive to it. First I had to find out what SSCI-ID my drive has.

lsscsi

The output will show all SATA/SSCI devices. At the very beginning it will have a 4 numbered ID. You need the FIRST NUMBER. E.G. "9:0:0:0" would mean that at the end of "scsi_host" you add the number 9!
Now I have everything to insert the XML. In virt-manager I again used "Add Hardware" in my VMs-Details and selected "PCI Host Device". Then switched to XML and inserted the XML below:

<hostdev mode="subsystem" type="scsi" managed="no">
   <source>
      <adapter name="scsi_host9"/>
      <address bus="0" target="0" unit="0"/>
   </source>
   <readonly/>
   <address type="drive" controller="0" bus="0" target="0" unit="0"/>
</hostdev>

After all that my VM booted with no error and all software I used had FULL ACCESS to the SATA-BluRay drive!


File shearing:

WIP. Still searching... .


Sources: