zhaodice / qemu-anti-detection

A patch to hide qemu itself, bypass mhyprot,EAC,nProtect / VMProtect,VProtect, Themida, Enigma Protector,Safegine Shielden
746 stars 113 forks source link

Roblox working #56

Closed YoinkedYoink closed 2 months ago

YoinkedYoink commented 6 months ago

Using the patch roblox should work as long as you pass a gpu.

From the looks of it, the only checks they act on is if you don't have a valid gpu (or spice/vnc guest running?) and it crashes with "Roblox cannot be run inside a virtual machine".

Even if hyperV says that it's a VM, the game just doesn't care 🤷

zhaodice commented 6 months ago

Using the patch roblox should work as long as you pass a gpu.

From the looks of it, the only checks they act on is if you don't have a valid gpu (or spice/vnc guest running?) and it crashes with "Roblox cannot be run inside a virtual machine".

Even if hyperV says that it's a VM, the game just doesn't care 🤷

Omg, it doesn't show "Roblox cannot be run inside a virtual machine" on my machine , it shows "The application encountered an unrecoverable error" I passthoughed a RTX4090 & 1660S

YoinkedYoink commented 6 months ago

Here's my config with the mac addresses scrubbed for obvious reasons. My pc has a AMD Ryzen 7 3800X and NVIDIA GeForce RTX 3060 LHR, I'm doing single gpu passthrough (can't use linux and vm at the same time) but I don't think it should effect if it runs or not

Also I use 16 cores, 1 thread each because Roblox is single threaded and runs better this way

<domain type="kvm">
  <name>win10</name>
  <uuid>0000000000000000000</uuid>
  <metadata>
    <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
      <libosinfo:os id="http://microsoft.com/win/10"/>
    </libosinfo:libosinfo>
  </metadata>
  <memory unit="KiB">8388608</memory>
  <currentMemory unit="KiB">8388608</currentMemory>
  <vcpu placement="static">16</vcpu>
  <os firmware="efi">
    <type arch="x86_64" machine="pc-q35-8.2">hvm</type>
    <firmware>
      <feature enabled="no" name="enrolled-keys"/>
      <feature enabled="no" name="secure-boot"/>
    </firmware>
    <loader readonly="yes" type="pflash">/usr/share/edk2/x64/OVMF_CODE.fd</loader>
    <nvram template="/usr/share/edk2/x64/OVMF_VARS.fd">/var/lib/libvirt/qemu/nvram/win10_VARS.fd</nvram>
    <bootmenu enable="no"/>
    <smbios mode="host"/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hap state="on"/>
    <hyperv mode="custom">
      <relaxed state="on"/>
      <vapic state="on"/>
      <spinlocks state="on" retries="8191"/>
      <synic state="off"/>
      <stimer state="off"/>
      <vendor_id state="on" value="none"/>
    </hyperv>
    <kvm>
      <hidden state="on"/>
    </kvm>
    <vmport state="off"/>
    <ioapic driver="kvm"/>
  </features>
  <cpu mode="host-passthrough" check="none" migratable="off">
    <topology sockets="1" dies="1" clusters="1" cores="16" threads="1"/>
    <cache mode="passthrough"/>
    <feature policy="disable" name="amd-stibp"/>
    <feature policy="require" name="topoext"/>
    <feature policy="require" name="invtsc"/>
  </cpu>
  <clock offset="localtime">
    <timer name="pit" tickpolicy="delay"/>
    <timer name="rtc" tickpolicy="catchup" track="guest"/>
    <timer name="hpet" present="no"/>
    <timer name="tsc" present="yes" mode="native"/>
    <timer name="hypervclock" present="yes"/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <pm>
    <suspend-to-mem enabled="no"/>
    <suspend-to-disk enabled="no"/>
  </pm>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type="file" device="disk">
      <driver name="qemu" type="qcow2"/>
      <source file="/var/lib/libvirt/images/pool/win10.qcow2"/>
      <target dev="sda" bus="sata"/>
      <boot order="1"/>
      <address type="drive" controller="0" bus="0" target="0" unit="0"/>
    </disk>
    <controller type="usb" index="0" model="qemu-xhci" ports="15">
      <address type="pci" domain="0x0000" bus="0x02" slot="0x00" function="0x0"/>
    </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="pci" index="5" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="5" port="0x14"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x4"/>
    </controller>
    <controller type="pci" index="6" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="6" port="0x15"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x5"/>
    </controller>
    <controller type="pci" index="7" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="7" port="0x16"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x6"/>
    </controller>
    <controller type="pci" index="8" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="8" port="0x17"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x7"/>
    </controller>
    <controller type="pci" index="9" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="9" port="0x18"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x0" multifunction="on"/>
    </controller>
    <controller type="pci" index="10" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="10" port="0x19"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x1"/>
    </controller>
    <controller type="pci" index="11" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="11" port="0x1a"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x2"/>
    </controller>
    <controller type="pci" index="12" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="12" port="0x1b"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x3"/>
    </controller>
    <controller type="pci" index="13" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="13" port="0x1c"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x4"/>
    </controller>
    <controller type="pci" index="14" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="14" port="0x1d"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x5"/>
    </controller>
    <controller type="sata" index="0">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x1f" function="0x2"/>
    </controller>
    <interface type="network">
      <mac address="00000000000000"/>
      <source network="default"/>
      <model type="e1000e"/>
      <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
    </interface>
    <input type="mouse" bus="ps2"/>
    <input type="keyboard" bus="ps2"/>
    <audio id="1" type="none"/>
    <hostdev mode="subsystem" type="usb" managed="yes">
      <source>
        <vendor id="000000000"/>
        <product id="000000000"/>
      </source>
      <address type="usb" bus="0" port="1"/>
    </hostdev>
    <hostdev mode="subsystem" type="usb" managed="yes">
      <source>
        <vendor id="000000000"/>
        <product id="000000000"/>
      </source>
      <address type="usb" bus="0" port="2"/>
    </hostdev>
    <hostdev mode="subsystem" type="pci" managed="yes">
      <source>
        <address domain="0x0000" bus="0x2b" slot="0x00" function="0x0"/>
      </source>
      <rom file="/home/nord/Documents/editme.rom"/>
      <address type="pci" domain="0x0000" bus="0x05" slot="0x00" function="0x0"/>
    </hostdev>
    <hostdev mode="subsystem" type="pci" managed="yes">
      <source>
        <address domain="0x0000" bus="0x2b" slot="0x00" function="0x1"/>
      </source>
      <rom file="/home/nord/Documents/editme.rom"/>
      <address type="pci" domain="0x0000" bus="0x06" slot="0x00" function="0x0"/>
    </hostdev>
    <watchdog model="itco" action="reset"/>
    <memballoon model="virtio">
      <address type="pci" domain="0x0000" bus="0x03" slot="0x00" function="0x0"/>
    </memballoon>
    <rng model="virtio">
      <backend model="random">/dev/urandom</backend>
      <address type="pci" domain="0x0000" bus="0x04" slot="0x00" function="0x0"/>
    </rng>
  </devices>
</domain>
YoinkedYoink commented 6 months ago

Also here's an image for proof, so you don't think I'm sending you on a false man hunt image

Stan805 commented 6 months ago

When I first created a VM and passed through a 3080 Ti, Roblox would just complain I was in a VM whenever I would try to start it, but my fix was just enabling Hyper-V and it immediately tricked Roblox into working.

zhaodice commented 6 months ago

When I first created a VM and passed through a 3080 Ti, Roblox would just complain I was in a VM whenever I would try to start it, but my fix was just enabling Hyper-V and it immediately tricked Roblox into working.

I cannot enable Hyper-V, it will make blue screen....

Stan805 commented 6 months ago

When I first created a VM and passed through a 3080 Ti, Roblox would just complain I was in a VM whenever I would try to start it, but my fix was just enabling Hyper-V and it immediately tricked Roblox into working.

I cannot enable Hyper-V, it will make blue screen....

I think that just happens due to your CPU type. My proxmox server with an i7 13700K has that exact same issue where it bluescreens after hyper-v is enabled. My PC with an i9 9900k on the other hand, has no issues with hyper-v

Samuil1337 commented 6 months ago

@zhaodice, did you enable Hyper-V enlightenments? These are necessary for Hyper-V to operate as they make Windows think it's run on top of a Hyper-V compatible hypervisor and enables Hyper-V specific features. Mutahar's classic video about bypassing anti-cheat shows how to do this, and it may also be worth checking out the Libvirt wiki for some specifics

Here is the QEMU wiki page for further insight

Btw you can't bypass Valorant's anti-cheat as easily anymore.

JoaGamo commented 6 months ago

I can confirm that roblox works by enabling hyper-v, but performance goes near zero when it's enabled

Samuil1337 commented 6 months ago

Hi @JoaGamo, Hyper-V itself is a hypervisor, so you are running a VM in a VM. This obviously causes some more or less noticeable CPU overhead, however with a fairly decent gaming CPU this shouldn't be a problem. This sounds to me more like a misconfiguration. On AMD and some Intel CPUs nested virtual machines - like this setup - are not virtualized, but in fact emulated. You need to enable hardware acceleration for this scenario separately in the Libvirt domain XML.

AMD:

<cpu mode="host-passthrough">
    <feature policy="require" name="topoext"/>
    <!-- [...] -->
</cpu>

Intel:

<cpu mode="host-passthrough">
    <feature policy="require" name="vmx"/>
    <!-- [...] -->
</cpu>

Hope this helps! Samuil1337

uragan1987 commented 6 months ago

Here's my config with the mac addresses scrubbed for obvious reasons. My pc has a AMD Ryzen 7 3800X and NVIDIA GeForce RTX 3060 LHR, I'm doing single gpu passthrough (can't use linux and vm at the same time) but I don't think it should effect if it runs or not

Also I use 16 cores, 1 thread each because Roblox is single threaded and runs better this way

<domain type="kvm">
  <name>win10</name>
  <uuid>0000000000000000000</uuid>
  <metadata>
    <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
      <libosinfo:os id="http://microsoft.com/win/10"/>
    </libosinfo:libosinfo>
  </metadata>
  <memory unit="KiB">8388608</memory>
  <currentMemory unit="KiB">8388608</currentMemory>
  <vcpu placement="static">16</vcpu>
  <os firmware="efi">
    <type arch="x86_64" machine="pc-q35-8.2">hvm</type>
    <firmware>
      <feature enabled="no" name="enrolled-keys"/>
      <feature enabled="no" name="secure-boot"/>
    </firmware>
    <loader readonly="yes" type="pflash">/usr/share/edk2/x64/OVMF_CODE.fd</loader>
    <nvram template="/usr/share/edk2/x64/OVMF_VARS.fd">/var/lib/libvirt/qemu/nvram/win10_VARS.fd</nvram>
    <bootmenu enable="no"/>
    <smbios mode="host"/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hap state="on"/>
    <hyperv mode="custom">
      <relaxed state="on"/>
      <vapic state="on"/>
      <spinlocks state="on" retries="8191"/>
      <synic state="off"/>
      <stimer state="off"/>
      <vendor_id state="on" value="none"/>
    </hyperv>
    <kvm>
      <hidden state="on"/>
    </kvm>
    <vmport state="off"/>
    <ioapic driver="kvm"/>
  </features>
  <cpu mode="host-passthrough" check="none" migratable="off">
    <topology sockets="1" dies="1" clusters="1" cores="16" threads="1"/>
    <cache mode="passthrough"/>
    <feature policy="disable" name="amd-stibp"/>
    <feature policy="require" name="topoext"/>
    <feature policy="require" name="invtsc"/>
  </cpu>
  <clock offset="localtime">
    <timer name="pit" tickpolicy="delay"/>
    <timer name="rtc" tickpolicy="catchup" track="guest"/>
    <timer name="hpet" present="no"/>
    <timer name="tsc" present="yes" mode="native"/>
    <timer name="hypervclock" present="yes"/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <pm>
    <suspend-to-mem enabled="no"/>
    <suspend-to-disk enabled="no"/>
  </pm>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type="file" device="disk">
      <driver name="qemu" type="qcow2"/>
      <source file="/var/lib/libvirt/images/pool/win10.qcow2"/>
      <target dev="sda" bus="sata"/>
      <boot order="1"/>
      <address type="drive" controller="0" bus="0" target="0" unit="0"/>
    </disk>
    <controller type="usb" index="0" model="qemu-xhci" ports="15">
      <address type="pci" domain="0x0000" bus="0x02" slot="0x00" function="0x0"/>
    </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="pci" index="5" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="5" port="0x14"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x4"/>
    </controller>
    <controller type="pci" index="6" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="6" port="0x15"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x5"/>
    </controller>
    <controller type="pci" index="7" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="7" port="0x16"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x6"/>
    </controller>
    <controller type="pci" index="8" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="8" port="0x17"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x7"/>
    </controller>
    <controller type="pci" index="9" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="9" port="0x18"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x0" multifunction="on"/>
    </controller>
    <controller type="pci" index="10" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="10" port="0x19"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x1"/>
    </controller>
    <controller type="pci" index="11" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="11" port="0x1a"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x2"/>
    </controller>
    <controller type="pci" index="12" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="12" port="0x1b"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x3"/>
    </controller>
    <controller type="pci" index="13" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="13" port="0x1c"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x4"/>
    </controller>
    <controller type="pci" index="14" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="14" port="0x1d"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x5"/>
    </controller>
    <controller type="sata" index="0">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x1f" function="0x2"/>
    </controller>
    <interface type="network">
      <mac address="00000000000000"/>
      <source network="default"/>
      <model type="e1000e"/>
      <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
    </interface>
    <input type="mouse" bus="ps2"/>
    <input type="keyboard" bus="ps2"/>
    <audio id="1" type="none"/>
    <hostdev mode="subsystem" type="usb" managed="yes">
      <source>
        <vendor id="000000000"/>
        <product id="000000000"/>
      </source>
      <address type="usb" bus="0" port="1"/>
    </hostdev>
    <hostdev mode="subsystem" type="usb" managed="yes">
      <source>
        <vendor id="000000000"/>
        <product id="000000000"/>
      </source>
      <address type="usb" bus="0" port="2"/>
    </hostdev>
    <hostdev mode="subsystem" type="pci" managed="yes">
      <source>
        <address domain="0x0000" bus="0x2b" slot="0x00" function="0x0"/>
      </source>
      <rom file="/home/nord/Documents/editme.rom"/>
      <address type="pci" domain="0x0000" bus="0x05" slot="0x00" function="0x0"/>
    </hostdev>
    <hostdev mode="subsystem" type="pci" managed="yes">
      <source>
        <address domain="0x0000" bus="0x2b" slot="0x00" function="0x1"/>
      </source>
      <rom file="/home/nord/Documents/editme.rom"/>
      <address type="pci" domain="0x0000" bus="0x06" slot="0x00" function="0x0"/>
    </hostdev>
    <watchdog model="itco" action="reset"/>
    <memballoon model="virtio">
      <address type="pci" domain="0x0000" bus="0x03" slot="0x00" function="0x0"/>
    </memballoon>
    <rng model="virtio">
      <backend model="random">/dev/urandom</backend>
      <address type="pci" domain="0x0000" bus="0x04" slot="0x00" function="0x0"/>
    </rng>
  </devices>
</domain>

do you still use this qemu config, and it works? or do some changes on guest windows?

YoinkedYoink commented 6 months ago

do you still use this qemu config, and it works? or do some changes on guest windows?

Yup, still working for me.

Also the windows install has not been changed in the slightest, I just downloaded windows 10 single language edition, downloaded direct X redistributable and ran roblox 🤷

Weird that others require modifications to run hypervisor and all that.

uragan1987 commented 6 months ago

i use pc-q35-7.0 but wont work

CE1CECL commented 5 months ago

I cant get it to work for me at all, its just keeps "crashing" even tho its running in taskmgr, I kill it and relaunch it from desktop and every time its different, meaning I may need rdtsc patch? I even tried playing with cpu flags

I tried to enable Hyper-v but as I said, it did open for 2sec before closing itself out

CE1CECL commented 5 months ago

@YoinkedYoink The screenshot you provided above shows "Virtual Machine: Yes"? Are you hiding the "hypervisor" CPUID Flag?

YoinkedYoink commented 5 months ago

@YoinkedYoink The screenshot you provided above shows "Virtual Machine: Yes"? Are you hiding the "hypervisor" CPUID Flag?

If this is the line you're referencing then yes, I set it to "none". But in the screenshot pafish detects a CPUID hyperv flag 🤷

<vendor_id state="on" value="none"/>

CE1CECL commented 5 months ago

@YoinkedYoink The screenshot you provided above shows "Virtual Machine: Yes"? Are you hiding the "hypervisor" CPUID Flag?

If this is the line you're referencing then yes, I set it to "none". But in the screenshot pafish detects a CPUID hyperv flag 🤷

<vendor_id state="on" value="none"/>

<domain xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0" type="kvm">

.....

  <qemu:commandline>
    <qemu:arg value="-cpu"/>
    <qemu:arg value="host,-hypervisor"/>
  </qemu:commandline>
</domain>

by default qemu always makes it +, making it show its a vm, the line you provided isnt what im talking about,

Samuil1337 commented 5 months ago

The setting you mean is this:

<domain>
  <cpu>
    <feature policy="disable" name="hypervisor"/>
    <!-- [...] -->
  </cpu>
  <!-- [...] -->
</domain>
uragan1987 commented 5 months ago

@YoinkedYoink or somebody, who get roblox worked on windows worked maybe can post whole LOG file, (sure hide MAC, hide UUID,..) before

log is inside: /var/log/libvirt/%VM_NAME%.log

  1. Stop VM
  2. removelog file (to get a clear one)
  3. START VM
  4. edit and post here

this will be great one :)

and what version of qemu do you use?

CE1CECL commented 5 months ago

The setting you mean is this:

<domain>
  <cpu>
    <feature policy="disable" name="hypervisor"/>
    <!-- [...] -->
  </cpu>
  <!-- [...] -->
</domain>

Yeah same thing, I am also not passing through my GPU but rather using NVIDIA vGPU, works fine with studio, but the https://github.com/CE1CECL/qemu-vmvga/ also doesn't work, still crashes

YoinkedYoink commented 5 months ago

Yeah same thing, I am also not passing through my GPU but rather using NVIDIA vGPU, works fine with studio, but the https://github.com/CE1CECL/qemu-vmvga/ also doesn't work, still crashes

From the developers of vinegar, roblox studio doesn't actually have the antidebug/cheat. When trying to run roblox (website version, not microsoft store) without gpu pcie passthrough through spice server the game would give a "cannot run in a vm" error.

If possible, try pass through your gpu instead of partitioning and see if that works.

Someordinarygamers and the arch wiki helps massively when doing single gpu passthrough like mine.

YoinkedYoink commented 5 months ago

@YoinkedYoink or somebody, who get roblox worked on windows worked

maybe can post whole LOG file, (sure hide MAC, hide UUID,..) before

log is inside:

/var/log/libvirt/%VM_NAME%.log

  1. Stop VM

  2. removelog file (to get a clear one)

  3. START VM

  4. edit and post here

this will be great one :)

