Date: Sat, 27 Apr 2024 15:08:40 +0200 From: Mario Marietto <marietto2008@gmail.com> To: freebsd-drivers@freebsd.org, freebsd-x11@freebsd.org, freebsd-hackers <freebsd-hackers@freebsd.org>, FreeBSD Mailing List <freebsd-questions@freebsd.org>, FreeBSD virtualization <freebsd-virtualization@freebsd.org> Subject: How to use Virtio GPU on FreeBSD as guest OS. Message-ID: <CA%2B1FSih=g6UYa=2Pi5WRLFKxPq7K-twgns=aeAKeQ_hoY1s6kQ@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
--000000000000449a38061713baff Content-Type: text/plain; charset="UTF-8" Hello. I've virtualized FreeBSD 14 on Windows 11 with qemu using the Hyper-V as a hypervisor. The parameters that I've used to launch the vm are the following ones : qemu-system-x86_64w.exe -accel whpx -machine q35 \ -cpu kvm64,hv_relaxed,hv_time,hv_synic -m 8G -vga virtio \ -display gtk,gl=on -audiodev dsound,id=snd0 -device ich9-intel-hda \ -device hda-duplex,audiodev=snd0 \ -hda "I:\Backup\FreeBSD\FreeBSD-140-zfs.img" \ -drive file=\\.\PhysicalDrive8 -rtc base=localtime \ -device usb-ehci,id=usb,bus=pcie.0,addr=0x3 -device usb-tablet \ -device usb-kbd -smbios type=2 -nodefaults \ -netdev tap,id=mynet0,ifname="OpenVPN-TAP-Windows",script=no,downscript=no \ -device e1000,netdev=mynet0,mac=52:55:00:d1:55:01 \ -device ich9-ahci,id=sata \ -bios "I:\OS\qemu\FreeBSD\OSX-KVM-master\OVMF_combined.fd" as you can see as graphic adapter I've added : -vga virtio -display gtk,gl=on That's because I want to use the virtio GPU instead of the VMware SVGA,but I'm not able to make it work. On FreeBSD 14.0 guest os I did : # lspci 00:01.0 : VGA compatible controller : Red Hat Inc. Virtio 1.0 GPU (rev. 01) and then,I've added on /boot/loader.conf the following kernel modules : virtio_load="YES" virtio_pci_load="YES" virtio_blk_load="YES" virtio_balloon_load="YES" I tried to load the virtio kernel modules manually : [root@marietto /home/marietto]==> kldload virtio kldload: can't load virtio: module already loaded or in kernel [root@marietto /home/marietto]==> kldload virtio_pci kldload: can't load virtio_pci: module already loaded or in kernel [root@marietto /home/marietto]==> kldload virtio_blk kldload: can't load virtio_blk: module already loaded or in kernel [root@marietto /home/marietto]==> kldload virtio_balloon kldload: can't load virtio_balloon: module already loaded or in kernel At this point,I've tried to use two different xorg.conf files to see what happened : nano /etc/X11/xorg.conf : Section "Device" Identifier "Card0" Driver "modesetting" BusID "PCI:0:1:0" Xorg.1.log.modesetting : https://pastebin.ubuntu.com/p/JYbks5yNnV/ nano /etc/X11/xorg.conf : Section "Device" Identifier "Card0" Driver "virtio" BusID "PCI:0:1:0" Xorg.1.log.virtio : https://pastebin.ubuntu.com/p/tt9Pnd5Zz4/ None of them worked. Can you give some suggestions ? FULL thread : https://forums.freebsd.org/threads/how-to-virtualize-freebsd-14-release-as-a-vm-on-top-of-windows-11-using-qemu-hyperv.93158/#post-652770 Mario. --000000000000449a38061713baff Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"> <p> Hello. </p><p> I've virtualized FreeBSD 14 on Windows 11 with qemu using the Hyper= -V as a hypervisor. </p><p> The parameters that I've used to launch the vm are the following on= es :=C2=A0 </p><pre><br>qemu-system-x86_64w.exe -accel whpx -machine q35 \ -cpu kvm64,hv_relaxed,hv_time,hv_synic -m 8G -vga virtio \<br>-display gtk,= gl=3Don -audiodev dsound,id=3Dsnd0 -device ich9-intel-hda \<br>-device hda-= duplex,audiodev=3Dsnd0 \<br>-hda "I:\Backup\FreeBSD\FreeBSD-140-zfs.im= g" \<br>-drive file=3D\\.\PhysicalDrive8 -rtc base=3Dlocaltime \<br>-d= evice usb-ehci,id=3Dusb,bus=3Dpcie.0,addr=3D0x3 -device usb-tablet \ -device usb-kbd -smbios type=3D2 -nodefaults \ -netdev tap,id=3Dmynet0,ifname=3D"OpenVPN-TAP-Windows",script=3Dn= o,downscript=3Dno \ -device e1000,netdev=3Dmynet0,mac=3D52:55:00:d1:55:01 \<br>-device ich9-ahc= i,id=3Dsata \<br>-bios "I:\OS\qemu\FreeBSD\OSX-KVM-master\OVMF_combine= d.fd"</pre><p> =20 </p><p><br> </p><p>as you can see as graphic adapter I've added :</p><p><br> </p><p> =20 </p><pre>-vga virtio -display gtk,gl=3Don<br><br></pre><p> That's because I want to use the virtio GPU instead of the VMware= =20 SVGA,but I'm not able to make it work. On FreeBSD 14.0 guest os I did : </p><p> =20 </p><pre><br># lspci=20 00:01.0 : VGA compatible controller : Red Hat Inc. Virtio 1.0 GPU (rev. 01)= </pre><p> =20 </p><p><br> </p><p>and then,I've added on /boot/loader.conf the following kerne= l modules : </p><pre><br>virtio_load=3D"YES"=20 virtio_pci_load=3D"YES"=20 virtio_blk_load=3D"YES"=20 virtio_balloon_load=3D"YES" </pre><p> =20 </p><p><br> </p><p>I tried to load the virtio kernel modules manually : </p><p> =20 </p><pre><br>[root@marietto /home/marietto]=3D=3D> kldload virtio kldl= oad: can't load virtio: module=20 already loaded or in kernel =20 [root@marietto /home/marietto]=3D=3D> kldload virtio_pci kldload: can= 9;t load virtio_pci:=20 module already loaded or in kernel =20 [root@marietto /home/marietto]=3D=3D> kldload virtio_blk kldload: can= 9;t load virtio_blk:=20 module already loaded or in kernel =20 [root@marietto /home/marietto]=3D=3D> kldload virtio_balloon kldload: ca= n't load=20 virtio_balloon: module already loaded or in kernel</pre><p><br> </p><p>At this point,I've tried to use two different xorg.conf file= s to see what happened : </p><pre><br>nano /etc/X11/xorg.conf : =20 Section "Device"=20 Identifier "Card0"=20 Driver "modesetting"=20 BusID "PCI:0:1:0" Xorg.1.log.modesetting : <a href=3D"https://pastebin.ubuntu.com/p/JYbks5yNn= V/">https://pastebin.ubuntu.com/p/JYbks5yNnV/</a> </pre><p> =20 </p><pre><br>nano /etc/X11/xorg.conf : =20 Section "Device"=20 Identifier "Card0"=20 Driver "virtio"=20 BusID "PCI:0:1:0" Xorg.1.log.virtio : <a href=3D"https://pastebin.ubuntu.com/p/tt9Pnd5Zz4/">h= ttps://pastebin.ubuntu.com/p/tt9Pnd5Zz4/</a> </pre><p> =20 </p><p><br> </p><p>None of them worked. Can you give some suggestions ? </p><p><br> </p><p>FULL thread :</p><p> </p> <p> <a class=3D"gmail-relative gmail-pointer-events-auto gmail-a gmail-hove= r:underline" href=3D"https://forums.freebsd.org/threads/how-to-virtualize-f= reebsd-14-release-as-a-vm-on-top-of-windows-11-using-qemu-hyperv.93158/#pos= t-652770" rel=3D"noopener nofollow ugc" target=3D"_blank">https://forums.fr= eebsd.org/threads/how-to-virtualize-freebsd-14-release-as-a-vm-on-top-of-wi= ndows-11-using-qemu-hyperv.93158/#post-652770</a> </p>=C2=A0 <span class=3D"gmail_signature_prefix"><br></span><div dir=3D"= ltr" class=3D"gmail_signature" data-smartmail=3D"gmail_signature">Mario.<br= ></div></div> --000000000000449a38061713baff--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2B1FSih=g6UYa=2Pi5WRLFKxPq7K-twgns=aeAKeQ_hoY1s6kQ>