virt-install with kvm=off option
Okay I actually found it out with a friend... It's very easy, the corresponding option for qemu -cpu kvm=off is --features kvm_hidden=on
. You just have to read the man-page of virt-install:
http://manpages.ubuntu.com/manpages/xenial/man1/virt-install.1.html
> --features kvm_hidden=on
> Allow the KVM hypervisor signature to be hidden from the guest
The full line in my case then would be:
virt-install --name GamingTest1 --boot uefi \
--vcpus=2 --ram 1024 --os-variant ubuntu16.04 \
--cdrom=/media/ubuntu.iso \
--graphics vnc --disk none --livecd --wait 0 \
--cpu host, --features kvm_hidden=on \
--host-device=pci_0000_01_00_0 --host-device=pci_0000_01_00_1
Related videos on Youtube
Felix H
Updated on September 18, 2022Comments
-
Felix H over 1 year
I am trying to setup a virtual machine with qemu-kvm by using virt-install. I want to pass a NVIDIA GPU to the VM but the nvidia driver does not continue to load the passthrough device, googling says that the driver recognizes the graphics card to be a consumer graphics card (nvidia gtx 1060) and the machine is a VM --> not supported.
Anyway a lot of people (even on the nvidia-forum) stated that when you disable the obvious flags for telling the OS it's a VM it works. The qemu-switch for that is kvm=off. I tried to use it with this line:
virt-install --name GamingTest1 --boot uefi \ --vcpus=2 --ram 1024 --os-variant ubuntu16.04 \ --cdrom=/media/ubuntu.iso \ --graphics vnc --disk none --livecd --wait 0 \ --cpu host,kvm=off \ --host-device=pci_0000_01_00_0 --host-device=pci_0000_01_00_1
the error-message provided then is just
ERROR Unknown options ['kvm']
It does not work with -cpu kvm=off or --cpu host,kvm=off too... just not recognized. It obviously works on fedora regarding to this link: http://www.laketide.com/setting-up-gpu-passthrough-with-kvm-on-fedora/ but I'd like to get it working on Ubuntu =).
Can anyone help me to get this flag into the qemu-kvm Hypervisor? virsh commands afterwards etc. are good too. I am using Ubuntu Server 16.04.2 LTS (no gui!), Kernel 4.10, qemu-version 2.5