and what version of qemu do you use?

I'll get this to you soon, just haven't been around my computer for a bit 😁

YoinkedYoink commented 5 months ago

I have trouble remembering to do things... Here's the logs from /var/logs/libvirt/qemu/windows10.log, please do not quote the whole log because it spams the issue thing.

ALSO, be careful when trying this. Roblox has been silently flagging users using vms and I have no way to test this. HOPEFULLY bans are ONLY issued to those detected with a vm and cheating, but be wary please 😬 Video I'm referencing: https://www.youtube.com/watch?v=YZr5HzrCq3E

2024-04-12 23:09:55.682+0000: starting up libvirt version: 10.2.0, qemu version: 8.2.0v8.2.0-dirty, kernel: 6.8.5-arch1-1, hostname: hoax
LC_ALL=C \
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin \
USER=root \
HOME=/var/lib/libvirt/qemu/domain-1-win10 \
XDG_DATA_HOME=/var/lib/libvirt/qemu/domain-1-win10/.local/share \
XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain-1-win10/.cache \
XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain-1-win10/.config \
/usr/bin/qemu-system-x86_64 \
-name guest=win10,debug-threads=on \
-S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain-1-win10/master-key.aes"}' \
-blockdev '{"driver":"file","filename":"/usr/share/edk2/x64/OVMF_CODE.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/win10_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \
-machine pc-q35-8.2,usb=off,vmport=off,kernel_irqchip=on,dump-guest-core=off,memory-backend=pc.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,hpet=off,acpi=on \
-accel kvm \
-cpu host,migratable=off,amd-stibp=off,topoext=on,invtsc=on,hv-time=on,hv-relaxed=on,hv-vapic=on,hv-spinlocks=0x1fff,hv-vendor-id=none,kvm=off,host-cache-info=on,l3-cache=off \
-m size=8388608k \
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":8589934592}' \
-overcommit mem-lock=off \
-smp 16,sockets=1,dies=1,clusters=1,cores=16,threads=1 \
-uuid THE VIRTUAL MACHINE UUID \
-smbios 'type=0,vendor=American Megatrends International,, LLC.,version=A.E0,date=07/03/2023,release=5.17' \
-smbios 'type=1,manufacturer=Micro-Star International Co.,, Ltd.,product=MS-7C56,version=2.0,serial=To be filled by O.E.M.,sku=To be filled by O.E.M.,family=To be filled by O.E.M.' \
-smbios 'type=2,manufacturer=Micro-Star International Co.,, Ltd.,product=B550-A PRO (MS-7C56),version=2.0,serial=A SERIAL CODE,asset=To be filled by O.E.M.,location=To be filled by O.E.M.' \
-smbios 'type=3,manufacturer=Micro-Star International Co.,, Ltd.,version=2.0,serial=To be filled by O.E.M.,asset=To be filled by O.E.M.,sku=To be filled by O.E.M.' \
-smbios 'type=11,value=To be filled by O.E.M.
' \
-display none \
-no-user-config \
-nodefaults \
-chardev socket,id=charmonitor,fd=30,server=on,wait=off \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=localtime,clock=vm,driftfix=slew \
-global kvm-pit.lost_tick_policy=delay \
-no-shutdown \
-global ICH9-LPC.disable_s3=1 \
-global ICH9-LPC.disable_s4=1 \
-boot menu=off,strict=on \
-device '{"driver":"pcie-root-port","port":16,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x2"}' \
-device '{"driver":"pcie-root-port","port":17,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x2.0x1"}' \
-device '{"driver":"pcie-root-port","port":18,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x2.0x2"}' \
-device '{"driver":"pcie-root-port","port":19,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x2.0x3"}' \
-device '{"driver":"pcie-root-port","port":20,"chassis":5,"id":"pci.5","bus":"pcie.0","addr":"0x2.0x4"}' \
-device '{"driver":"pcie-root-port","port":21,"chassis":6,"id":"pci.6","bus":"pcie.0","addr":"0x2.0x5"}' \
-device '{"driver":"pcie-root-port","port":22,"chassis":7,"id":"pci.7","bus":"pcie.0","addr":"0x2.0x6"}' \
-device '{"driver":"pcie-root-port","port":23,"chassis":8,"id":"pci.8","bus":"pcie.0","addr":"0x2.0x7"}' \
-device '{"driver":"pcie-root-port","port":24,"chassis":9,"id":"pci.9","bus":"pcie.0","multifunction":true,"addr":"0x3"}' \
-device '{"driver":"pcie-root-port","port":25,"chassis":10,"id":"pci.10","bus":"pcie.0","addr":"0x3.0x1"}' \
-device '{"driver":"pcie-root-port","port":26,"chassis":11,"id":"pci.11","bus":"pcie.0","addr":"0x3.0x2"}' \
-device '{"driver":"pcie-root-port","port":27,"chassis":12,"id":"pci.12","bus":"pcie.0","addr":"0x3.0x3"}' \
-device '{"driver":"pcie-root-port","port":28,"chassis":13,"id":"pci.13","bus":"pcie.0","addr":"0x3.0x4"}' \
-device '{"driver":"pcie-root-port","port":29,"chassis":14,"id":"pci.14","bus":"pcie.0","addr":"0x3.0x5"}' \
-device '{"driver":"qemu-xhci","p2":15,"p3":15,"id":"usb","bus":"pci.2","addr":"0x0"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/pool/win10.qcow2","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2","file":"libvirt-1-storage","backing":null}' \
-device '{"driver":"ide-hd","bus":"ide.0","drive":"libvirt-1-format","id":"sata0-0-0","bootindex":1}' \
-netdev '{"type":"tap","fd":"32","id":"hostnet0"}' \
-device '{"driver":"e1000e","netdev":"hostnet0","id":"net0","mac":"A MAC ADDRESS","bus":"pci.1","addr":"0x0"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-global ICH9-LPC.noreboot=off \
-watchdog-action reset \
-device '{"driver":"usb-host","hostbus":1,"hostaddr":3,"id":"hostdev0","bus":"usb.0","port":"1"}' \
-device '{"driver":"usb-host","hostbus":3,"hostaddr":2,"id":"hostdev1","bus":"usb.0","port":"2"}' \
-device '{"driver":"vfio-pci","host":"0000:2b:00.0","id":"hostdev2","bus":"pci.5","addr":"0x0","romfile":"/home/nord/Documents/editme.rom"}' \
-device '{"driver":"vfio-pci","host":"0000:2b:00.1","id":"hostdev3","bus":"pci.6","addr":"0x0","romfile":"/home/nord/Documents/editme.rom"}' \
-device '{"driver":"usb-host","hostbus":1,"hostaddr":7,"id":"hostdev4","bus":"usb.0","port":"3"}' \
-device '{"driver":"usb-host","hostbus":1,"hostaddr":6,"id":"hostdev5","bus":"usb.0","port":"4"}' \
-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.3","addr":"0x0"}' \
-object '{"qom-type":"rng-random","id":"objrng0","filename":"/dev/urandom"}' \
-device '{"driver":"virtio-rng-pci","rng":"objrng0","id":"rng0","bus":"pci.4","addr":"0x0"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
2024-04-12 23:09:55.682+0000: Domain id=1 is tainted: custom-hypervisor-feature
2024-04-12T23:19:05.186239Z qemu-system-x86_64: terminating on signal 15 from pid 1964 (/usr/bin/libvirtd)
2024-04-12 23:19:08.050+0000: shutting down, reason=shutdown
uragan1987 commented 5 months ago

@YoinkedYoink , add me pls on Discord, same nickname as here :)

