-
Custom qemu build: is it possible?
Hello, I have GVT-D working in legacy mode on Windows 10 with i440fx machine type and the i915ovmf rom. (Intel UHD P630) I’m now trying to get it to work also with a MacOS Sequoia VM. There I’m forced to use q35 machine type otherwise I struggle to boot, which means that I would have to use UPT mode instead of legacy mode. A user in a discord channel of the i915ovmf rom has reported success with GVT-D and MacOS by patching the qemu source to remove the check of the device present at address 1f to allow legacy mode on q35. I was wondering if this would be possible to achieve also in Unraid? Searching the forum I found a post from @ich777 that mentioned a custom Qemu build. Thank you in advance.
-
Andrea3000 started following [7.1.2] Intel UHD 630 passthrough no longer works - Error 43
-
[7.1.2] Intel UHD 630 passthrough no longer works - Error 43
Hi, I have a Windows 10 VM with the iGPU passed-through. Initially it was a UHD 630 (Core i3-9100) and then became a UHD P630 when I upgraded to the Xeon E-2278G. It has always worked perfectly up until Unraid 6.12.15. Few days ago I upgraded to Unraid 7.1.2 and now the iGPU no longer works, triggering an Error 43 in Windows. This is the XML for the VM: <?xml version='1.0' encoding='UTF-8'?> <domain type='kvm' id='1'> <name>Windows 10</name> <uuid>4668e1a1-f982-e7a0-fd10-3915a90c7b3a</uuid> <metadata> <vmtemplate xmlns="unraid" name="Windows 10" icon="windows.png" os="windows10" iconold="windows.png" webui=""/> </metadata> <memory unit='KiB'>33554432</memory> <currentMemory unit='KiB'>33554432</currentMemory> <memoryBacking> <nosharepages/> </memoryBacking> <vcpu placement='static'>8</vcpu> <cputune> <vcpupin vcpu='0' cpuset='0'/> <vcpupin vcpu='1' cpuset='8'/> <vcpupin vcpu='2' cpuset='2'/> <vcpupin vcpu='3' cpuset='10'/> <vcpupin vcpu='4' cpuset='4'/> <vcpupin vcpu='5' cpuset='12'/> <vcpupin vcpu='6' cpuset='6'/> <vcpupin vcpu='7' cpuset='14'/> </cputune> <resource> <partition>/machine</partition> </resource> <os> <type arch='x86_64' machine='pc-i440fx-7.2'>hvm</type> <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi-tpm.fd</loader> <nvram>/etc/libvirt/qemu/nvram/4668e1a1-f982-e7a0-fd10-3915a90c7b3a_VARS-pure-efi-tpm.fd</nvram> </os> <features> <acpi/> <apic/> <hyperv mode='custom'> <relaxed state='on'/> <vapic state='on'/> <spinlocks state='on' retries='8191'/> <vpindex state='on'/> <synic state='on'/> <stimer state='on'/> <vendor_id state='on' value='none'/> </hyperv> </features> <cpu mode='host-passthrough' check='none' migratable='on'> <topology sockets='1' dies='1' cores='4' threads='2'/> <cache mode='passthrough'/> </cpu> <clock offset='localtime'> <timer name='hpet' present='no'/> <timer name='hypervclock' present='yes'/> </clock> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/local/sbin/qemu</emulator> <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='writeback' discard='ignore'/> <source file='/mnt/zfs/VMs/Windows 10/vdisk1.img' index='1'/> <backingStore/> <target dev='hdc' bus='virtio'/> <serial>vdisk1</serial> <boot order='1'/> <alias name='virtio-disk2'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/> </disk> <controller type='pci' index='0' model='pci-root'> <alias name='pci.0'/> </controller> <controller type='pci' index='1' model='pci-bridge'> <model name='pci-bridge'/> <target chassisNr='1'/> <alias name='pci.1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x0f' function='0x0'/> </controller> <controller type='pci' index='2' model='pci-bridge'> <model name='pci-bridge'/> <target chassisNr='2'/> <alias name='pci.2'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </controller> <controller type='pci' index='3' model='pci-bridge'> <model name='pci-bridge'/> <target chassisNr='3'/> <alias name='pci.3'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </controller> <controller type='pci' index='4' model='pci-bridge'> <model name='pci-bridge'/> <target chassisNr='4'/> <alias name='pci.4'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </controller> <controller type='pci' index='5' model='pci-bridge'> <model name='pci-bridge'/> <target chassisNr='5'/> <alias name='pci.5'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </controller> <controller type='pci' index='6' model='pci-bridge'> <model name='pci-bridge'/> <target chassisNr='6'/> <alias name='pci.6'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/> </controller> <controller type='pci' index='7' model='pci-bridge'> <model name='pci-bridge'/> <target chassisNr='7'/> <alias name='pci.7'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/> </controller> <controller type='virtio-serial' index='0'> <alias name='virtio-serial0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/> </controller> <controller type='usb' index='0' model='qemu-xhci' ports='15'> <alias name='usb'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> </controller> <interface type='bridge'> <mac address='52:54:00:08:9a:35'/> <source bridge='br0'/> <target dev='vnet0'/> <model type='virtio-net'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </interface> <serial type='pty'> <source path='/dev/pts/0'/> <target type='isa-serial' port='0'> <model name='isa-serial'/> </target> <alias name='serial0'/> </serial> <console type='pty' tty='/dev/pts/0'> <source path='/dev/pts/0'/> <target type='serial' port='0'/> <alias name='serial0'/> </console> <channel type='unix'> <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-1-Windows 10/org.qemu.guest_agent.0'/> <target type='virtio' name='org.qemu.guest_agent.0' state='disconnected'/> <alias name='channel0'/> <address type='virtio-serial' controller='0' bus='0' port='1'/> </channel> <input type='tablet' bus='usb'> <alias name='input0'/> <address type='usb' bus='0' port='1'/> </input> <input type='mouse' bus='ps2'> <alias name='input1'/> </input> <input type='keyboard' bus='ps2'> <alias name='input2'/> </input> <tpm model='tpm-tis'> <backend type='emulator' version='2.0' persistent_state='yes'/> <alias name='tpm0'/> </tpm> <graphics type='vnc' port='5900' autoport='yes' websocket='5700' listen='0.0.0.0' keymap='it' sharePolicy='ignore'> <listen type='address' address='0.0.0.0'/> </graphics> <audio id='1' type='none'/> <video> <model type='qxl' ram='131072' vram='65536' vram64='64512' vgamem='65536' heads='1' primary='yes'/> <alias name='video0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/> </video> <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </source> <alias name='hostdev0'/> <rom file='/mnt/zfs/data/i915dev/C246M-WU4-vbios.rom'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </hostdev> <memballoon model='none'/> </devices> <seclabel type='dynamic' model='dac' relabel='yes'> <label>+0:+100</label> <imagelabel>+0:+100</imagelabel> </seclabel> </domain> I've attached the diagnostics from 7.1.2, but I don't think that the log will show much about it. I've now downgraded back to 6.12.15 and the passthrough works again as usual. I can attach diagnostic for that too, if necessary jarvis-diagnostics-20250524_1818.zip
-
DiskSpeed, hdd/ssd benchmarking (unRAID 6+), version 2.10.10
Hi @jbartlett, is ZFS support now implemented or not yet?
-
Imported ZFS pool: None of the datasets are mounted
Thanks for the reply. Is there any plan to support multiple partitions in the GUI?
-
-
Imported ZFS pool: None of the datasets are mounted
Hi all, I have a raidz2 ZFS pool with 8 main drives and an optane drive that is split in 2 partitions, one assigned as SLOG device and the other as L2ARC. The pool was created under Unraid 6.11 using the ZFS plugin. Since upgrading to 6.12 (and the removal of the ZFS plugin), I've been manually mounting the ZFS pool at array start with a user script. Everything was working perfectly. I'm currently on 6.12.15 and I've decided to import the pool in Unraid to benefit from the extra UI integration. However, with the pool imported in Unraid and having disabled the script that manually mounts the pool, none of the datasets in the pool get mounted and the status in the bottom left on the Unraid page is stuck at Array starting - Mounting disks... If instead I manually mount the pool, it works correctly. I've attached the diagnostics before manually mounting the pool Also, you can find below the output of zfs list root@Jarvis:~# zfs list NAME USED AVAIL REFER MOUNTPOINT disk1 641G 282G 128K /mnt/disk1 disk1/appdata 9.53G 282G 9.53G /mnt/disk1/appdata disk1/data 11.1G 282G 11.1G /mnt/disk1/data disk1/docker 8.37G 282G 8.37G /mnt/disk1/docker disk1/dockers 96K 282G 96K /mnt/disk1/dockers disk1/domains 589G 282G 589G /mnt/disk1/domains disk1/isos 22.7G 282G 22.7G /mnt/disk1/isos disk1/libvirt 110M 282G 110M /mnt/disk1/libvirt disk1/system 38.2M 282G 38.2M /mnt/disk1/system zfs 8.70T 11.9T 273K /mnt/zfs zfs/Backup 1.28T 11.9T 1.28T /mnt/zfs/Backup zfs/Dati 1.85T 11.9T 1.22T /mnt/zfs/Dati zfs/Download 18.6G 11.9T 18.6G /mnt/zfs/Download zfs/Film 4.11T 11.9T 4.11T /mnt/zfs/Film zfs/Foto 687G 11.9T 673G /mnt/zfs/Foto zfs/Musica 5.00G 11.9T 4.99G /mnt/zfs/Musica zfs/TimeMachine 677G 11.9T 520G /mnt/zfs/TimeMachine zfs/test 110G 11.9T 110G /mnt/zfs/test zfs/test2 39.0M 11.9T 39.0M /mnt/zfs/test2 zfs/test4 5.55G 11.9T 5.55G /mnt/zfs/test4 zfs/test5 39.0M 11.9T 39.0M /mnt/zfs/test5 disk1 is the main Unraid array which is also formatted as ZFS and doesn't have any issue with mounting the datasets. The problematic pool is zfs Below you can find the output of zfs mount root@Jarvis:~# zfs mount disk1 /mnt/disk1 zfs /mnt/zfs I found this bug report that was describing the same issue that I'm encountering but in that case the culprit was the sharenfs feature being enabled which in my case is off for all datasets. Any suggestion on how to get the datasets to mount correctly? jarvis-diagnostics-20250128-2147.zip
-
HOW TO: Using SR-IOV in UnRAID with 1Gb/10Gb/40Gb network interface cards (NICs)
Hi @BVD, thank you very much for the very detailed guide. Do you know if this could work also for PCI-E GPUs with SR-IOV support?
-
Custom mount point for ZFS pool
Thanks @JorgeB I just upgraded to 6.12 and everything appears to be working as expected. I’m running the zpool import command from a user script that is set to run at first array start only. It works but I need to force a refresh of the ZFS master portion of the dashboard the first time I open the page. Almost as if the pool is mounted after the ZFS master plug-in scans for available ZFS pools. I will try to move the command to the go script to see if it makes a difference.
-
Custom mount point for ZFS pool
Thanks @JorgeB At the moment I'm not mounting it manually, it is done automatically by the ZFS plugin. Do you happen to know what would the command be to properly mount the zfs pool?
-
Custom mount point for ZFS pool
Hi, I’m currently still on Unraid 6.11. I have 1 standard array made of a single nvme drive that I use for dockers and VMs, and that is mounted as default. While the main data “array” is a 8x HDD ZFS pool that I created using the plug-in and that uses a custom mount point at /zfs. I have a lot of user scripts that access the datasets/pool using that custom mount point and I would like to keep those unchanged. If I upgrade to Unraid 6.12, is there a way: 1) Have 2 arrays. One for the fast NVME drive (either xfs or zfs) and one for the large (but slow) ZFS pool? 2) Keep the custom mount point for the zfs pool? Thanks Andrea
-
Can't create VM with "egl-headless" graphical framebuffer
Quick update on some findings. 1) I took the source code of eglinfo, which is a tool that is part of the mesa-tools and that lists the EGL capabilities of the system (the equivalent of glxinfo or EGL). 2) I modified the source code to implement the creation of the GBM surface in order to query the capabilities of off-screen rendering of the system, instead of on-screen. This is basically the equivalent of what QEMU does, in fact I copied the relevant portion from the QEMU source code. You can find the final code below: /* * eglinfo - like glxinfo but for EGL * * Brian Paul * 11 March 2005 * * Copyright (C) 2005 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include <epoxy/egl.h> #include <EGL/eglext.h> #include <assert.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <fcntl.h> #include <unistd.h> #include "gbm.h" #define MAX_CONFIGS 1000 #define MAX_MODES 1000 #define MAX_SCREENS 10 /* These are X visual types, so if you're running eglinfo under * something not X, they probably don't make sense. */ static const char *vnames[] = { "SG", "GS", "SC", "PC", "TC", "DC" }; /** * Print table of all available configurations. */ static void PrintConfigs(EGLDisplay d) { EGLConfig configs[MAX_CONFIGS]; EGLint numConfigs, i; eglGetConfigs(d, configs, MAX_CONFIGS, &numConfigs); printf("Configurations:\n"); printf(" bf lv colorbuffer dp st ms vis cav bi renderable supported\n"); printf(" id sz l r g b a th cl ns b id eat nd gl es es2 vg surfaces \n"); /* ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ * | | | | | | | | | | | | | | | | | | | * | | | | | | | | | | | | | | | | | | EGL_SURFACE_TYPE * | | | | | | | | | | | | | | EGL_RENDERABLE_TYPE * | | | | | | | | | | | | | EGL_BIND_TO_TEXTURE_RGB/EGL_BIND_TO_TEXTURE_RGBA * | | | | | | | | | | | | EGL_CONFIG_CAVEAT * | | | | | | | | | | | EGL_NATIVE_VISUAL_ID/EGL_NATIVE_VISUAL_TYPE * | | | | | | | | | | EGL_SAMPLE_BUFFERS * | | | | | | | | | EGL_SAMPLES * | | | | | | | | EGL_STENCIL_SIZE * | | | | | | | EGL_DEPTH_SIZE * | | | | | | EGL_ALPHA_SIZE * | | | | | EGL_BLUE_SIZE * | | | | EGL_GREEN_SIZE * | | | EGL_RED_SIZE * | | EGL_LEVEL * | EGL_BUFFER_SIZE * EGL_CONFIG_ID */ printf("---------------------------------------------------------------------\n"); for (i = 0; i < numConfigs; i++) { EGLint id, size, level; EGLint red, green, blue, alpha; EGLint depth, stencil; EGLint renderable, surfaces; EGLint vid, vtype, caveat, bindRgb, bindRgba; EGLint samples, sampleBuffers; char surfString[100] = ""; eglGetConfigAttrib(d, configs[i], EGL_CONFIG_ID, &id); eglGetConfigAttrib(d, configs[i], EGL_BUFFER_SIZE, &size); eglGetConfigAttrib(d, configs[i], EGL_LEVEL, &level); eglGetConfigAttrib(d, configs[i], EGL_RED_SIZE, &red); eglGetConfigAttrib(d, configs[i], EGL_GREEN_SIZE, &green); eglGetConfigAttrib(d, configs[i], EGL_BLUE_SIZE, &blue); eglGetConfigAttrib(d, configs[i], EGL_ALPHA_SIZE, &alpha); eglGetConfigAttrib(d, configs[i], EGL_DEPTH_SIZE, &depth); eglGetConfigAttrib(d, configs[i], EGL_STENCIL_SIZE, &stencil); eglGetConfigAttrib(d, configs[i], EGL_NATIVE_VISUAL_ID, &vid); eglGetConfigAttrib(d, configs[i], EGL_NATIVE_VISUAL_TYPE, &vtype); eglGetConfigAttrib(d, configs[i], EGL_CONFIG_CAVEAT, &caveat); eglGetConfigAttrib(d, configs[i], EGL_BIND_TO_TEXTURE_RGB, &bindRgb); eglGetConfigAttrib(d, configs[i], EGL_BIND_TO_TEXTURE_RGBA, &bindRgba); eglGetConfigAttrib(d, configs[i], EGL_RENDERABLE_TYPE, &renderable); eglGetConfigAttrib(d, configs[i], EGL_SURFACE_TYPE, &surfaces); eglGetConfigAttrib(d, configs[i], EGL_SAMPLES, &samples); eglGetConfigAttrib(d, configs[i], EGL_SAMPLE_BUFFERS, &sampleBuffers); if (surfaces & EGL_WINDOW_BIT) strcat(surfString, "win,"); if (surfaces & EGL_PBUFFER_BIT) strcat(surfString, "pb,"); if (surfaces & EGL_PIXMAP_BIT) strcat(surfString, "pix,"); if (surfaces & EGL_STREAM_BIT_KHR) strcat(surfString, "str,"); if (strlen(surfString) > 0) surfString[strlen(surfString) - 1] = 0; printf("0x%02x %2d %2d %2d %2d %2d %2d %2d %2d %2d%2d 0x%02x%s ", id, size, level, red, green, blue, alpha, depth, stencil, samples, sampleBuffers, vid, vtype < 6 ? vnames[vtype] : "--"); printf(" %c %c %c %c %c %c %s\n", (caveat != EGL_NONE) ? 'y' : ' ', (bindRgba) ? 'a' : (bindRgb) ? 'y' : ' ', (renderable & EGL_OPENGL_BIT) ? 'y' : ' ', (renderable & EGL_OPENGL_ES_BIT) ? 'y' : ' ', (renderable & EGL_OPENGL_ES2_BIT) ? 'y' : ' ', (renderable & EGL_OPENVG_BIT) ? 'y' : ' ', surfString); } } static const char * PrintExtensions(EGLDisplay d) { const char *extensions, *p, *end, *next; int column; puts(d == EGL_NO_DISPLAY ? "EGL client extensions string:" : "EGL extensions string:"); extensions = eglQueryString(d, EGL_EXTENSIONS); if (!extensions) return NULL; column = 0; end = extensions + strlen(extensions); for (p = extensions; p < end; p = next + 1) { next = strchr(p, ' '); if (next == NULL) next = end; if (column > 0 && column + next - p + 1 > 70) { printf("\n"); column = 0; } if (column == 0) printf(" "); else printf(" "); column += next - p + 1; printf("%.*s", (int) (next - p), p); p = next + 1; } if (column > 0) printf("\n"); return extensions; } const char *egl_get_error_string(void) { EGLint error = eglGetError(); switch (error) { case EGL_SUCCESS: return "EGL_SUCCESS"; case EGL_NOT_INITIALIZED: return "EGL_NOT_INITIALIZED"; case EGL_BAD_ACCESS: return "EGL_BAD_ACCESS"; case EGL_BAD_ALLOC: return "EGL_BAD_ALLOC"; case EGL_BAD_ATTRIBUTE: return "EGL_BAD_ATTRIBUTE"; case EGL_BAD_CONTEXT: return "EGL_BAD_CONTEXT"; case EGL_BAD_CONFIG: return "EGL_BAD_CONFIG"; case EGL_BAD_CURRENT_SURFACE: return "EGL_BAD_CURRENT_SURFACE"; case EGL_BAD_DISPLAY: return "EGL_BAD_DISPLAY"; case EGL_BAD_SURFACE: return "EGL_BAD_SURFACE"; case EGL_BAD_MATCH: return "EGL_BAD_MATCH"; case EGL_BAD_PARAMETER: return "EGL_BAD_PARAMETER"; case EGL_BAD_NATIVE_PIXMAP: return "EGL_BAD_NATIVE_PIXMAP"; case EGL_BAD_NATIVE_WINDOW: return "EGL_BAD_NATIVE_WINDOW"; case EGL_CONTEXT_LOST: return "EGL_CONTEXT_LOST"; default: return "Unknown EGL error"; } } static int doOneDisplay(EGLDisplay d, const char *name) { int maj, min; printf("%s:\n", name); if (!eglInitialize(d, &maj, &min)) { printf("eglinfo: eglInitialize failed\n\n"); return 1; } printf("EGL API version: %d.%d\n", maj, min); printf("EGL vendor string: %s\n", eglQueryString(d, EGL_VENDOR)); printf("EGL version string: %s\n", eglQueryString(d, EGL_VERSION)); #ifdef EGL_VERSION_1_2 printf("EGL client APIs: %s\n", eglQueryString(d, EGL_CLIENT_APIS)); #endif PrintExtensions(d); PrintConfigs(d); eglTerminate(d); printf("\n"); return 0; } int qemu_egl_rn_fd; struct gbm_device *qemu_egl_rn_gbm_dev; int egl_rendernode_init(const char *rendernode) { qemu_egl_rn_fd = -1; int rc; qemu_egl_rn_fd = open(rendernode, O_RDWR | O_CLOEXEC | O_NOCTTY | O_NONBLOCK); if (qemu_egl_rn_fd == -1) { printf("egl: no drm render node available\n"); goto err; } qemu_egl_rn_gbm_dev = gbm_create_device(qemu_egl_rn_fd); if (!qemu_egl_rn_gbm_dev) { printf("egl: gbm_create_device failed\n"); goto err; } return 0; err: if (qemu_egl_rn_gbm_dev) { gbm_device_destroy(qemu_egl_rn_gbm_dev); } if (qemu_egl_rn_fd != -1) { close(qemu_egl_rn_fd); } return -1; } int main(int argc, char *argv[]) { int ret = 0; const char *clientext; char *rendernode; if (argc > 1) { rendernode = argv[1]; } clientext = PrintExtensions(EGL_NO_DISPLAY); printf("\n"); if (strstr(clientext, "EGL_EXT_platform_base")) { PFNEGLGETPLATFORMDISPLAYEXTPROC getPlatformDisplay = (PFNEGLGETPLATFORMDISPLAYEXTPROC) eglGetProcAddress( "eglGetPlatformDisplayEXT"); if (strstr(clientext, "EGL_MESA_platform_gbm") || strstr(clientext, "EGL_KHR_platform_gbm")) ret += doOneDisplay(getPlatformDisplay(EGL_PLATFORM_GBM_MESA, (EGLNativeDisplayType)qemu_egl_rn_gbm_dev, NULL), "GBM platform"); } else { egl_rendernode_init(rendernode); EGLDisplay *egl_display = eglGetDisplay((EGLNativeDisplayType)qemu_egl_rn_gbm_dev); if (egl_display == EGL_NO_DISPLAY) { printf("egl: eglGetDisplay failed: %s\n", egl_get_error_string()); if (qemu_egl_rn_gbm_dev) { gbm_device_destroy(qemu_egl_rn_gbm_dev); } if (qemu_egl_rn_fd != -1) { close(qemu_egl_rn_fd); } return 0; } ret = doOneDisplay(egl_display, "GBM platform"); } return ret; } 3) I was then able to see what was the error code...which is actually EGL_SUCCESS!! Despite still returning EGL_NO_DISPLAY 4) I then created a Slackware 15.0 VM on Unraid and I passed through the IGPU. 5) Running the code above on the stock Slackware VM produces the following output: EGL client extensions string: EGL_EXT_device_base EGL_EXT_device_enumeration EGL_EXT_device_query EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses EGL_EXT_client_extensions EGL_KHR_debug EGL_EXT_platform_device EGL_EXT_platform_wayland EGL_KHR_platform_wayland EGL_EXT_platform_x11 EGL_KHR_platform_x11 EGL_MESA_platform_xcb EGL_MESA_platform_gbm EGL_KHR_platform_gbm EGL_MESA_platform_surfaceless GBM platform: EGL API version: 1.5 EGL vendor string: Mesa Project EGL version string: 1.5 EGL client APIs: OpenGL OpenGL_ES EGL extensions string: EGL_ANDROID_blob_cache EGL_ANDROID_native_fence_sync EGL_EXT_buffer_age EGL_EXT_create_context_robustness EGL_EXT_image_dma_buf_import EGL_EXT_image_dma_buf_import_modifiers EGL_IMG_context_priority EGL_KHR_cl_event2 EGL_KHR_config_attribs EGL_KHR_create_context EGL_KHR_create_context_no_error EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses EGL_KHR_gl_colorspace EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_no_config_context EGL_KHR_reusable_sync EGL_KHR_surfaceless_context EGL_EXT_pixel_format_float EGL_KHR_wait_sync EGL_MESA_configless_context EGL_MESA_drm_image EGL_MESA_image_dma_buf_export EGL_MESA_query_driver EGL_WL_bind_wayland_display Configurations: bf lv colorbuffer dp st ms vis cav bi renderable supported id sz l r g b a th cl ns b id eat nd gl es es2 vg surfaces --------------------------------------------------------------------- 0x01 32 0 10 10 10 2 0 0 0 0 0x30335241-- y y y win 0x02 32 0 10 10 10 2 16 0 0 0 0x30335241-- y y y win 0x03 32 0 10 10 10 2 24 0 0 0 0x30335241-- y y y win 0x04 32 0 10 10 10 2 24 8 0 0 0x30335241-- y y y win 0x05 32 0 10 10 10 2 0 0 2 1 0x30335241-- y y y win 0x06 32 0 10 10 10 2 0 0 4 1 0x30335241-- y y y win 0x07 32 0 10 10 10 2 0 0 8 1 0x30335241-- y y y win 0x08 32 0 10 10 10 2 0 0 16 1 0x30335241-- y y y win 0x09 32 0 10 10 10 2 16 0 2 1 0x30335241-- y y y win 0x0a 32 0 10 10 10 2 16 0 4 1 0x30335241-- y y y win 0x0b 32 0 10 10 10 2 16 0 8 1 0x30335241-- y y y win 0x0c 32 0 10 10 10 2 16 0 16 1 0x30335241-- y y y win 0x0d 32 0 10 10 10 2 24 0 2 1 0x30335241-- y y y win 0x0e 32 0 10 10 10 2 24 0 4 1 0x30335241-- y y y win 0x0f 32 0 10 10 10 2 24 0 8 1 0x30335241-- y y y win 0x10 32 0 10 10 10 2 24 0 16 1 0x30335241-- y y y win 0x11 32 0 10 10 10 2 24 8 2 1 0x30335241-- y y y win 0x12 32 0 10 10 10 2 24 8 4 1 0x30335241-- y y y win 0x13 32 0 10 10 10 2 24 8 8 1 0x30335241-- y y y win 0x14 32 0 10 10 10 2 24 8 16 1 0x30335241-- y y y win 0x15 30 0 10 10 10 0 0 0 0 0 0x30335258-- y y y win 0x16 30 0 10 10 10 0 16 0 0 0 0x30335258-- y y y win 0x17 30 0 10 10 10 0 24 0 0 0 0x30335258-- y y y win 0x18 30 0 10 10 10 0 24 8 0 0 0x30335258-- y y y win 0x19 30 0 10 10 10 0 0 0 2 1 0x30335258-- y y y win 0x1a 30 0 10 10 10 0 0 0 4 1 0x30335258-- y y y win 0x1b 30 0 10 10 10 0 0 0 8 1 0x30335258-- y y y win 0x1c 30 0 10 10 10 0 0 0 16 1 0x30335258-- y y y win 0x1d 30 0 10 10 10 0 16 0 2 1 0x30335258-- y y y win 0x1e 30 0 10 10 10 0 16 0 4 1 0x30335258-- y y y win 0x1f 30 0 10 10 10 0 16 0 8 1 0x30335258-- y y y win 0x20 30 0 10 10 10 0 16 0 16 1 0x30335258-- y y y win 0x21 30 0 10 10 10 0 24 0 2 1 0x30335258-- y y y win 0x22 30 0 10 10 10 0 24 0 4 1 0x30335258-- y y y win 0x23 30 0 10 10 10 0 24 0 8 1 0x30335258-- y y y win 0x24 30 0 10 10 10 0 24 0 16 1 0x30335258-- y y y win 0x25 30 0 10 10 10 0 24 8 2 1 0x30335258-- y y y win 0x26 30 0 10 10 10 0 24 8 4 1 0x30335258-- y y y win 0x27 30 0 10 10 10 0 24 8 8 1 0x30335258-- y y y win 0x28 30 0 10 10 10 0 24 8 16 1 0x30335258-- y y y win 0x29 32 0 8 8 8 8 0 0 0 0 0x34325241-- y y y win 0x2a 32 0 8 8 8 8 16 0 0 0 0x34325241-- y y y win 0x2b 32 0 8 8 8 8 24 0 0 0 0x34325241-- y y y win 0x2c 32 0 8 8 8 8 24 8 0 0 0x34325241-- y y y win 0x2d 32 0 8 8 8 8 0 0 2 1 0x34325241-- y y y win 0x2e 32 0 8 8 8 8 0 0 4 1 0x34325241-- y y y win 0x2f 32 0 8 8 8 8 0 0 8 1 0x34325241-- y y y win 0x30 32 0 8 8 8 8 0 0 16 1 0x34325241-- y y y win 0x31 32 0 8 8 8 8 16 0 2 1 0x34325241-- y y y win 0x32 32 0 8 8 8 8 16 0 4 1 0x34325241-- y y y win 0x33 32 0 8 8 8 8 16 0 8 1 0x34325241-- y y y win 0x34 32 0 8 8 8 8 16 0 16 1 0x34325241-- y y y win 0x35 32 0 8 8 8 8 24 0 2 1 0x34325241-- y y y win 0x36 32 0 8 8 8 8 24 0 4 1 0x34325241-- y y y win 0x37 32 0 8 8 8 8 24 0 8 1 0x34325241-- y y y win 0x38 32 0 8 8 8 8 24 0 16 1 0x34325241-- y y y win 0x39 32 0 8 8 8 8 24 8 2 1 0x34325241-- y y y win 0x3a 32 0 8 8 8 8 24 8 4 1 0x34325241-- y y y win 0x3b 32 0 8 8 8 8 24 8 8 1 0x34325241-- y y y win 0x3c 32 0 8 8 8 8 24 8 16 1 0x34325241-- y y y win 0x3d 24 0 8 8 8 0 0 0 0 0 0x34325258-- y y y win 0x3e 24 0 8 8 8 0 16 0 0 0 0x34325258-- y y y win 0x3f 24 0 8 8 8 0 24 0 0 0 0x34325258-- y y y win 0x40 24 0 8 8 8 0 24 8 0 0 0x34325258-- y y y win 0x41 24 0 8 8 8 0 0 0 2 1 0x34325258-- y y y win 0x42 24 0 8 8 8 0 0 0 4 1 0x34325258-- y y y win 0x43 24 0 8 8 8 0 0 0 8 1 0x34325258-- y y y win 0x44 24 0 8 8 8 0 0 0 16 1 0x34325258-- y y y win 0x45 24 0 8 8 8 0 16 0 2 1 0x34325258-- y y y win 0x46 24 0 8 8 8 0 16 0 4 1 0x34325258-- y y y win 0x47 24 0 8 8 8 0 16 0 8 1 0x34325258-- y y y win 0x48 24 0 8 8 8 0 16 0 16 1 0x34325258-- y y y win 0x49 24 0 8 8 8 0 24 0 2 1 0x34325258-- y y y win 0x4a 24 0 8 8 8 0 24 0 4 1 0x34325258-- y y y win 0x4b 24 0 8 8 8 0 24 0 8 1 0x34325258-- y y y win 0x4c 24 0 8 8 8 0 24 0 16 1 0x34325258-- y y y win 0x4d 24 0 8 8 8 0 24 8 2 1 0x34325258-- y y y win 0x4e 24 0 8 8 8 0 24 8 4 1 0x34325258-- y y y win 0x4f 24 0 8 8 8 0 24 8 8 1 0x34325258-- y y y win 0x50 24 0 8 8 8 0 24 8 16 1 0x34325258-- y y y win 0x51 16 0 5 6 5 0 0 0 0 0 0x36314752-- y y y win 0x52 16 0 5 6 5 0 16 0 0 0 0x36314752-- y y y win 0x53 16 0 5 6 5 0 24 0 0 0 0x36314752-- y y y win 0x54 16 0 5 6 5 0 24 8 0 0 0x36314752-- y y y win 0x55 16 0 5 6 5 0 0 0 2 1 0x36314752-- y y y win 0x56 16 0 5 6 5 0 0 0 4 1 0x36314752-- y y y win 0x57 16 0 5 6 5 0 0 0 8 1 0x36314752-- y y y win 0x58 16 0 5 6 5 0 0 0 16 1 0x36314752-- y y y win 0x59 16 0 5 6 5 0 16 0 2 1 0x36314752-- y y y win 0x5a 16 0 5 6 5 0 16 0 4 1 0x36314752-- y y y win 0x5b 16 0 5 6 5 0 16 0 8 1 0x36314752-- y y y win 0x5c 16 0 5 6 5 0 16 0 16 1 0x36314752-- y y y win 0x5d 16 0 5 6 5 0 24 0 2 1 0x36314752-- y y y win 0x5e 16 0 5 6 5 0 24 0 4 1 0x36314752-- y y y win 0x5f 16 0 5 6 5 0 24 0 8 1 0x36314752-- y y y win 0x60 16 0 5 6 5 0 24 0 16 1 0x36314752-- y y y win 0x61 16 0 5 6 5 0 24 8 2 1 0x36314752-- y y y win 0x62 16 0 5 6 5 0 24 8 4 1 0x36314752-- y y y win 0x63 16 0 5 6 5 0 24 8 8 1 0x36314752-- y y y win 0x64 16 0 5 6 5 0 24 8 16 1 0x36314752-- y y y win 0x65 64 0 16 16 16 16 0 0 0 0 0x48344241-- y y y win 0x66 64 0 16 16 16 16 16 0 0 0 0x48344241-- y y y win 0x67 64 0 16 16 16 16 24 0 0 0 0x48344241-- y y y win 0x68 64 0 16 16 16 16 24 8 0 0 0x48344241-- y y y win 0x69 64 0 16 16 16 16 0 0 2 1 0x48344241-- y y y win 0x6a 64 0 16 16 16 16 0 0 4 1 0x48344241-- y y y win 0x6b 64 0 16 16 16 16 0 0 8 1 0x48344241-- y y y win 0x6c 64 0 16 16 16 16 0 0 16 1 0x48344241-- y y y win 0x6d 64 0 16 16 16 16 16 0 2 1 0x48344241-- y y y win 0x6e 64 0 16 16 16 16 16 0 4 1 0x48344241-- y y y win 0x6f 64 0 16 16 16 16 16 0 8 1 0x48344241-- y y y win 0x70 64 0 16 16 16 16 16 0 16 1 0x48344241-- y y y win 0x71 64 0 16 16 16 16 24 0 2 1 0x48344241-- y y y win 0x72 64 0 16 16 16 16 24 0 4 1 0x48344241-- y y y win 0x73 64 0 16 16 16 16 24 0 8 1 0x48344241-- y y y win 0x74 64 0 16 16 16 16 24 0 16 1 0x48344241-- y y y win 0x75 64 0 16 16 16 16 24 8 2 1 0x48344241-- y y y win 0x76 64 0 16 16 16 16 24 8 4 1 0x48344241-- y y y win 0x77 64 0 16 16 16 16 24 8 8 1 0x48344241-- y y y win 0x78 64 0 16 16 16 16 24 8 16 1 0x48344241-- y y y win 0x79 48 0 16 16 16 0 0 0 0 0 0x48344258-- y y y win 0x7a 48 0 16 16 16 0 16 0 0 0 0x48344258-- y y y win 0x7b 48 0 16 16 16 0 24 0 0 0 0x48344258-- y y y win 0x7c 48 0 16 16 16 0 24 8 0 0 0x48344258-- y y y win 0x7d 48 0 16 16 16 0 0 0 2 1 0x48344258-- y y y win 0x7e 48 0 16 16 16 0 0 0 4 1 0x48344258-- y y y win 0x7f 48 0 16 16 16 0 0 0 8 1 0x48344258-- y y y win 0x80 48 0 16 16 16 0 0 0 16 1 0x48344258-- y y y win 0x81 48 0 16 16 16 0 16 0 2 1 0x48344258-- y y y win 0x82 48 0 16 16 16 0 16 0 4 1 0x48344258-- y y y win 0x83 48 0 16 16 16 0 16 0 8 1 0x48344258-- y y y win 0x84 48 0 16 16 16 0 16 0 16 1 0x48344258-- y y y win 0x85 48 0 16 16 16 0 24 0 2 1 0x48344258-- y y y win 0x86 48 0 16 16 16 0 24 0 4 1 0x48344258-- y y y win 0x87 48 0 16 16 16 0 24 0 8 1 0x48344258-- y y y win 0x88 48 0 16 16 16 0 24 0 16 1 0x48344258-- y y y win 0x89 48 0 16 16 16 0 24 8 2 1 0x48344258-- y y y win 0x8a 48 0 16 16 16 0 24 8 4 1 0x48344258-- y y y win 0x8b 48 0 16 16 16 0 24 8 8 1 0x48344258-- y y y win 0x8c 48 0 16 16 16 0 24 8 16 1 0x48344258-- y y y win Here everything works and the tool shows support to EGL_MESA_platform_gbm which is required for off-screen rendering. 6) Instead, running the same code on Unraid produces the following output: EGL client extensions string: egl: eglGetDisplay failed: EGL_SUCCESS As you can see, the GPU driver on Unraid doesn't support any EGL extension, making off-screen rendering impossible! I've raised a bug on the bug reporting section of the forum, because QEMU is compiled with OpenGL support but the GPU drivers that are shipped with Unraid are the limiting factor to make QEMU work correctly with OpenGL:
-
Andrea3000 started following QEMU doesn't fully support OpenGL
-
QEMU doesn't fully support OpenGL
Despite the fact that QEMU is compiled with OpenGL support since 6.10, not all elements are in place for it to work. I can't create a VM with "egl-headless" graphical framebuffer. I've created a post in the VM forum to explain the steps I made: To follow-up from that post I modified the eglinfo executable to create a GBM surface like QEMU does and to check what the error code is. The error code is surprisingly "EGL_SUCCESS", but it still returns "EGL_NO_DISPLAY" I dug a bit deeper with the modded eglinfo executable and I found out that on Unraid there aren't any supported EGL client extensions, in particular it's missing the crucial "EGL_MESA_platform_gbm" and "EGL_KHR_platform_gbm". Without those extensions, off-screen rendering isn't possible and egl-headless can't work. Have those extensions been removed for a reason?
-
Can't create VM with "egl-headless" graphical framebuffer
Thanks. In the meantime I will keep investigating because I would like to find a solution without having to wait for the next Unraid release
-
Can't create VM with "egl-headless" graphical framebuffer
I have a supported CPU (i3-9100) and I already use the GVT-g plug-in. With that, GVT-g works perfectly in a Windows 10 VM. The way it works in the Windows 10 VM is that the primary gpu (the one used with VNC access) is an emulated device, while the mediated device is a secondary GPU that is used via RDP to provide hardware rendering. I’m trying to get GVT-g working also with MacOS, and for that the mediated device needs to be the only video device presented to the guest. For that reason I have to enable display=on in the hostdev entry in the xml and use egl-headless combined with VNC or Spice (as per instructions from my first post). I don’t even think that the qemu command goes as far as trying to boot the OS, it fails already when trying to setup the display output. From qemu 8.0 the log will show what is the actual error for failing to get the display, as you can see here: https://github.com/qemu/qemu/blob/83a9cdbd65ceb4a443630aed011a00ef217ed408/ui/egl-helpers.c#L485 The error can be one of the following: switch (error) { case EGL_SUCCESS: return "EGL_SUCCESS"; case EGL_NOT_INITIALIZED: return "EGL_NOT_INITIALIZED"; case EGL_BAD_ACCESS: return "EGL_BAD_ACCESS"; case EGL_BAD_ALLOC: return "EGL_BAD_ALLOC"; case EGL_BAD_ATTRIBUTE: return "EGL_BAD_ATTRIBUTE"; case EGL_BAD_CONTEXT: return "EGL_BAD_CONTEXT"; case EGL_BAD_CONFIG: return "EGL_BAD_CONFIG"; case EGL_BAD_CURRENT_SURFACE: return "EGL_BAD_CURRENT_SURFACE"; case EGL_BAD_DISPLAY: return "EGL_BAD_DISPLAY"; case EGL_BAD_SURFACE: return "EGL_BAD_SURFACE"; case EGL_BAD_MATCH: return "EGL_BAD_MATCH"; case EGL_BAD_PARAMETER: return "EGL_BAD_PARAMETER"; case EGL_BAD_NATIVE_PIXMAP: return "EGL_BAD_NATIVE_PIXMAP"; case EGL_BAD_NATIVE_WINDOW: return "EGL_BAD_NATIVE_WINDOW"; case EGL_CONTEXT_LOST: return "EGL_CONTEXT_LOST"; default: return "Unknown EGL error"; For older versions of qemu, the log message doesn’t display what the error actually is (see the GitHub link from the first post). As far as I can see, there is no way to get qemu 8.0 on Unraid at the moment, is that correct?
-
-
Can't create VM with "egl-headless" graphical framebuffer
Hi all, I'm trying to create a VM that uses "egl-headless" graphical framebuffer, combined with VNC or Spice to enable hardware acceleration on the guest with a mediated device (iGPU). I've followed this guide: https://wiki.archlinux.org/title/Intel_GVT-g As far as I know, starting from Unraid 6.10, QEMU has been compiled with OpenGL support, therefore this should be possible. This is the xml for the VM: <?xml version='1.0' encoding='UTF-8'?> <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> <name>MacOS Monterey</name> <uuid>91b82c42-f5a2-424f-b45f-714ed7c190de</uuid> <description>MacOS Monterey</description> <metadata> <vmtemplate xmlns="unraid" name="Windows 10" icon="default.png" os="osx"/> </metadata> <memory unit='KiB'>8388608</memory> <currentMemory unit='KiB'>8388608</currentMemory> <memoryBacking> <nosharepages/> </memoryBacking> <vcpu placement='static'>2</vcpu> <cputune> <vcpupin vcpu='0' cpuset='0'/> <vcpupin vcpu='1' cpuset='1'/> </cputune> <os> <type arch='x86_64' machine='pc-q35-7.1'>hvm</type> <loader readonly='yes' type='pflash'>/mnt/user/system/custom_ovmf/Macinabox_CODE-pure-efi.fd</loader> <nvram>/etc/libvirt/qemu/nvram/91b82c42-f5a2-424f-b45f-714ed7c190de_VARS-pure-efi.fd</nvram> </os> <features> <acpi/> <apic/> </features> <cpu mode='host-passthrough' check='none' migratable='on'> <topology sockets='1' dies='1' cores='2' threads='1'/> <cache mode='passthrough'/> </cpu> <clock offset='utc'> <timer name='rtc' tickpolicy='catchup'/> <timer name='pit' tickpolicy='delay'/> <timer name='hpet' present='no'/> </clock> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/local/sbin/qemu</emulator> <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='writeback'/> <source file='/mnt/user/domains/Macinabox Monterey/macos_disk.img'/> <target dev='hdc' bus='sata'/> <boot order='1'/> <address type='drive' controller='0' bus='0' target='0' unit='2'/> </disk> <controller type='usb' index='0' model='ich9-ehci1'> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/> </controller> <controller type='usb' index='0' model='ich9-uhci1'> <master startport='0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0' multifunction='on'/> </controller> <controller type='usb' index='0' model='ich9-uhci2'> <master startport='2'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x1' multifunction='on'/> </controller> <controller type='usb' index='0' model='ich9-uhci3'> <master startport='4'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x2'/> </controller> <controller type='pci' index='0' model='pcie-root'/> <controller type='pci' index='1' model='pcie-root-port'> <model name='pcie-root-port'/> <target chassis='1' port='0x10'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/> </controller> <controller type='pci' index='2' model='pcie-root-port'> <model name='pcie-root-port'/> <target chassis='2' port='0x11'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/> </controller> <controller type='pci' index='3' model='pcie-root-port'> <model name='pcie-root-port'/> <target chassis='3' port='0x12'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/> </controller> <controller type='pci' index='4' model='pcie-root-port'> <model name='pcie-root-port'/> <target chassis='4' port='0x13'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/> </controller> <controller type='virtio-serial' index='0'> <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/> </controller> <controller type='sata' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> </controller> <interface type='bridge'> <mac address='52:54:00:7d:24:fd'/> <source bridge='br0'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> </interface> <serial type='pty'> <target type='isa-serial' port='0'> <model name='isa-serial'/> </target> </serial> <console type='pty'> <target type='serial' port='0'/> </console> <channel type='unix'> <target type='virtio' name='org.qemu.guest_agent.0'/> <address type='virtio-serial' controller='0' bus='0' port='1'/> </channel> <input type='tablet' bus='usb'> <address type='usb' bus='0' port='1'/> </input> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' websocket='-1' listen='0.0.0.0' keymap='en-us'> <listen type='address' address='0.0.0.0'/> </graphics> <graphics type='egl-headless'> <gl rendernode='/dev/dri/by-path/pci-0000:00:02.0-render'/> </graphics> <audio id='1' type='none'/> <video> <model type='none'/> </video> <hostdev mode='subsystem' type='mdev' managed='no' model='vfio-pci' display='on' ramfb='on'> <source> <address uuid='42a87f64-e629-4d69-9672-6bef7162d042'/> </source> <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/> </hostdev> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/> </memballoon> </devices> <qemu:commandline> <qemu:arg value='-usb'/> <qemu:arg value='-device'/> <qemu:arg value='usb-kbd,bus=usb-bus.0'/> <qemu:arg value='-device'/> <qemu:arg value='isa-applesmc,osk=[---HIDDEN---]'/> <qemu:arg value='-smbios'/> <qemu:arg value='type=2'/> <qemu:arg value='-cpu'/> <qemu:arg value='Penryn,kvm=on,vendor=GenuineIntel,+kvm_pv_unhalt,+kvm_pv_eoi,+hypervisor,+invtsc,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+avx2,+aes,+fma,+bmi1,+bmi2,+xsave,+xsaveopt,+rdrand,check'/> </qemu:commandline> <qemu:override> <qemu:device alias='hostdev0'> <qemu:frontend> <qemu:property name='x-igd-opregion' type='bool' value='true'/> <qemu:property name='romfile' type='string' value='/mnt/user/data/i915dev/i915ovmf.rom'/> <qemu:property name='driver' type='string' value='vfio-pci-nohotplug'/> <qemu:property name='ramfb' type='bool' value='true'/> </qemu:frontend> </qemu:device> </qemu:override> </domain> When I first launched the VM I got this error in the libvirt log: showing that the MESA library was missing. I installed the MESA library and its dependencies from here: https://slackware.pkgs.org/15.0/slackware-x86_64/mesa-21.3.5-x86_64-2.txz.html Now when I launch the VM I get the following error: The error that triggers all the others is qemu-system-x86_64: egl: eglGetDisplay failed Looking at the source code of QEMU, it happens here: https://github.com/qemu/qemu/blob/9abcf9776d8906c53feacab686f3d50137654b62/ui/egl-helpers.c#L441C51-L441C51 Do you know what could be causing this error?
-
Help in getting GVT-g working for MacOS VM
Hi all, I came across this reddit post: https://www.reddit.com/r/VFIO/comments/innriq/successful_macos_catalina_with_intel_gvtg/ that reports partial success (no hardware acceleration) of GVT-g on a MacOS VM using a custom VBIOS. The instructions to set it up on Fedora and Linux are available on this GitHub page: https://github.com/patmagauran/i915ovmfPkg/wiki/Using I'm trying to make this work on Unraid. I already have the Intel GVT-g plugin from @ich777 installed and it works correctly on a Windows 10 VM. I've used the Macinabox docker container to install MacOS Monterey: Without assigning any vGPU to the MacOS VM it works just fine with software rendering. I then created compiled the custom ROM, created a new vGPU instance, assigned it to the MacOS VM, and I have modified the xml to closely match the instruction shown for QEMU on the GitHub page. This is what I have in the end: <?xml version='1.0' encoding='UTF-8'?> <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> <name>MacOS Monterey</name> <uuid>91b82c42-f5a2-424f-b45f-714ed7c190de</uuid> <description>MacOS Monterey</description> <metadata> <vmtemplate xmlns="unraid" name="Windows 10" icon="default.png" os="osx"/> </metadata> <memory unit='KiB'>8388608</memory> <currentMemory unit='KiB'>8388608</currentMemory> <memoryBacking> <nosharepages/> </memoryBacking> <vcpu placement='static'>2</vcpu> <cputune> <vcpupin vcpu='0' cpuset='0'/> <vcpupin vcpu='1' cpuset='1'/> </cputune> <os> <type arch='x86_64' machine='pc-q35-7.1'>hvm</type> <loader readonly='yes' type='pflash'>/mnt/user/system/custom_ovmf/Macinabox_CODE-pure-efi.fd</loader> <nvram>/etc/libvirt/qemu/nvram/91b82c42-f5a2-424f-b45f-714ed7c190de_VARS-pure-efi.fd</nvram> </os> <features> <acpi/> <apic/> </features> <cpu mode='host-passthrough' check='none' migratable='on'> <topology sockets='1' dies='1' cores='2' threads='1'/> <cache mode='passthrough'/> </cpu> <clock offset='utc'> <timer name='rtc' tickpolicy='catchup'/> <timer name='pit' tickpolicy='delay'/> <timer name='hpet' present='no'/> </clock> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/local/sbin/qemu</emulator> <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='writeback'/> <source file='/mnt/user/domains/Macinabox Monterey/macos_disk.img'/> <target dev='hdc' bus='sata'/> <boot order='1'/> <address type='drive' controller='0' bus='0' target='0' unit='2'/> </disk> <controller type='usb' index='0' model='ich9-ehci1'> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/> </controller> <controller type='usb' index='0' model='ich9-uhci1'> <master startport='0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0' multifunction='on'/> </controller> <controller type='usb' index='0' model='ich9-uhci2'> <master startport='2'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x1' multifunction='on'/> </controller> <controller type='usb' index='0' model='ich9-uhci3'> <master startport='4'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x2'/> </controller> <controller type='pci' index='0' model='pcie-root'/> <controller type='pci' index='1' model='pcie-root-port'> <model name='pcie-root-port'/> <target chassis='1' port='0x10'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/> </controller> <controller type='pci' index='2' model='pcie-root-port'> <model name='pcie-root-port'/> <target chassis='2' port='0x11'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/> </controller> <controller type='pci' index='3' model='pcie-root-port'> <model name='pcie-root-port'/> <target chassis='3' port='0x12'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/> </controller> <controller type='pci' index='4' model='pcie-root-port'> <model name='pcie-root-port'/> <target chassis='4' port='0x13'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/> </controller> <controller type='virtio-serial' index='0'> <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/> </controller> <controller type='sata' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> </controller> <interface type='bridge'> <mac address='52:54:00:7d:24:fd'/> <source bridge='br0'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> </interface> <serial type='pty'> <target type='isa-serial' port='0'> <model name='isa-serial'/> </target> </serial> <console type='pty'> <target type='serial' port='0'/> </console> <channel type='unix'> <target type='virtio' name='org.qemu.guest_agent.0'/> <address type='virtio-serial' controller='0' bus='0' port='1'/> </channel> <input type='tablet' bus='usb'> <address type='usb' bus='0' port='1'/> </input> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' websocket='-1' listen='0.0.0.0' keymap='en-us'> <listen type='address' address='0.0.0.0'/> </graphics> <graphics type='egl-headless'> <gl rendernode='/dev/dri/by-path/pci-0000:00:02.0-render'/> </graphics> <audio id='1' type='none'/> <video> <model type='none'/> </video> <hostdev mode='subsystem' type='mdev' managed='no' model='vfio-pci' display='on'> <source> <address uuid='42a87f64-e629-4d69-9672-6bef7162d042'/> </source> <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/> </hostdev> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/> </memballoon> </devices> <qemu:commandline> <qemu:arg value='-usb'/> <qemu:arg value='-device'/> <qemu:arg value='usb-kbd,bus=usb-bus.0'/> <qemu:arg value='-device'/> <qemu:arg value='isa-applesmc,osk=[--- HIDDEN ---]'/> <qemu:arg value='-smbios'/> <qemu:arg value='type=2'/> <qemu:arg value='-cpu'/> <qemu:arg value='Penryn,kvm=on,vendor=GenuineIntel,+kvm_pv_unhalt,+kvm_pv_eoi,+hypervisor,+invtsc,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+avx2,+aes,+fma,+bmi1,+bmi2,+xsave,+xsaveopt,+rdrand,check'/> </qemu:commandline> <qemu:override> <qemu:device alias='hostdev0'> <qemu:frontend> <qemu:property name='x-igd-opregion' type='bool' value='true'/> <qemu:property name='romfile' type='string' value='/mnt/user/data/i915dev/i915ovmf.rom'/> </qemu:frontend> </qemu:device> </qemu:override> </domain> Every time I try to start the VM it completely freezes the host and I'm forced to reboot. I can still access the Unraud console if I open it beforehand but even trying to stop libvirt doesn't work..the command hangs. I have no way to access the VM log to see if there are any errors. The freeze happens even if I don't specify the custom ROM. Do you know what's going on? Would you be able to help me? Thanks Andrea
Andrea3000
Members
-
Joined
-
Last visited