YoinkedYoink commented 5 months ago

After some searching about I found this on the official roblox website https://en.help.roblox.com/hc/en-us/articles/24275616578708-Hyperion-Messages

More specifically there is a section on "Crash Type: Virtual machine detected", it notes that a gpu needs to be passed through and Intel-VTx/AMD-V needs to be enabled.

Confirming that gpu passthrough is needed. If anyone wants the guide I used it is this one https://www.youtube.com/watch?v=BUSrdUoedTo Uragan pointed out that maybe the rom patch is required, so that is probably the next step for most people :)

SpiderUnderUrBed commented 5 months ago

Does this patch help with roblox? or is it unnessesary with roblox, im getting the error: "Roblox has crashes, please preform a clean windows boot"

uragan1987 commented 5 months ago

@SpiderUnderUrBed i try lots of steps to get roblox on KVM, but still no success, my config is nearby same as from YoinkedYoink, but still see my system as VM

only diffs are maybe cause i have a INTEL CPU and YoinkedYoink has a AMD CPU

or maybe @YoinkedYoink you can upload your loader files, /usr/share/edk2/x64/OVMF_CODE.fd

i want try to your, maybe it gona works with it

SpiderUnderUrBed commented 5 months ago

Yes but does this patch help with the "roblox cannot run inside a virual machine" error, I cant tell, i tried so many things like gpu passthrough and enabling hyper v (no nested virtulization)

SpiderUnderUrBed commented 5 months ago

Here is my XML:

<domain type='kvm' id='2'>
  <name>win11</name>
  <uuid>173db595-9d78-477d-ae2a-8b65d2676ee8</uuid>
  <metadata>
    <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
      <libosinfo:os id="http://microsoft.com/win/11"/>
    </libosinfo:libosinfo>
  </metadata>
  <memory unit='KiB'>8484864</memory>
  <currentMemory unit='KiB'>8484864</currentMemory>
  <vcpu placement='static'>12</vcpu>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-q35-8.2'>hvm</type>
    <loader readonly='yes' type='pflash'>/run/libvirt/nix-ovmf/OVMF_CODE.fd</loader>
    <nvram template='/run/libvirt/nix-ovmf/OVMF_VARS.fd'>/var/lib/libvirt/qemu/nvram/mywindo_VARS.fd</nvram>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
    <hap state='on'/>
    <privnet/>
    <hyperv mode='passthrough'>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      <vpindex state='on'/>
      <runtime state='on'/>
      <synic state='on'/>
      <stimer state='on'/>
      <reset state='off'/>
      <vendor_id state='on' value='PS3000X'/>
      <frequencies state='on'/>
      <reenlightenment state='off'/>
      <tlbflush state='on'/>
      <ipi state='on'/>
      <evmcs state='off'/>
    </hyperv>
    <kvm>
      <hidden state='on'/>
      <hint-dedicated state='on'/>
      <poll-control state='on'/>
      <pv-ipi state='on'/>
    </kvm>
    <vmport state='off'/>
    <smm state='on'/>
    <ioapic driver='kvm'/>
  </features>
  <cpu mode='custom' match='exact' check='full'>
    <model fallback='forbid'>Cooperlake</model>
    <vendor>Intel</vendor>
    <topology sockets='1' dies='1' cores='6' threads='2'/>
    <feature policy='require' name='ss'/>
    <feature policy='require' name='vmx'/>
    <feature policy='require' name='pdcm'/>
    <feature policy='require' name='hypervisor'/>
    <feature policy='require' name='tsc_adjust'/>
    <feature policy='require' name='avx512ifma'/>
    <feature policy='require' name='sha-ni'/>
    <feature policy='require' name='avx512vbmi'/>
    <feature policy='require' name='umip'/>
    <feature policy='require' name='avx512vbmi2'/>
    <feature policy='require' name='gfni'/>
    <feature policy='require' name='vaes'/>
    <feature policy='require' name='vpclmulqdq'/>
    <feature policy='require' name='avx512bitalg'/>
    <feature policy='require' name='avx512-vpopcntdq'/>
    <feature policy='require' name='rdpid'/>
    <feature policy='require' name='movdiri'/>
    <feature policy='require' name='movdir64b'/>
    <feature policy='require' name='fsrm'/>
    <feature policy='require' name='avx512-vp2intersect'/>
    <feature policy='require' name='md-clear'/>
    <feature policy='require' name='flush-l1d'/>
    <feature policy='require' name='xsaves'/>
    <feature policy='require' name='ibpb'/>
    <feature policy='require' name='ibrs'/>
    <feature policy='require' name='amd-stibp'/>
    <feature policy='require' name='amd-ssbd'/>
    <feature policy='require' name='sbdr-ssdp-no'/>
    <feature policy='require' name='fbsdp-no'/>
    <feature policy='require' name='gds-no'/>
    <feature policy='require' name='vmx-ins-outs'/>
    <feature policy='require' name='vmx-true-ctls'/>
    <feature policy='require' name='vmx-store-lma'/>
    <feature policy='require' name='vmx-activity-hlt'/>
    <feature policy='require' name='vmx-activity-wait-sipi'/>
    <feature policy='require' name='vmx-vmwrite-vmexit-fields'/>
    <feature policy='require' name='vmx-apicv-xapic'/>
    <feature policy='require' name='vmx-ept'/>
    <feature policy='require' name='vmx-desc-exit'/>
    <feature policy='require' name='vmx-rdtscp-exit'/>
    <feature policy='require' name='vmx-apicv-x2apic'/>
    <feature policy='require' name='vmx-vpid'/>
    <feature policy='require' name='vmx-wbinvd-exit'/>
    <feature policy='require' name='vmx-unrestricted-guest'/>
    <feature policy='require' name='vmx-apicv-register'/>
    <feature policy='require' name='vmx-apicv-vid'/>
    <feature policy='require' name='vmx-rdrand-exit'/>
    <feature policy='require' name='vmx-invpcid-exit'/>
    <feature policy='require' name='vmx-vmfunc'/>
    <feature policy='require' name='vmx-shadow-vmcs'/>
    <feature policy='require' name='vmx-rdseed-exit'/>
    <feature policy='require' name='vmx-pml'/>
    <feature policy='require' name='vmx-xsaves'/>
    <feature policy='require' name='vmx-tsc-scaling'/>
    <feature policy='require' name='vmx-invvpid'/>
    <feature policy='require' name='vmx-invvpid-single-addr'/>
    <feature policy='require' name='vmx-invvpid-all-context'/>
    <feature policy='require' name='vmx-ept-execonly'/>
    <feature policy='require' name='vmx-page-walk-4'/>
    <feature policy='require' name='vmx-ept-2mb'/>
    <feature policy='require' name='vmx-ept-1gb'/>
    <feature policy='require' name='vmx-invept'/>
    <feature policy='require' name='vmx-eptad'/>
    <feature policy='require' name='vmx-invept-single-context'/>
    <feature policy='require' name='vmx-invept-all-context'/>
    <feature policy='require' name='vmx-intr-exit'/>
    <feature policy='require' name='vmx-nmi-exit'/>
    <feature policy='require' name='vmx-vnmi'/>
    <feature policy='require' name='vmx-preemption-timer'/>
    <feature policy='require' name='vmx-posted-intr'/>
    <feature policy='require' name='vmx-vintr-pending'/>
    <feature policy='require' name='vmx-tsc-offset'/>
    <feature policy='require' name='vmx-hlt-exit'/>
    <feature policy='require' name='vmx-invlpg-exit'/>
    <feature policy='require' name='vmx-mwait-exit'/>
    <feature policy='require' name='vmx-rdpmc-exit'/>
    <feature policy='require' name='vmx-rdtsc-exit'/>
    <feature policy='require' name='vmx-cr3-load-noexit'/>
    <feature policy='require' name='vmx-cr3-store-noexit'/>
    <feature policy='require' name='vmx-cr8-load-exit'/>
    <feature policy='require' name='vmx-cr8-store-exit'/>
    <feature policy='require' name='vmx-flexpriority'/>
    <feature policy='require' name='vmx-vnmi-pending'/>
    <feature policy='require' name='vmx-movdr-exit'/>
    <feature policy='require' name='vmx-io-exit'/>
    <feature policy='require' name='vmx-io-bitmap'/>
    <feature policy='require' name='vmx-mtf'/>
    <feature policy='require' name='vmx-msr-bitmap'/>
    <feature policy='require' name='vmx-monitor-exit'/>
    <feature policy='require' name='vmx-pause-exit'/>
    <feature policy='require' name='vmx-secondary-ctls'/>
    <feature policy='require' name='vmx-exit-nosave-debugctl'/>
    <feature policy='require' name='vmx-exit-load-perf-global-ctrl'/>
    <feature policy='require' name='vmx-exit-ack-intr'/>
    <feature policy='require' name='vmx-exit-save-pat'/>
    <feature policy='require' name='vmx-exit-load-pat'/>
    <feature policy='require' name='vmx-exit-save-efer'/>
    <feature policy='require' name='vmx-exit-load-efer'/>
    <feature policy='require' name='vmx-exit-save-preemption-timer'/>
    <feature policy='require' name='vmx-entry-noload-debugctl'/>
    <feature policy='require' name='vmx-entry-ia32e-mode'/>
    <feature policy='require' name='vmx-entry-load-perf-global-ctrl'/>
    <feature policy='require' name='vmx-entry-load-pat'/>
    <feature policy='require' name='vmx-entry-load-efer'/>
    <feature policy='require' name='vmx-eptp-switching'/>
    <feature policy='disable' name='hle'/>
    <feature policy='disable' name='rtm'/>
    <feature policy='disable' name='avx512-bf16'/>
    <feature policy='disable' name='taa-no'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
    <timer name='hypervclock' present='yes'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <pm>
    <suspend-to-mem enabled='no'/>
    <suspend-to-disk enabled='no'/>
  </pm>
  <devices>
    <emulator>/run/libvirt/nix-emulators/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/home/spiderunderurbed/virtual-disks/windows.qcow2' index='2'/>
      <backingStore/>
      <target dev='sda' bus='sata'/>
      <alias name='sata0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/home/spiderunderurbed/Downloads/Win11_23H2_English_x64v2.iso' index='1'/>
      <backingStore/>
      <target dev='sdb' bus='sata'/>
      <readonly/>
      <alias name='sata0-0-1'/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <controller type='usb' index='0' model='qemu-xhci' ports='15'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
    </controller>
    <controller type='pci' index='0' model='pcie-root'>
      <alias name='pcie.0'/>
    </controller>
    <controller type='pci' index='1' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='1' port='0x10'/>
      <alias name='pci.1'/>
      <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'/>
      <alias name='pci.2'/>
      <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'/>
      <alias name='pci.3'/>
      <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'/>
      <alias name='pci.4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
    </controller>
    <controller type='pci' index='5' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='5' port='0x14'/>
      <alias name='pci.5'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
    </controller>
    <controller type='pci' index='6' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='6' port='0x15'/>
      <alias name='pci.6'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x5'/>
    </controller>
    <controller type='pci' index='7' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='7' port='0x16'/>
      <alias name='pci.7'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x6'/>
    </controller>
    <controller type='pci' index='8' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='8' port='0x17'/>
      <alias name='pci.8'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x7'/>
    </controller>
    <controller type='pci' index='9' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='9' port='0x18'/>
      <alias name='pci.9'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0' multifunction='on'/>
    </controller>
    <controller type='pci' index='10' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='10' port='0x19'/>
      <alias name='pci.10'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x1'/>
    </controller>
    <controller type='pci' index='11' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='11' port='0x1a'/>
      <alias name='pci.11'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x2'/>
    </controller>
    <controller type='pci' index='12' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='12' port='0x1b'/>
      <alias name='pci.12'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x3'/>
    </controller>
    <controller type='pci' index='13' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='13' port='0x1c'/>
      <alias name='pci.13'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x4'/>
    </controller>
    <controller type='pci' index='14' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='14' port='0x1d'/>
      <alias name='pci.14'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x5'/>
    </controller>
    <controller type='pci' index='15' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='15' port='0x1e'/>
      <alias name='pci.15'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x6'/>
    </controller>
    <controller type='pci' index='16' model='pcie-to-pci-bridge'>
      <model name='pcie-pci-bridge'/>
      <alias name='pci.16'/>
      <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
    </controller>
    <controller type='sata' index='0'>
      <alias name='ide'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </controller>
    <interface type='network'>
      <mac address='52:54:00:2c:1f:5a'/>
      <source network='default' portid='ff8e6e72-7af7-446d-be0c-4f234639cb21' bridge='virbr0'/>
      <target dev='vnet0'/>
      <model type='e1000e'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' 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='spicevmc'>
      <target type='virtio' name='com.redhat.spice.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>
    <graphics type='spice' port='5900' autoport='yes' listen='127.0.0.1'>
      <listen type='address' address='127.0.0.1'/>
      <image compression='off'/>
    </graphics>
    <sound model='ich9'>
      <alias name='sound0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/>
    </sound>
    <audio id='1' type='spice'/>
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
    </video>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev0'/>
      <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x1'/>
      </source>
      <alias name='hostdev1'/>
      <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
    </hostdev>
    <redirdev bus='usb' type='spicevmc'>
      <alias name='redir0'/>
      <address type='usb' bus='0' port='2'/>
    </redirdev>
    <redirdev bus='usb' type='spicevmc'>
      <alias name='redir1'/>
      <address type='usb' bus='0' port='3'/>
    </redirdev>
    <watchdog model='itco' action='reset'>
      <alias name='watchdog0'/>
    </watchdog>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
    </memballoon>
  </devices>
  <seclabel type='dynamic' model='dac' relabel='yes'>
    <label>+1000:+100</label>
    <imagelabel>+1000:+100</imagelabel>
  </seclabel>
</domain>

I have hyper-v and GPU passthrough enabled, plus I added the qemu patch from here, but if its not needed ill remove it

uragan1987 commented 4 months ago

finally, my roblox works just got a little luck to get it

-cpu ...,model=0,...

AstridWasHereLOL commented 4 months ago

finally, my roblox works just got a little luck to get it

-cpu ...,model=0,...

this finally fixed it for me. I'm using an i7-12700KF with a GTX 1050 Ti passthrough (RX 6700XT for host) and after changing the model value roblox stopped erroring

WaviestBalloon commented 4 months ago

If some people want to play Roblox without dealing with the VM configuration and tinkering, using the UWP version of Roblox allows you to play as apparently Hyperion is sand-boxed from being able to check hardware.

I've been able to get it running in a Proxmox VM just fine without a GPU attached with awful performance, obviously: image

CE1CECL commented 3 months ago

Using the patch roblox should work as long as you pass a gpu. From the looks of it, the only checks they act on is if you don't have a valid gpu (or spice/vnc guest running?) and it crashes with "Roblox cannot be run inside a virtual machine". Even if hyperV says that it's a VM, the game just doesn't care 🤷

Omg, it doesn't show "Roblox cannot be run inside a virtual machine" on my machine , it shows "The application encountered an unrecoverable error" I passthoughed a RTX4090 & 1660S

@zhaodice I actually just figured out for me it was due to having testsigning "test mode" on. Turning it off, makes Roblox work, even for the MS Store version. It even works on my chromebook which is how I found out that I configured my software wrong for this.

Here is my XML:

<domain xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0" type="kvm">
  <name>CE1CECL</name>
  <uuid>ebde5900-33e9-11ef-8784-60f2623e44dc</uuid>
  <memory unit="KiB">16777216</memory>
  <currentMemory unit="KiB">16777216</currentMemory>
  <vcpu placement="static">1</vcpu>
  <os>
    <type arch="x86_64" machine="pc-i440fx-7.1">hvm</type>
    <loader readonly="yes" type="pflash">/CE1CECL/OVMF_CODE.fd</loader>
    <nvram template="/CE1CECL/OVMF_VARS.fd">/CE1CECL/CE1CECL.fv</nvram>
    <boot dev="hd"/>
    <bootmenu enable="yes"/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
    <vmport state="off"/>
  </features>
  <cpu mode="custom" match="exact" check="none">
    <model fallback="allow">Penryn</model>
    <topology sockets="1" dies="1" cores="1" threads="1"/>
  </cpu>
  <clock offset="localtime"/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <pm>
    <suspend-to-mem enabled="yes"/>
    <suspend-to-disk enabled="yes"/>
  </pm>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type="file" device="disk">
      <driver name="qemu" type="qcow2"/>
      <source file="/CE1CECL/CE1CECL.qcow2"/>
      <target dev="sda" bus="ide"/>
      <address type="drive" controller="0" bus="0" target="0" unit="0"/>
    </disk>
    <controller type="usb" index="0" model="ich9-ehci1">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x0b" function="0x0"/>
    </controller>
    <controller type="usb" index="0" model="ich9-uhci1">
      <master startport="0"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x1b" function="0x0" multifunction="on"/>
    </controller>
    <controller type="usb" index="0" model="ich9-uhci2">
      <master startport="2"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x0c" function="0x0"/>
    </controller>
    <controller type="usb" index="0" model="ich9-uhci3">
      <master startport="4"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x1c" function="0x0"/>
    </controller>
    <controller type="pci" index="0" model="pci-root"/>
    <controller type="ide" index="0">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x1"/>
    </controller>
    <controller type="sata" index="0">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x0d" function="0x0"/>
    </controller>
    <controller type="virtio-serial" index="0">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x09" function="0x0"/>
    </controller>
    <interface type="network">
      <source network="CE1CECL"/>
      <model type="e1000e"/>
      <link state="up"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x08" function="0x0"/>
    </interface>
    <channel type="spicevmc">
      <target type="virtio" name="com.redhat.spice.0"/>
      <address type="virtio-serial" controller="0" bus="0" port="1"/>
    </channel>
    <channel type="spiceport">
      <source channel="org.spice-space.webdav.0"/>
      <target type="virtio" name="org.spice-space.webdav.0"/>
      <address type="virtio-serial" controller="0" bus="0" port="2"/>
    </channel>
    <input type="mouse" bus="ps2"/>
    <input type="keyboard" bus="ps2"/>
    <input type="tablet" bus="usb">
      <address type="usb" bus="0" port="1"/>
    </input>
    <graphics type="spice">
      <listen type="none"/>
      <gl enable="no"/>
    </graphics>
    <sound model="ich6">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x1d" function="0x0"/>
    </sound>
    <audio id="1" type="spice"/>
    <video>
      <model type="vmvga" vram="131072" heads="1" primary="yes"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x0f" function="0x0"/>
    </video>
    <memballoon model="none"/>
  </devices>
  <qemu:commandline>
    <qemu:arg value="-device"/>
    <qemu:arg value="isa-applesmc,osk=ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"/>
    <qemu:arg value="-cpu"/>
    <qemu:arg value="max,host-cache-info=off,vendor=GenuineIntel,family=6,model=23,stepping=6,model-id=Intel(R) Core(TM)2 Duo CPU     T8300  @ 2.40GHz,pmu=on,hv-spinlocks=0,hv-relaxed=off,hv-vapic=off,hv-time=off,hv-crash=off,hv-reset=off,hv-vpindex=off,hv-runtime=off,hv-synic=off,hv-stimer=off,hv-frequencies=off,hv-reenlightenment=off,hv-tlbflush=off,hv-evmcs=off,hv-ipi=off,hv-stimer-direct=off,hv-avic=off,hv-emsr-bitmap=off,hv-xmm-input=off,hv-tlbflush-ext=off,hv-tlbflush-direct=off,hv-syndbg=off,hv-no-nonarch-coresharing=off,hv-passthrough=off,hv-enforce-cpuid=off,check=on,enforce=off,x-force-features=off,kvm=off,host-phys-bits=off,fill-mtrr-mask=off,full-cpuid-auto-level=off,cpuid-0xb=off,x-vendor-cpuid-only=off,lmce=off,l3-cache=off,kvm-no-smi-migration=on,kvm-pv-enforce-cpuid=off,vmware-cpuid-freq=off,tcg-cpuid=off,x-migrate-smi-count=off,legacy-cache=on,x-hv-synic-kvm-only=off,x-intel-pt-auto-level=off,hv-vendor-id=GenuineIntel,hv-version-id-build=0,hv-version-id-major=0,hv-version-id-minor=0,hv-version-id-spack=0,hv-version-id-sbranch=0,hv-version-id-snumber=0,phys-bits=36,host-phys-bits-limit=48,level-func7=10,level=10,ucode-rev=1551,x-hv-max-vps=0,+vmx-vnmi,+vmx-flexpriority,+vmx-tsc-offset,-vmx-vpid,-acpi,+apic,+clflush,+cmov,+cx16,+cx8,+de,-ds-cpl,-dtes64,-est,+fpu,+fxsr,-ht,+lahf-lm,+lm,+mca,+mce,+mmx,-monitor,+msr,+mtrr,+nx,+pae,+pat,-pbe,+pdcm,+pge,+pni,+pse,+pse36,+sep,+sse,+sse2,+sse4.1,+ssse3,+syscall,-tm,-tm2,+tsc,+vme,+vmx,+xtpr,-3dnow,-3dnowext,-3dnowprefetch,-abm,-ace2,-ace2-en,-adx,-aes,-amd-no-ssb,-amd-ssbd,-amd-stibp,-amx-bf16,-amx-int8,-amx-tile,-arat,-arch-capabilities,-arch-lbr,-avic,-avx,-avx2,-avx512-4fmaps,-avx512-4vnniw,-avx512-bf16,-avx512bitalg,-avx512bw,-avx512cd,-avx512dq,-avx512er,-avx512f,-avx512-fp16,-avx512ifma,-avx512pf,-avx512vbmi,-avx512vbmi2,-avx512vl,-avx512vnni,-avx512-vp2intersect,-avx512-vpopcntdq,-avx-vnni,-bmi1,-bmi2,-bus-lock-detect,-cid,-cldemote,-clflushopt,-clwb,-clzero,-cmp-legacy,-core-capability,-cr8legacy,-dca,-decodeassists,-ds,-erms,-extapic,-f16c,-flushbyasid,-fma,-fma4,-fsgsbase,-fsrm,-full-width-write,-fxsr-opt,-gfni,-hle,-hypervisor,-ia64,-ibpb,-ibrs,-ibrs-all,-ibs,-intel-pt,-intel-pt-lip,-invpcid,-invtsc,-kvm-asyncpf,-kvm-asyncpf-int,-kvmclock,-kvmclock-stable-bit,-kvm-hint-dedicated,-kvm-mmu,-kvm-msi-ext-dest-id,-kvm-nopiodelay,-kvm-poll-control,-kvm-pv-eoi,-kvm-pv-ipi,-kvm-pv-sched-yield,-kvm-pv-tlb-flush,-kvm-pv-unhalt,-kvm-steal-time,-la57,-lbrv,-lwp,-md-clear,-mds-no,-misalignsse,-mmxext,-movbe,-movdir64b,-movdiri,-mpx,-nodeid-msr,-npt,-nrip-save,-osvw,-pause-filter,-pcid,-pclmulqdq,-pcommit,-pdpe1gb,-perfctr-core,-perfctr-nb,-pfthreshold,-phe,-phe-en,-pks,-pku,-pmm,-pmm-en,-pn,-popcnt,-pschange-mc-no,-rdctl-no,-rdpid,-rdrand,-rdseed,-rdtscp,-rsba,-rtm,-serialize,-sgx,-sgx1,-sgx2,-sgx-debug,-sgx-exinfo,-sgx-kss,-sgxlc,-sgx-mode64,-sgx-provisionkey,-sgx-tokenkey,-sha-ni,-skinit,-skip-l1dfl-vmentry,-smap,-smep,-smx,-spec-ctrl,-split-lock-detect,-ss,-ssbd,-ssb-no,-sse4.2,-sse4a,-stibp,-svm,-svme-addr-chk,-svm-lock,-taa-no,-tbm,-tce,-topoext,-tsc-adjust,-tsc-deadline,-tsc-scale,-tsx-ctrl,-tsx-ldtrk,-umip,-vaes,-vgif,-virt-ssbd,-vmcb-clean,-vmx-activity-hlt,-vmx-activity-shutdown,-vmx-activity-wait-sipi,-vmx-apicv-register,-vmx-apicv-vid,-vmx-apicv-x2apic,-vmx-apicv-xapic,-vmx-cr3-load-noexit,-vmx-cr3-store-noexit,-vmx-cr8-load-exit,-vmx-cr8-store-exit,-vmx-desc-exit,-vmx-encls-exit,-vmx-entry-ia32e-mode,-vmx-entry-load-bndcfgs,-vmx-entry-load-efer,-vmx-entry-load-pat,-vmx-entry-load-perf-global-ctrl,-vmx-entry-load-pkrs,-vmx-entry-load-rtit-ctl,-vmx-entry-noload-debugctl,-vmx-ept,-vmx-ept-1gb,-vmx-ept-2mb,-vmx-eptad,-vmx-ept-advanced-exitinfo,-vmx-ept-execonly,-vmx-eptp-switching,-vmx-exit-ack-intr,-vmx-exit-clear-bndcfgs,-vmx-exit-clear-rtit-ctl,-vmx-exit-load-efer,-vmx-exit-load-pat,-vmx-exit-load-perf-global-ctrl,-vmx-exit-load-pkrs,-vmx-exit-nosave-debugctl,-vmx-exit-save-efer,-vmx-exit-save-pat,-vmx-exit-save-preemption-timer,-vmx-hlt-exit,-vmx-ins-outs,-vmx-intr-exit,-vmx-invept,-vmx-invept-all-context,-vmx-invept-single-context,-vmx-invept-single-context-noglobals,-vmx-invlpg-exit,-vmx-invpcid-exit,-vmx-invvpid,-vmx-invvpid-all-context,-vmx-invvpid-single-addr,-vmx-io-bitmap,-vmx-io-exit,-vmx-monitor-exit,-vmx-movdr-exit,-vmx-msr-bitmap,-vmx-mtf,-vmx-mwait-exit,-vmx-nmi-exit,-vmx-page-walk-4,-vmx-page-walk-5,-vmx-pause-exit,-vmx-ple,-vmx-pml,-vmx-posted-intr,-vmx-preemption-timer,-vmx-rdpmc-exit,-vmx-rdrand-exit,-vmx-rdseed-exit,-vmx-rdtsc-exit,-vmx-rdtscp-exit,-vmx-secondary-ctls,-vmx-shadow-vmcs,-vmx-store-lma,-vmx-true-ctls,-vmx-tsc-scaling,-vmx-unrestricted-guest,-vmx-vintr-pending,-vmx-vmfunc,-vmx-vmwrite-vmexit-fields,-vmx-vnmi-pending,-vmx-wbinvd-exit,-vmx-xsaves,-vmx-zero-len-inject,-vpclmulqdq,-v-vmsave-vmload,-waitpkg,-wbnoinvd,-wdt,-x2apic,-xcrypt,-xcrypt-en,-xfd,-xgetbv1,-xop,-xsave,-xsavec,-xsaveerptr,-xsaveopt,-xsaves,-xstore,-xstore-en"/>
  </qemu:commandline>
</domain>

MAKE SURE THE CPU GHZ MATCHES THE HOST, IF YOU WANT TO USE SOMETHING SUCH AS LOCKDOWN BROWSER (else on Respondus you would get a Virtual Moose for them to mismatch, at least on Windows VMs)

wacko37 commented 2 months ago

finally, my roblox works just got a little luck to get it

-cpu ...,model=0,...

@uragan1987 - Thanks so much for fix, can you please explain where I'm to add this into my XML?

AstridWasHereLOL commented 2 months ago

finally, my roblox works just got a little luck to get it -cpu ...,model=0,...

@uragan1987 - Thanks so much for fix, can you please explain where I'm to add this into my XML?

using @CE1CECL's XML file as an example, you put it at the end where the <qemu:commandline> part starts

changing <qemu:arg value="max,host-cache-info=off,vendor=GenuineIntel,family=6,model=23... into <qemu:arg value="max,host-cache-info=off,vendor=GenuineIntel,family=6,model=0...

This immediately fixed it for me, but performance was subpar at best. I don't have a second GPU for passthrough anymore so I cannot test CE1CECL's XML, but it is worth a go before editing values that I honestly don't know what exactly do.

Samuil1337 commented 2 months ago

Also don't forget adding xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0' in the tag and also add this to the bottom of the file before the closing tag:

<qemu:commandline>
    <qemu:arg value='-cpu'/>
    <qemu:arg value='YOUR PARAMETERS HERE'/>
  </qemu:commandline>

Here's the documentation: https://www.libvirt.org/kbase/qemu-passthrough-security.html

Btw why don't you just use host-passthrough mode on your CPU? That one passes all features and metadata over to the virtual CPU, which would be the fastest (also performance wise) and safest option for hiding this part of the VM. As far as I know there are no UUID or serials attached to the CPU itself, but only on the motherboard which can be spoofed using the tag in the section.

wacko37 commented 2 months ago

Also don't forget adding xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0' in the tag and also add this to the bottom of the file before the closing tag:

<qemu:commandline>
    <qemu:arg value='-cpu'/>
    <qemu:arg value='YOUR PARAMETERS HERE'/>
  </qemu:commandline>

Here's the documentation: https://www.libvirt.org/kbase/qemu-passthrough-security.html

Btw why don't you just use host-passthrough mode on your CPU? That one passes all features and metadata over to the virtual CPU, which would be the fastest (also performance wise) and safest option for hiding this part of the VM. As far as I know there are no UUID or serials attached to the CPU itself, but only on the motherboard which can be spoofed using the tag in the section.

Thanks you so much for your time and detailed reply.

Sadly I'm way out of my depth here and have no idea what any of this means when I'm changing it.

My issue with my Unraid Windows 11 VM is that Roblox loads up and then shuts down within 60seconds with no errors message at all. The only thing that has stopped that and allowed Roblox to work (Microsoft store version) is changing the Model=0. But now the problem with that is it's stopped BlueStacks (android emulator) from working now. And there a clear loss in overall performance on other games now.

What does model=0 even change?

I would be happy donate a few dollars to get this issue fixed.

I thought I was using host-passthrough mode on your CPU? Does adding to my XML override all the / entries prior?

CE1CECL commented 2 months ago

Also don't forget adding xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0' in the tag and also add this to the bottom of the file before the closing tag:

<qemu:commandline>
    <qemu:arg value='-cpu'/>
    <qemu:arg value='YOUR PARAMETERS HERE'/>
  </qemu:commandline>

Here's the documentation: https://www.libvirt.org/kbase/qemu-passthrough-security.html Btw why don't you just use host-passthrough mode on your CPU? That one passes all features and metadata over to the virtual CPU, which would be the fastest (also performance wise) and safest option for hiding this part of the VM. As far as I know there are no UUID or serials attached to the CPU itself, but only on the motherboard which can be spoofed using the tag in the section.

Thanks you so much for your time and detailed reply.

Sadly I'm way out of my depth here and have no idea what any of this means when I'm changing it.

My issue with my Unraid Windows 11 VM is that Roblox loads up and then shuts down within 60seconds with no errors message at all. The only thing that has stopped that and allowed Roblox to work (Microsoft store version) is changing the Model=0. But now the problem with that is it's stopped BlueStacks (android emulator) from working now. And there a clear loss in overall performance on other games now.

What does model=0 even change?

I would be happy donate a few dollars to get this issue fixed.

I thought I was using host-passthrough mode on your CPU? Does adding qemu:commandline to my XML override all the / entries prior?

model=0 is technically invalid, but it tells the OS what generation the CPU is, such as what year, and type (i.e: Atom, Celeron, Pentium, Core, etc...) I made it be the way it is above so that macOS boots in my VM without a panic. the flags ",-" / ",+" tells the OS what features the CPU has, the max tells the OS turn everything on (but not really in my case, as everything is configured) but not all features can be + anyways (usually because its unimplemented or unsupported by QEMU or CPU)

wacko37 commented 2 months ago

Also don't forget adding xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0' in the tag and also add this to the bottom of the file before the closing tag:

<qemu:commandline>
    <qemu:arg value='-cpu'/>
    <qemu:arg value='YOUR PARAMETERS HERE'/>
  </qemu:commandline>

Here's the documentation: https://www.libvirt.org/kbase/qemu-passthrough-security.html Btw why don't you just use host-passthrough mode on your CPU? That one passes all features and metadata over to the virtual CPU, which would be the fastest (also performance wise) and safest option for hiding this part of the VM. As far as I know there are no UUID or serials attached to the CPU itself, but only on the motherboard which can be spoofed using the tag in the section.

Thanks you so much for your time and detailed reply. Sadly I'm way out of my depth here and have no idea what any of this means when I'm changing it. My issue with my Unraid Windows 11 VM is that Roblox loads up and then shuts down within 60seconds with no errors message at all. The only thing that has stopped that and allowed Roblox to work (Microsoft store version) is changing the Model=0. But now the problem with that is it's stopped BlueStacks (android emulator) from working now. And there a clear loss in overall performance on other games now. What does model=0 even change? I would be happy donate a few dollars to get this issue fixed. I thought I was using host-passthrough mode on your CPU? Does adding qemu:commandline to my XML override all the / entries prior?

model=0 is technically invalid, but it tells the OS what generation the CPU is, such as what year, and type (i.e: Atom, Celeron, Pentium, Core, etc...) I made it be the way it is above so that macOS boots in my VM without a panic. the flags ",-" / ",+" tells the OS what features the CPU has, the max tells the OS turn everything on (but not really in my case, as everything is configured) but not all features can be + anyways (usually because its unimplemented or unsupported by QEMU or CPU)

Thanks for the information and all that you do @CE1CECL, your efforts helped get me the result I needed. I was able to change the "model" info without the need for within the Unraid VM XML which got UWP Roblox working for my kids (that's got them off my back for a while....lol)

Please see detailed info here: https://forums.unraid.net/topic/170473-successfully-running-roblox-microsoft-store-version-on-my-windows-11-vm/

CE1CECL commented 2 months ago

Also don't forget adding xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0' in the tag and also add this to the bottom of the file before the closing tag:

<qemu:commandline>
    <qemu:arg value='-cpu'/>
    <qemu:arg value='YOUR PARAMETERS HERE'/>
  </qemu:commandline>

Here's the documentation: https://www.libvirt.org/kbase/qemu-passthrough-security.html Btw why don't you just use host-passthrough mode on your CPU? That one passes all features and metadata over to the virtual CPU, which would be the fastest (also performance wise) and safest option for hiding this part of the VM. As far as I know there are no UUID or serials attached to the CPU itself, but only on the motherboard which can be spoofed using the tag in the section.

Thanks you so much for your time and detailed reply. Sadly I'm way out of my depth here and have no idea what any of this means when I'm changing it. My issue with my Unraid Windows 11 VM is that Roblox loads up and then shuts down within 60seconds with no errors message at all. The only thing that has stopped that and allowed Roblox to work (Microsoft store version) is changing the Model=0. But now the problem with that is it's stopped BlueStacks (android emulator) from working now. And there a clear loss in overall performance on other games now. What does model=0 even change? I would be happy donate a few dollars to get this issue fixed. I thought I was using host-passthrough mode on your CPU? Does adding qemu:commandline to my XML override all the / entries prior?

model=0 is technically invalid, but it tells the OS what generation the CPU is, such as what year, and type (i.e: Atom, Celeron, Pentium, Core, etc...) I made it be the way it is above so that macOS boots in my VM without a panic. the flags ",-" / ",+" tells the OS what features the CPU has, the max tells the OS turn everything on (but not really in my case, as everything is configured) but not all features can be + anyways (usually because its unimplemented or unsupported by QEMU or CPU)

Thanks for the information and all that you do @CE1CECL, your efforts helped get me the result I needed. I was able to change the "model" info without the need for qemu:commandline within the Unraid VM XML which got UWP Roblox working for my kids (that's got them off my back for a while....lol)

Please see detailed info here: https://forums.unraid.net/topic/170473-successfully-running-roblox-microsoft-store-version-on-my-windows-11-vm/

I'm glad for you! -cpu Skylake-Client == -cpu host,family=6,model=94,stepping=3 for those wondering as well (https://github.com/qemu/qemu/blob/23fa74974d8c96bc95cbecc0d4e2d90f984939f6/target/i386/cpu.c#L3372) (where -cpu host is a CPU on the -cpu help list, including -cpu Skylake-Client)

IckyTheBiggy commented 1 month ago

So I have this working Roblox starts no problem, but then Roblox proceeds to crash after anywhere from 10-50mins of playing, and I'm not sure what the issue is I thought it was virtual machine sided, but it doesn't seem to be the case the logs seem to be Hyper-V related any help would be appreciated.

Here is the XML for my VM


  <name>windows</name>
  <uuid>6014a275-50aa-4f92-b559-d365a7ae1a90</uuid>
  <metadata>
    <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
      <libosinfo:os id="http://microsoft.com/win/10"/>
    </libosinfo:libosinfo>
  </metadata>
  <memory unit="KiB">16777216</memory>
  <currentMemory unit="KiB">16777216</currentMemory>
  <vcpu placement="static">12</vcpu>
  <os firmware="efi">
    <type arch="x86_64" machine="pc-q35-8.2">hvm</type>
    <firmware>
      <feature enabled="no" name="enrolled-keys"/>
      <feature enabled="no" name="secure-boot"/>
    </firmware>
    <loader readonly="yes" type="pflash">/usr/share/edk2/x64/OVMF_CODE.4m.fd</loader>
    <nvram template="/usr/share/edk2/x64/OVMF_VARS.4m.fd">/var/lib/libvirt/qemu/nvram/windows_VARS.fd</nvram>
    <boot dev="hd"/>
    <bootmenu enable="no"/>
    <smbios mode="host"/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hap state="on"/>
    <hyperv mode="custom">
      <relaxed state="on"/>
      <vapic state="on"/>
      <spinlocks state="on" retries="8191"/>
      <synic state="off"/>
      <stimer state="off"/>
      <vendor_id state="on" value="none"/>
    </hyperv>
    <kvm>
      <hidden state="on"/>
    </kvm>
    <vmport state="off"/>
    <ioapic driver="kvm"/>
  </features>
  <cpu mode="host-passthrough" check="none" migratable="off">
    <topology sockets="1" dies="1" clusters="1" cores="6" threads="2"/>
    <cache mode="passthrough"/>
    <feature policy="disable" name="amd-stibp"/>
    <feature policy="require" name="topoext"/>
    <feature policy="require" name="invtsc"/>
  </cpu>
  <clock offset="localtime">
    <timer name="pit" tickpolicy="delay"/>
    <timer name="rtc" tickpolicy="catchup" track="guest"/>
    <timer name="hpet" present="no"/>
    <timer name="tsc" present="yes" mode="native"/>
    <timer name="hypervclock" present="yes"/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <pm>
    <suspend-to-mem enabled="no"/>
    <suspend-to-disk enabled="no"/>
  </pm>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type="file" device="disk">
      <driver name="qemu" type="qcow2"/>
      <source file="/home/bnn/VirtualMachines/win10.qcow2"/>
      <target dev="sda" bus="virtio"/>
      <address type="pci" domain="0x0000" bus="0x05" slot="0x00" function="0x0"/>
    </disk>
    <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="pci" index="5" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="5" port="0x14"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x4"/>
    </controller>
    <controller type="pci" index="6" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="6" port="0x15"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x5"/>
    </controller>
    <controller type="pci" index="7" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="7" port="0x16"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x6"/>
    </controller>
    <controller type="pci" index="8" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="8" port="0x17"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x7"/>
    </controller>
    <controller type="pci" index="9" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="9" port="0x18"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x0" multifunction="on"/>
    </controller>
    <controller type="pci" index="10" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="10" port="0x19"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x1"/>
    </controller>
    <controller type="pci" index="11" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="11" port="0x1a"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x2"/>
    </controller>
    <controller type="pci" index="12" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="12" port="0x1b"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x3"/>
    </controller>
    <controller type="pci" index="13" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="13" port="0x1c"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x4"/>
    </controller>
    <controller type="pci" index="14" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="14" port="0x1d"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x5"/>
    </controller>
    <controller type="pci" index="15" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="15" port="0x1e"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x6"/>
    </controller>
    <controller type="pci" index="16" model="pcie-to-pci-bridge">
      <model name="pcie-pci-bridge"/>
      <address type="pci" domain="0x0000" bus="0x08" slot="0x00" function="0x0"/>
    </controller>
    <controller type="sata" index="0">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x1f" function="0x2"/>
    </controller>
    <controller type="virtio-serial" index="0">
      <address type="pci" domain="0x0000" bus="0x03" slot="0x00" function="0x0"/>
    </controller>
    <controller type="usb" index="0" model="qemu-xhci" ports="15">
      <address type="pci" domain="0x0000" bus="0x02" slot="0x00" function="0x0"/>
    </controller>
    <interface type="network">
      <mac address="52:54:00:0f:b4:4e"/>
      <source network="default"/>
      <model type="e1000e"/>
      <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>
    <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">
      <listen type="none"/>
    </graphics>
    <sound model="ich9">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x1b" function="0x0"/>
    </sound>
    <audio id="1" type="none"/>
    <video>
      <model type="qxl" ram="65536" vram="65536" vgamem="16384" heads="1" primary="yes"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0"/>
    </video>
    <hostdev mode="subsystem" type="pci" managed="yes">
      <source>
        <address domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
      </source>
      <rom file="/usr/share/vgabios/vbios.rom"/>
      <address type="pci" domain="0x0000" bus="0x06" slot="0x00" function="0x0"/>
    </hostdev>
    <hostdev mode="subsystem" type="pci" managed="yes">
      <source>
        <address domain="0x0000" bus="0x01" slot="0x00" function="0x1"/>
      </source>
      <address type="pci" domain="0x0000" bus="0x07" slot="0x00" function="0x0"/>
    </hostdev>
    <hostdev mode="subsystem" type="usb" managed="yes">
      <source>
        <vendor id="0x046d"/>
        <product id="0xc08b"/>
      </source>
      <address type="usb" bus="0" port="2"/>
    </hostdev>
    <hostdev mode="subsystem" type="usb" managed="yes">
      <source>
        <vendor id="0x0db0"/>
        <product id="0x6cc9"/>
      </source>
      <address type="usb" bus="0" port="3"/>
    </hostdev>
    <hostdev mode="subsystem" type="usb" managed="yes">
      <source>
        <vendor id="0x03f0"/>
        <product id="0x0d8b"/>
      </source>
      <address type="usb" bus="0" port="4"/>
    </hostdev>
    <hostdev mode="subsystem" type="usb" managed="yes">
      <source>
        <vendor id="0x258a"/>
        <product id="0x0049"/>
      </source>
      <address type="usb" bus="0" port="5"/>
    </hostdev>
    <watchdog model="itco" action="reset"/>
    <memballoon model="virtio">
      <address type="pci" domain="0x0000" bus="0x04" slot="0x00" function="0x0"/>
    </memballoon>
  </devices>
</domain>
Extravi commented 1 day ago

Roblox does not check for a GPU; you must use a CPU model passthrough, not a host. Sometimes, the default model does not work on some CPUs, so try a few until you find one that works for your configuration, such as setting your model to Xeon or Skylake. Also, you do not need to use Hyper-v, and this works with the default Linux kernel that ships with most distros or the tkg kernel. image image image image

Extravi commented 1 day ago

This is the setting you need to change, and it should work without hyper-v. image image

YoinkedYoink commented 1 day ago

The issue has mostly been remedied by vinegarhq's sober project.

But if you need to use a vm or don't care about the windows and qemu/kvm overhead then the above solution will work.

Extravi commented 1 day ago

Roblox is tightening security on Android alongside that some people don't want to run a proprietary application on their Linux install.

Extravi commented 1 day ago

Also, that project depends on the x86 version of the application for Android which Roblox may discontinue at any time.

WaviestBalloon commented 1 day ago

Roblox does not check for a GPU; you must use a CPU model passthrough, not a host. Sometimes, the default model does not work on some CPUs, so try a few until you find one that works for your configuration, such as setting your model to Xeon or Skylake. Also, you do not need to use Hyper-v, and this works with the default Linux kernel that ships with most distros or the tkg kernel.

Did you use the UWP version of Roblox? Because to my knowledge, the non-UWP build of Roblox does check for a dedicated GPU to be connected to the VM and will trip if it detects a generic adapter and keep in mind, you'll be stuck with software rendering which isn't the best.

Extravi commented 18 hours ago

Roblox does not check for a GPU; you must use a CPU model passthrough, not a host. Sometimes, the default model does not work on some CPUs, so try a few until you find one that works for your configuration, such as setting your model to Xeon or Skylake. Also, you do not need to use Hyper-v, and this works with the default Linux kernel that ships with most distros or the tkg kernel.

Did you use the UWP version of Roblox? Because to my knowledge, the non-UWP build of Roblox does check for a dedicated GPU to be connected to the VM and will trip if it detects a generic adapter and keep in mind, you'll be stuck with software rendering which isn't the best.

No I was using the desktop web version of Roblox