Giter Club home page Giter Club logo

qemu-anti-detection's Introduction

Other Project

For Proxmox VE(PVE) Anti Detection, see https://github.com/zhaodice/proxmox-ve-anti-detection

QEMU Anti Detection

A patch for various QEMU versions that aims to prevent VM detection methods based on data reported by the emulator. The "QEMU keyboard" for example is then renamed to "ASUS keyboard". Serial numbers, the VM bit in the guest's UEFI and the Boot Graphics Record Table are also modified. However, because of timing based attacks like RDTSC, which is reported incorrectly in a VM, this is not a silver bullet. But changing this information of the virtual devices is still an integral part of creating an undetected virutal machine.

Type Engine Bypass
AntiCheat Anti Cheat Expert (ACE) ☑️
AntiCheat Easy Anti Cheat (EAC) ☑️
AntiCheat Gepard Shield ☑️ (Needs patched kernel on host: https://github.com/WCharacter/RDTSC-KVM-Handler )
AntiCheat Mhyprot ☑️
AntiCheat nProtect GameGuard (NP) ☑️
AntiCheat Roblox ☑️ May work with Hyper-V in the guest: #56
AntiCheat Vanguard ‼️(1: Incorrect function)
Encrypt Enigma Protector ☑️
Encrypt Safegine Shielden ☑️
Encrypt Themida ☑️
Encrypt VMProtect ☑️
Encrypt VProtect ☑️

‼️ There are games that cannot run under this environment but I am not sure whether QEMU has been detected, because the game doesn't report "Virtual machine detected" specifically. If you have any clue, feel free to tell me :)

Flaws this patch does not fix in QEMU's source:

These commands exit with "No instance(s) available" and could therefore EXPOSE THE VM. We do not yet know how to simulate this data.

wmic path Win32_Fan get *

wmic path Win32_CacheMemory get *

wmic path Win32_VoltageProbe get *

wmic path Win32_PerfFormattedData_Counters_ThermalZoneInformation get *

wmic path CIM_Memory get *

wmic path CIM_Sensor get *

wmic path CIM_NumericSensor get *

wmic path CIM_TemperatureSensor get *

wmic path CIM_VoltageSensor get *

Build Dependencies

⚠️ Always maintain an installation of QEMU managed by your package manager, because it may delete necessary runtime dependencies otherwise! The binaries you compile are saved in /usr/local/bin, so they will take precedence.

Arch: sudo pacman -S git wget base-devel glib2 ninja python

Ubuntu: sudo apt install git build-essential ninja-build python-venv libglib2.0-0 flex bison

Patching and building QEMU

git clone https://github.com/zhaodice/qemu-anti-detection.git
wget https://download.qemu.org/qemu-8.2.2.tar.xz
tar xvJf qemu-8.2.2.tar.xz
cd qemu-8.2.2
git apply ../qemu-anti-detection/qemu-8.2.0.patch
./configure
sudo make install -j$(nproc)

QEMU XML Config

Insert YOUR virtual machine's uuid.

<domain xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0" type="kvm">
  <name>Entertainment</name>
  <uuid>REPLACE YOUR UUID HERE!</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">1548288</memory>
  <currentMemory unit="KiB">1548288</currentMemory>
  <memoryBacking>
    <source type="memfd"/>
    <access mode="shared"/>
  </memoryBacking>
  <vcpu placement="static">12</vcpu>
  <os firmware="efi">
    <type arch="x86_64" machine="pc-q35-7.0">hvm</type>
    <loader/>
    <smbios mode="host"/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv mode="custom">
      <relaxed state="on"/>
      <vapic state="on"/>
      <spinlocks state="on" retries="8191"/>
      <vendor_id state="on" value="GenuineIntel"/>
    </hyperv>
    <kvm>
      <hidden state="on"/>
    </kvm>
    <vmport state="off"/>
    <smm state="on"/>
    <ioapic driver="kvm"/>
  </features>
  <cpu mode="host-passthrough" check="none" migratable="on">
    <feature policy="disable" name="hypervisor"/>
  </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>
  <qemu:commandline>
    <qemu:arg value="-smbios"/>
    <qemu:arg value="type=0,version=UX305UA.201"/>
    <qemu:arg value="-smbios"/>
    <qemu:arg value="type=1,manufacturer=ASUS,product=UX305UA,version=2021.1"/>
    <qemu:arg value="-smbios"/>
    <qemu:arg value="type=2,manufacturer=Intel,version=2021.5,product=Intel i9-12900K"/>
    <qemu:arg value="-smbios"/>
    <qemu:arg value="type=3,manufacturer=XBZJ"/>
    <qemu:arg value="-smbios"/>
    <qemu:arg value="type=17,manufacturer=KINGSTON,loc_pfx=DDR5,speed=4800,serial=000000,part=0000"/>
    <qemu:arg value="-smbios"/>
    <qemu:arg value="type=4,manufacturer=Intel,max-speed=4800,current-speed=4800"/>
    <qemu:arg value="-cpu"/>
    <qemu:arg value="host,family=6,model=158,stepping=2,model_id=Intel(R) Core(TM) i9-12900K CPU @ 2.60GHz,vmware-cpuid-freq=false,enforce=false,host-phys-bits=true,hypervisor=off"/>
    <qemu:arg value="-machine"/>
    <qemu:arg value="q35,kernel_irqchip=on"/>
  </qemu:commandline>
</domain>

Screenshot_20220819_230305

qemu-anti-detection's People

Contributors

fecet avatar ios7jbpro avatar nick82285 avatar samuil1337 avatar tyrypyrking avatar verifizieren avatar zhaodice avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qemu-anti-detection's Issues

Support QEMU 8.0.2

Can you please support latest stable v8.0.2?

Currently I get this error:

❯ git apply qemu-8.0.5.patch
error: patch failed: hw/i386/pc.c:112
error: hw/i386/pc.c: patch does not apply

Failed at compilation

ubuntu last release and updated.
After trying to apply the patch 7.2:
git apply qemu-7.2.patch error: le patch a échoué : block/vhdx.c:2007 error: block/vhdx.c : le patch ne s'applique pas error: le patch a échoué : hw/i386/pc.c:103 error: hw/i386/pc.c : le patch ne s'applique pas error: le patch a échoué : hw/nvme/ctrl.c:7375 error: hw/nvme/ctrl.c : le patch ne s'applique pas error: le patch a échoué : hw/usb/dev-network.c:99 error: hw/usb/dev-network.c : le patch ne s'applique pas error: le patch a échoué : include/hw/pci/pci.h:72 error: include/hw/pci/pci.h : le patch ne s'applique pas error: le patch a échoué : target/s390x/tcg/misc_helper.c:329 error: target/s390x/tcg/misc_helper.c : le patch ne s'applique pas
After make:
[935/2777] Compiling C object libblock.fa.p/block_curl.c.o FAILED: libblock.fa.p/block_curl.c.o cc -m64 -mcx16 -Ilibblock.fa.p -I. -I../qemu -Iqapi -Itrace -Iui -Iui/shader -Iblock -I/usr/include/p11-kit-1 -I/usr/include/x86_64-linux-gnu -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O2 -g -isystem /home/t3zo/qemu/linux-headers -isystem linux-headers -iquote . -iquote /home/t3zo/qemu -iquote /home/t3zo/qemu/include -iquote /home/t3zo/qemu/disas/libvixl -iquote /home/t3zo/qemu/tcg/i386 -pthread -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -fPIE -MD -MQ libblock.fa.p/block_curl.c.o -MF libblock.fa.p/block_curl.c.o.d -o libblock.fa.p/block_curl.c.o -c ../qemu/block/curl.c ../qemu/block/curl.c: In function ‘curl_init_state’: ../qemu/block/curl.c:515:9: error: ‘CURLOPT_PROTOCOLS’ is deprecated: since 7.85.0. Use CURLOPT_PROTOCOLS_STR [-Werror=deprecated-declarations] 515 | if (curl_easy_setopt(state->curl, CURLOPT_PROTOCOLS, PROTOCOLS) || | ^~ In file included from ../qemu/block/curl.c:34: /usr/include/x86_64-linux-gnu/curl/curl.h:1749:3: note: declared here 1749 | CURLOPTDEPRECATED(CURLOPT_PROTOCOLS, CURLOPTTYPE_LONG, 181, | ^~~~~~~~~~~~~~~~~ ../qemu/block/curl.c:516:13: error: ‘CURLOPT_REDIR_PROTOCOLS’ is deprecated: since 7.85.0. Use CURLOPT_REDIR_PROTOCOLS_STR [-Werror=deprecated-declarations] 516 | curl_easy_setopt(state->curl, CURLOPT_REDIR_PROTOCOLS, PROTOCOLS)) { | ^~~~~~~~~~~~~~~~ /usr/include/x86_64-linux-gnu/curl/curl.h:1755:3: note: declared here 1755 | CURLOPTDEPRECATED(CURLOPT_REDIR_PROTOCOLS, CURLOPTTYPE_LONG, 182, | ^~~~~~~~~~~~~~~~~ ../qemu/block/curl.c: In function ‘curl_open’: ../qemu/block/curl.c:799:5: error: ‘CURLINFO_CONTENT_LENGTH_DOWNLOAD’ is deprecated: since 7.55.0. Use CURLINFO_CONTENT_LENGTH_DOWNLOAD_T [-Werror=deprecated-declarations] 799 | if (curl_easy_getinfo(state->curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &d)) { | ^~ /usr/include/x86_64-linux-gnu/curl/curl.h:2858:3: note: declared here 2858 | CURLINFO_CONTENT_LENGTH_DOWNLOAD | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors ninja: build stopped: subcommand failed. make: *** [Makefile:163 : run-ninja] Erreur 1
Any advice? Thks in advance and thks for your work.

Contact

能不能给个联系方式,想交流一下,wx或者telegram

USB redirection is not supported by this version of QEMU

启动虚拟机时会报错 或者 修改xml

unsupported configuration: USB redirection is not supported by this version of QEMU

Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/delete.py", line 338, in remove_devobj_internal
vm.remove_device(devobj)
File "/usr/share/virt-manager/virtManager/object/domain.py", line 623, in remove_device
self._redefine_xmlobj(xmlobj)
File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 391, in _redefine_xmlobj
self._redefine_xml_internal(origxml, newxml)
File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 374, in _redefine_xml_internal
self._define(newxml)
File "/usr/share/virt-manager/virtManager/object/domain.py", line 1119, in _define
self.conn.define_domain(xml)
File "/usr/share/virt-manager/virtManager/connection.py", line 554, in define_domain
return self._backend.defineXML(xml)
File "/usr/lib/python3/dist-packages/libvirt.py", line 4414, in defineXML
raise libvirtError('virDomainDefineXML() failed')
libvirt.libvirtError: unsupported configuration: USB redirection is not supported by this version of QEMU

是要修改哪个补丁文件的usb重定向配置 来支持吗

Can't install & patch Qemu 8.2

I cannot install qemu 8.2 and patch it using this command.

sudo apt-get update
sudo apt-get update  && sudo apt-get install -y     binutils-mingw-w64     binutils-mingw-w64-i686     binutils-mingw-w64-x86-64     build-essential     clang     g++-mingw-w64     g++-mingw-w64-i686     g++-mingw-w64-x86-64     gcc-mingw-w64     gcc-mingw-w64-i686     gcc-mingw-w64-x86-64     git     git-email     gnutls-bin     libaio-dev     libbluetooth-dev     libbrlapi-dev     libbz2-dev     libcacard-dev     libcap-dev     libcap-ng-dev     libcurl4-gnutls-dev     libibverbs-dev     libiscsi-dev     libfdt-dev     libglib2.0-dev     libgtk-3-dev     libjpeg8-dev     liblzo2-dev     libncurses5-dev     libncursesw5-dev     libnfs-dev     libnuma-dev     libpam0g-dev     libpixman-1-dev     librbd-dev     librdmacm-dev     libsasl2-dev     libsdl1.2-dev     libsdl2-dev     libsdl2-image-dev     libseccomp-dev     libsnappy-dev     libssh2-1-dev     libusb-1.0-0-dev     libusb-dev     libvde-dev     libvdeplug-dev     libvirglrenderer-dev     libvte-2.91-dev     libxen-dev     libxml2-dev     libz-mingw-w64-dev     libzstd-dev     ninja-build     valgrind     win-iconv-mingw-w64-dev     xfslibs-dev     zlib1g-dev libspice-protocol-dev libspice-server-dev libusbredirparser-dev libusbredirparser1

git clone https://gitlab.com/qemu-project/qemu/ -b v8.2.0 --depth 1 --recursive
cd qemu
git apply qemu8.2.0.patch
cd ..
mkdir qemu_build
cd qemu_build
../qemu/configure --target-list=x86_64-softmmu,x86_64-linux-user --prefix=/usr
make -j $(nproc)
sudo make install
error: can't open patch 'qemu8.2.0.patch': No such file or directory
python determined to be '/usr/bin/python3'
python version: Python 3.10.12

*** Ouch! ***

Python's ensurepip module is not found.
It's normally part of the Python standard library, maybe your distribution packages it separately?
Either install ensurepip, or alleviate the need for it in the first place by installing pip and setuptools for '/usr/bin/python3'.
(Hint: Debian puts ensurepip in its python3-venv package.) 



ERROR: python venv creation failed

make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target 'install'.  Stop.

Detection Tool

Can you provide the download link of the virtual machine detection tool used in the screenshot?

Error: CURLOPT_REDIR_PROTOCOLS is deprecated

Hello I was just trying to compile this but right after I ran "make" right after configuring it would return the error CURLOPT_REDIR_PROTOCOLS is deprecated along side a few other deprecated errors.

I am running a arch based distro so the packages I am using might be a bit different but I doubt I should be that big of a deal.

Missing files

Where can I find files?
/passthough/vbios_gvt_uefi.rom
/passthough/OVMF_VARS.fd

And what are these files for in the directory qemu-anti-detection/deb/?

GPU Passthrough error code 43

Hello, i have success passthrough rtx3050 laptop gpu on orginal qemu kvm
But error 43 when use your custom qemu
How to fix that?

Whats a problem?

Trying for patch
`cod@cod-virtual-machine:~/qemu$ git apply /home/cod/Desktop/AND/qemu-7.0.0.patch

error: patch failed: block/vhdx.c:2005
error: block/vhdx.c: patch does not apply
error: patch failed: block/vvfat.c:1174
error: block/vvfat.c: patch does not apply
error: patch failed: chardev/msmouse.c:150
error: chardev/msmouse.c: patch does not apply
error: patch failed: chardev/wctablet.c:179
error: chardev/wctablet.c: patch does not apply
error: patch failed: contrib/vhost-user-gpu/vhost-user-gpu.c:1190
error: contrib/vhost-user-gpu/vhost-user-gpu.c: patch does not apply
error: patch failed: hw/acpi/aml-build.c:1724
error: hw/acpi/aml-build.c: patch does not apply
error: patch failed: hw/arm/nseries.c:847
error: hw/arm/nseries.c: patch does not apply
error: patch failed: hw/arm/sbsa-ref.c:835
error: hw/arm/sbsa-ref.c: patch does not apply
error: patch failed: hw/arm/virt-acpi-build.c:95
error: hw/arm/virt-acpi-build.c: patch does not apply
error: patch failed: hw/arm/virt.c:1588
error: hw/arm/virt.c: patch does not apply
error: patch failed: hw/audio/hda-codec.c:117
error: hw/audio/hda-codec.c: patch does not apply
error: patch failed: hw/char/escc.c:959
error: hw/char/escc.c: patch does not apply
error: patch failed: hw/display/edid-generate.c:394
error: hw/display/edid-generate.c: patch does not apply
error: patch failed: hw/i386/acpi-build.c:2674
error: hw/i386/acpi-build.c: patch does not apply
error: patch failed: hw/i386/fw_cfg.c:208
error: hw/i386/fw_cfg.c: patch does not apply
error: patch failed: hw/i386/pc_piix.c:174
error: hw/i386/pc_piix.c: patch does not apply
error: patch failed: hw/i386/pc_q35.c:197
error: hw/i386/pc_q35.c: patch does not apply
error: patch failed: hw/ide/atapi.c:796
error: hw/ide/atapi.c: patch does not apply
error: patch failed: hw/ide/core.c:2560
error: hw/ide/core.c: patch does not apply
error: patch failed: hw/input/adb-kbd.c:356
error: hw/input/adb-kbd.c: patch does not apply
error: patch failed: hw/input/adb-mouse.c:236
error: hw/input/adb-mouse.c: patch does not apply
error: patch failed: hw/input/ads7846.c:154
error: hw/input/ads7846.c: patch does not apply
error: patch failed: hw/input/hid.c:511
error: hw/input/hid.c: patch does not apply
error: patch failed: hw/input/ps2.c:1219
error: hw/input/ps2.c: patch does not apply
error: patch failed: hw/input/tsc2005.c:510
error: hw/input/tsc2005.c: patch does not apply
error: patch failed: hw/input/tsc210x.c:1106
error: hw/input/tsc210x.c: patch does not apply
error: patch failed: hw/input/virtio-input-hid.c:16
error: hw/input/virtio-input-hid.c: patch does not apply
error: patch failed: hw/m68k/virt.c:271
error: hw/m68k/virt.c: patch does not apply
error: patch failed: hw/nvme/ctrl.c:6710
error: hw/nvme/ctrl.c: patch does not apply
error: patch failed: hw/nvram/fw_cfg.c:56
error: hw/nvram/fw_cfg.c: patch does not apply
error: patch failed: hw/pci-host/gpex.c:207
error: hw/pci-host/gpex.c: patch does not apply
error: patch failed: hw/ppc/e500plat.c:22
error: hw/ppc/e500plat.c: patch does not apply
error: patch failed: hw/scsi/mptconfig.c:189
error: hw/scsi/mptconfig.c: patch does not apply
error: patch failed: hw/scsi/scsi-bus.c:555
error: hw/scsi/scsi-bus.c: patch does not apply
error: patch failed: hw/scsi/scsi-disk.c:2395
error: hw/scsi/scsi-disk.c: patch does not apply
error: patch failed: hw/scsi/spapr_vscsi.c:713
error: hw/scsi/spapr_vscsi.c: patch does not apply
error: patch failed: hw/usb/dev-audio.c:73
error: hw/usb/dev-audio.c: patch does not apply
error: patch failed: hw/usb/dev-hid.c:63
error: hw/usb/dev-hid.c: patch does not apply
error: patch failed: hw/usb/dev-hub.c:104
error: hw/usb/dev-hub.c: patch does not apply
error: patch failed: hw/usb/dev-mtp.c:248
error: hw/usb/dev-mtp.c: patch does not apply
error: patch failed: hw/usb/dev-network.c:97
error: hw/usb/dev-network.c: patch does not apply
error: patch failed: hw/usb/dev-serial.c:119
error: hw/usb/dev-serial.c: patch does not apply
error: patch failed: hw/usb/dev-smartcard-reader.c:80
error: hw/usb/dev-smartcard-reader.c: patch does not apply
error: patch failed: hw/usb/dev-storage.c:47
error: hw/usb/dev-storage.c: patch does not apply
error: patch failed: hw/usb/dev-uas.c:171
error: hw/usb/dev-uas.c: patch does not apply
error: patch failed: hw/usb/dev-wacom.c:64
error: hw/usb/dev-wacom.c: patch does not apply
error: patch failed: hw/usb/u2f-emulated.c:386
error: hw/usb/u2f-emulated.c: patch does not apply
error: patch failed: hw/usb/u2f-passthru.c:531
error: hw/usb/u2f-passthru.c: patch does not apply
error: patch failed: hw/usb/u2f.c:46
error: hw/usb/u2f.c: patch does not apply
error: patch failed: include/hw/acpi/aml-build.h:4
error: include/hw/acpi/aml-build.h: patch does not apply
error: patch failed: include/hw/i386/pc.h:290
error: include/hw/i386/pc.h: patch does not apply
error: patch failed: include/hw/pci/pci.h:71
error: include/hw/pci/pci.h: patch does not apply
error: patch failed: include/standard-headers/linux/qemu_fw_cfg.h:4
error: include/standard-headers/linux/qemu_fw_cfg.h: patch does not apply
error: patch failed: migration/migration.c:1190
error: migration/migration.c: patch does not apply
error: patch failed: migration/rdma.c:248
error: migration/rdma.c: patch does not apply
error: patch failed: pc-bios/optionrom/optionrom.h:43
error: pc-bios/optionrom/optionrom.h: patch does not apply
error: patch failed: pc-bios/s390-ccw/virtio-scsi.h:25
error: pc-bios/s390-ccw/virtio-scsi.h: patch does not apply
error: patch failed: target/i386/kvm/kvm.c:1694
error: target/i386/kvm/kvm.c: patch does not apply
error: patch failed: target/s390x/tcg/misc_helper.c:322
error: target/s390x/tcg/misc_helper.c: patch does not apply
error: patch failed: ui/spice-core.c:807
error: ui/spice-core.c: patch does not apply
cod@cod-virtual-machine:~/qemu$ `

Is it possible to use virtio with this?

Okay so basically I used the latest patch to make a version for the newest qemu version but that issue is also present when applying the patch to v8.0.3. For some reason I am not able to use virtio on the win guest but I don't really know what that is the case. It might be, because of some strings that virtio uses to get the devices? Anyways how could I fix that?

编译后无法启动虚拟机

以下这个是报错:
qemu unexpectedly closed the monitor: qemu-system-x86_64: -chardev socket,id=charmonitor,fd=32,server,nowait: warning: short-form boolean option server deprecated Please use server=on instead qemu-system-x86_64: -chardev socket,id=charmonitor,fd=32,server,nowait: warning: short-form boolean option nowait deprecated Please use wait=off instead qemu-system-x86_64: -chardev socket,id=charchannel0,fd=52,server,nowait: warning: short-form boolean option server deprecated Please use server=on instead qemu-system-x86_64: -chardev socket,id=charchannel0,fd=52,server,nowait: warning: short-form boolean option nowait deprecated Please use wait=off instead qemu-system-x86_64: -vnc 0.0.0.0:4360,password: warning: short-form boolean option password deprecated Please use password=on instead 2023-12-05T06:56:09.112803Z qemu-system-x86_64: unsupported machine type Use -machine help to list supported machines

另外我的qemu与kvm的版本是不对应不上? 是否存在不兼容的问题 我的情况下之前安装的低版本的kvm qemu 后来按照你的这个下载qemu7.0.0的版本安装了
[root@localhost ~]# qemu-system-x86_64 --version
QEMU emulator version 7.0.0
Copyright (c) 2003-2022 Fabrice Bellard and the QEMU Project developers
您在 /var/spool/mail/root 中有新邮件
[root@localhost ~]# rpm -qa | grep kvm
qemu-kvm-common-1.5.3-175.el7_9.6.x86_64
qemu-kvm-tools-1.5.3-175.el7_9.6.x86_64
qemu-kvm-1.5.3-175.el7_9.6.x86_64

Cannot apply patches

Hey I am on Ubuntu, after the qemu repo had been cloned I moved the patch into the qemu folder and then ran
"git apply qemu7.0.0.patch"

I got the error "warning: unable to rmdir 'roms/edk2': Directory not empty"
I ran the cmd again and got the errors:

error: patch failed: block/vhdx.c:2005
error: block/vhdx.c: patch does not apply
error: patch failed: block/vvfat.c:1174
error: block/vvfat.c: patch does not apply
error: patch failed: chardev/msmouse.c:150
error: chardev/msmouse.c: patch does not apply
error: patch failed: chardev/wctablet.c:179
error: chardev/wctablet.c: patch does not apply
error: patch failed: contrib/vhost-user-gpu/vhost-user-gpu.c:1190
error: contrib/vhost-user-gpu/vhost-user-gpu.c: patch does not apply
error: patch failed: hw/acpi/aml-build.c:1724
error: hw/acpi/aml-build.c: patch does not apply
error: patch failed: hw/arm/nseries.c:847
error: hw/arm/nseries.c: patch does not apply
error: patch failed: hw/arm/sbsa-ref.c:835
error: hw/arm/sbsa-ref.c: patch does not apply
error: patch failed: hw/arm/virt.c:1588
error: hw/arm/virt.c: patch does not apply
error: patch failed: hw/audio/hda-codec.c:117
error: hw/audio/hda-codec.c: patch does not apply
error: patch failed: hw/char/escc.c:959
error: hw/char/escc.c: patch does not apply
error: patch failed: hw/display/edid-generate.c:394
error: hw/display/edid-generate.c: patch does not apply
error: patch failed: hw/i386/acpi-build.c:2674
error: hw/i386/acpi-build.c: patch does not apply
error: patch failed: hw/i386/pc_piix.c:174
error: hw/i386/pc_piix.c: patch does not apply
error: patch failed: hw/i386/pc_q35.c:197
error: hw/i386/pc_q35.c: patch does not apply
error: patch failed: hw/ide/atapi.c:796
error: hw/ide/atapi.c: patch does not apply
error: patch failed: hw/ide/core.c:2560
error: hw/ide/core.c: patch does not apply
error: patch failed: hw/input/adb-kbd.c:356
error: hw/input/adb-kbd.c: patch does not apply
error: patch failed: hw/input/adb-mouse.c:236
error: hw/input/adb-mouse.c: patch does not apply
error: patch failed: hw/input/ads7846.c:154
error: hw/input/ads7846.c: patch does not apply
error: patch failed: hw/input/hid.c:511
error: hw/input/hid.c: patch does not apply
error: patch failed: hw/input/ps2.c:1219
error: hw/input/ps2.c: patch does not apply
error: patch failed: hw/input/tsc2005.c:510
error: hw/input/tsc2005.c: patch does not apply
error: patch failed: hw/input/tsc210x.c:1106
error: hw/input/tsc210x.c: patch does not apply
error: patch failed: hw/input/virtio-input-hid.c:16
error: hw/input/virtio-input-hid.c: patch does not apply
error: patch failed: hw/m68k/virt.c:271
error: hw/m68k/virt.c: patch does not apply
error: patch failed: hw/nvme/ctrl.c:6710
error: hw/nvme/ctrl.c: patch does not apply
error: patch failed: hw/nvram/fw_cfg.c:56
error: hw/nvram/fw_cfg.c: patch does not apply
error: patch failed: hw/pci-host/gpex.c:207
error: hw/pci-host/gpex.c: patch does not apply
error: patch failed: hw/ppc/e500plat.c:22
error: hw/ppc/e500plat.c: patch does not apply
error: patch failed: hw/scsi/mptconfig.c:189
error: hw/scsi/mptconfig.c: patch does not apply
error: patch failed: hw/scsi/scsi-bus.c:555
error: hw/scsi/scsi-bus.c: patch does not apply
error: patch failed: hw/scsi/scsi-disk.c:2395
error: hw/scsi/scsi-disk.c: patch does not apply
error: patch failed: hw/scsi/spapr_vscsi.c:713
error: hw/scsi/spapr_vscsi.c: patch does not apply
error: patch failed: hw/usb/dev-audio.c:73
error: hw/usb/dev-audio.c: patch does not apply
error: patch failed: hw/usb/dev-hid.c:63
error: hw/usb/dev-hid.c: patch does not apply
error: patch failed: hw/usb/dev-hub.c:104
error: hw/usb/dev-hub.c: patch does not apply
error: patch failed: hw/usb/dev-mtp.c:248
error: hw/usb/dev-mtp.c: patch does not apply
error: patch failed: hw/usb/dev-network.c:97
error: hw/usb/dev-network.c: patch does not apply
error: patch failed: hw/usb/dev-serial.c:119
error: hw/usb/dev-serial.c: patch does not apply
error: patch failed: hw/usb/dev-smartcard-reader.c:80
error: hw/usb/dev-smartcard-reader.c: patch does not apply
error: patch failed: hw/usb/dev-storage.c:47
error: hw/usb/dev-storage.c: patch does not apply
error: patch failed: hw/usb/dev-uas.c:171
error: hw/usb/dev-uas.c: patch does not apply
error: patch failed: hw/usb/dev-wacom.c:64
error: hw/usb/dev-wacom.c: patch does not apply
error: patch failed: hw/usb/u2f-emulated.c:386
error: hw/usb/u2f-emulated.c: patch does not apply
error: patch failed: hw/usb/u2f-passthru.c:531
error: hw/usb/u2f-passthru.c: patch does not apply
error: patch failed: hw/usb/u2f.c:46
error: hw/usb/u2f.c: patch does not apply
error: patch failed: include/hw/acpi/aml-build.h:4
error: include/hw/acpi/aml-build.h: patch does not apply
error: patch failed: include/hw/i386/pc.h:290
error: include/hw/i386/pc.h: patch does not apply
error: patch failed: include/hw/pci/pci.h:71
error: include/hw/pci/pci.h: patch does not apply
error: patch failed: include/standard-headers/linux/qemu_fw_cfg.h:71
error: include/standard-headers/linux/qemu_fw_cfg.h: patch does not apply
error: patch failed: migration/migration.c:1190
error: migration/migration.c: patch does not apply
error: patch failed: migration/rdma.c:248
error: migration/rdma.c: patch does not apply
error: patch failed: pc-bios/optionrom/optionrom.h:43
error: pc-bios/optionrom/optionrom.h: patch does not apply
error: patch failed: pc-bios/s390-ccw/virtio-scsi.h:25
error: pc-bios/s390-ccw/virtio-scsi.h: patch does not apply
error: patch failed: target/i386/kvm/kvm.c:1694
error: target/i386/kvm/kvm.c: patch does not apply
error: patch failed: target/s390x/tcg/misc_helper.c:322
error: target/s390x/tcg/misc_helper.c: patch does not apply
error: patch failed: ui/spice-core.c:807
error: ui/spice-core.c: patch does not apply

Any help will be appreciated.

[FEATURE] Changing serial numbers on every patched QEMU installation

Hi there,

First I want to thank you for creating this repository, because this helps setting up gaming VMs a ton.
Now, to get back to my issue, the serial numbers and IDs in your patch are set statically, meaning that if some goofball uses this project to cheat, all the other users will get "hardware banned" as well. A script that creates these fields on every install would fix this, but I am already working on a port of the patch on QEMU 7.2, so I don't have the time to add this feature.

Best regards,
Samuil

Not working on Anti Cheat Expert?

I tried to play Nikke using this project but after logging in and pressing "launch" the main game client opens up but it is stuck loading infinitely. Could you have a try on your virtual machine? the game is only a few gb.

I use qemu after the boot will enter tty and then black screen

I use qemu after the boot will enter tty and then black screen.I've checked the logs and everything is fine
Win10.logs:
2023-04-15 10:22:44.005+0000: starting up libvirt version: 8.0.0, package: 1ubuntu7.4 (Christian Ehrhardt <[email protected]> Tue, 22 Nov 2022 15:59:28 +0100), qemu version: 7.0.0v7.0.0-dirty, kernel: 5.19.0-38-generic, hostname: yinbuliao-Z390-AORUS-Ultra-Gaming LC_ALL=C \ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin \ 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 \ DISPLAY=:0.0 \ MESA_LOADER_DRIVER_OVERRIDE=i965 \ /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/OVMF/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-6.2,usb=off,vmport=off,dump-guest-core=off,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,memory-backend=pc.ram \ -accel kvm \ -cpu host,migratable=on,topoext=on,hv-time=on,hv-relaxed=on,hv-vapic=on,hv-spinlocks=0x1fff \ -m 30000 \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":31457280000}' \ -overcommit mem-lock=off \ -smp 12,sockets=1,dies=1,cores=6,threads=2 \ -uuid 5066fca7-4f37-4fb3-9c86-d087269e9712 \ -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,driftfix=slew \ -global kvm-pit.lost_tick_policy=delay \ -no-hpet \ -no-shutdown \ -global ICH9-LPC.disable_s3=1 \ -global ICH9-LPC.disable_s4=1 \ -boot strict=on \ -device pcie-root-port,port=16,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x2 \ -device pcie-root-port,port=17,chassis=2,id=pci.2,bus=pcie.0,addr=0x2.0x1 \ -device pcie-root-port,port=18,chassis=3,id=pci.3,bus=pcie.0,addr=0x2.0x2 \ -device pcie-root-port,port=19,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x3 \ -device pcie-root-port,port=20,chassis=5,id=pci.5,bus=pcie.0,addr=0x2.0x4 \ -device pcie-root-port,port=21,chassis=6,id=pci.6,bus=pcie.0,addr=0x2.0x5 \ -device pcie-root-port,port=22,chassis=7,id=pci.7,bus=pcie.0,addr=0x2.0x6 \ -device pcie-root-port,port=23,chassis=8,id=pci.8,bus=pcie.0,addr=0x2.0x7 \ -device pcie-root-port,port=24,chassis=9,id=pci.9,bus=pcie.0,multifunction=on,addr=0x3 \ -device pcie-root-port,port=25,chassis=10,id=pci.10,bus=pcie.0,addr=0x3.0x1 \ -device pcie-root-port,port=26,chassis=11,id=pci.11,bus=pcie.0,addr=0x3.0x2 \ -device pcie-root-port,port=27,chassis=12,id=pci.12,bus=pcie.0,addr=0x3.0x3 \ -device pcie-root-port,port=28,chassis=13,id=pci.13,bus=pcie.0,addr=0x3.0x4 \ -device pcie-root-port,port=29,chassis=14,id=pci.14,bus=pcie.0,addr=0x3.0x5 \ -device qemu-xhci,p2=15,p3=15,id=usb,bus=pci.2,addr=0x0 \ -device virtio-serial-pci,id=virtio-serial0,bus=pci.3,addr=0x0 \ -blockdev '{"driver":"file","filename":"/home/yinbuliao/KVM/win10.qcow2","node-name":"libvirt-1-storage","cache":{"direct":false,"no-flush":false},"auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"node-name":"libvirt-1-format","read-only":false,"discard":"unmap","cache":{"direct":false,"no-flush":false},"driver":"qcow2","file":"libvirt-1-storage","backing":null}' \ -device virtio-blk-pci,bus=pci.4,addr=0x0,drive=libvirt-1-format,id=virtio-disk0,bootindex=2,write-cache=on \ -netdev tap,fd=32,id=hostnet0 \ -device e1000e,netdev=hostnet0,id=net0,mac=52:54:00:f4:cf:bf,bus=pci.1,addr=0x0 \ -audiodev '{"id":"audio1","driver":"spice"}' \ -chardev spicevmc,id=charredir0,name=usbredir \ -device usb-redir,chardev=charredir0,id=redir0,bus=usb.0,port=2 \ -chardev spicevmc,id=charredir1,name=usbredir \ -device usb-redir,chardev=charredir1,id=redir1,bus=usb.0,port=3 \ -device vfio-pci,host=0000:08:00.0,id=hostdev0,bus=pci.6,addr=0x0 \ -device vfio-pci,host=0000:08:00.1,id=hostdev1,bus=pci.7,addr=0x0 \ -device usb-host,hostdevice=/dev/bus/usb/001/002,id=hostdev2,bus=usb.0,port=4 \ -device usb-host,hostdevice=/dev/bus/usb/003/002,id=hostdev3,bus=usb.0,port=5 \ -device usb-host,hostdevice=/dev/bus/usb/003/003,id=hostdev4,bus=usb.0,port=6 \ -device virtio-balloon-pci,id=balloon0,bus=pci.5,addr=0x0 \ -smbios type=0,version=UX305UA.201 \ -smbios type=1,manufacturer=ASUS,product=UX305UA,version=2021.1 \ -smbios 'type=2,manufacturer=Intel,version=2021.5,product=Intel i9-13900K' \ -smbios type=3,manufacturer=XBZJ \ -smbios type=17,manufacturer=KINGSTON,loc_pfx=DDR5,speed=4800,serial=000000,part=0000 \ -smbios type=4,manufacturer=Intel,max-speed=4800,current-speed=4800 \ -cpu 'host,family=6,model=158,stepping=2,model_id=Intel(R) Core(TM) i9-13900K CPU @ 2.60GHz,vmware-cpuid-freq=false,enforce=false,host-phys-bits=true,-hypervisor,+kvm_pv_unhalt,+kvm_pv_eoi,hv_spinlocks=0x1fff,hv_vapic,hv_time,hv_reset,hv_vpindex,hv_runtime,hv_relaxed,kvm=off,hv_vendor_id=intel' \ -smp 12,cores=12,threads=1,sockets=1 \ -machine q35,kernel_irqchip=on \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on audio: Could not init spice' audio driver
audio: warning: Using timer based audio emulation`

Roblox working

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 🤷

Make failed

After running make -j $(nproc) eventually I fall into this error.

I am using Arch Linux for this.

...
[283/2719] Generating pc-bios/keymaps/ar with a custom command
FAILED: pc-bios/keymaps/ar
/usr/local/bin/qemu-keymap -f pc-bios/keymaps/ar -l ar
xkbcommon: ERROR: Couldn't find file "symbols/ar" in include paths
xkbcommon: ERROR: 1 include paths searched:
xkbcommon: ERROR: /usr/share/X11/xkb
xkbcommon: ERROR: 3 include paths could not be added:
xkbcommon: ERROR: /home/admin/.config/xkb
xkbcommon: ERROR: /home/admin/.xkb
xkbcommon: ERROR: /etc/xkb
xkbcommon: ERROR: Abandoning symbols file "(unnamed)"
xkbcommon: ERROR: Failed to compile xkb_symbols
xkbcommon: ERROR: Failed to compile keymap
[284/2719] Generating ui/input-keymap-x11-to-qcode.c.inc with a custom command (wrapped by meson to capture output)
[285/2719] Generating pc-bios/edk2-i386-vars.fd with a custom command (wrapped by meson to capture output)
[286/2719] Generating qga/QGA QAPI files with a custom command
[287/2719] Generating pc-bios/edk2-i386-secure-code.fd with a custom command (wrapped by meson to capture output)
[288/2719] Generating pc-bios/edk2-i386-code.fd with a custom command (wrapped by meson to capture output)
[289/2719] Generating pc-bios/edk2-x86_64-code.fd with a custom command (wrapped by meson to capture output)
[290/2719] Generating pc-bios/edk2-x86_64-secure-code.fd with a custom command (wrapped by meson to capture output)
[291/2719] Generating pc-bios/edk2-arm-vars.fd with a custom command (wrapped by meson to capture output)
[292/2719] Generating pc-bios/edk2-arm-code.fd with a custom command (wrapped by meson to capture output)
[293/2719] Generating pc-bios/edk2-aarch64-code.fd with a custom command (wrapped by meson to capture output)
[294/2719] Generating storage-daemon/qapi/QAPI files for qemu-storage-daemon with a custom command
ninja: build stopped: subcommand failed.
make: *** [Makefile:163: run-ninja] Error 1

Read memory error

Here is my libvirt qemu/kvm xml i get memory read error on a game.

<domain xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0" type="kvm">
  <name>win10</name>
  <uuid>28be866a-5903-4cf7-ba31-18730bb08626</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">6291456</memory>
  <currentMemory unit="KiB">6291456</currentMemory>
  <memoryBacking>
    <source type="memfd"/>
    <access mode="shared"/>
  </memoryBacking>
  <vcpu placement="static">12</vcpu>
  <os firmware="efi">
    <type arch="x86_64" machine="pc-q35-7.0">hvm</type>
    <loader/>
    <boot dev="hd"/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv mode="custom">
      <relaxed state="on"/>
      <vapic state="on"/>
      <spinlocks state="on" retries="8191"/>
      <vendor_id state="on" value="GenuineIntel"/>
    </hyperv>
    <kvm>
      <hidden state="on"/>
    </kvm>
    <vmport state="off"/>
    <smm state="on"/>
    <ioapic driver="kvm"/>
  </features>
  <cpu mode="host-model" check="partial"/>
  <clock offset="localtime">
    <timer name="rtc" tickpolicy="catchup"/>
    <timer name="pit" tickpolicy="delay"/>
    <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" discard="unmap"/>
      <source file="/var/lib/libvirt/images/win10.qcow2"/>
      <target dev="sda" bus="sata"/>
      <address type="drive" controller="0" bus="0" target="0" unit="0"/>
    </disk>
    <controller type="usb" index="0" model="qemu-xhci">
      <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
    </controller>
    <controller type="sata" index="0">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x1f" 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>
    <interface type="network">
      <mac address="52:54:00:3e:6a:aa"/>
      <source network="default"/>
      <model type="e1000e"/>
      <address type="pci" domain="0x0000" bus="0x03" slot="0x00" function="0x0"/>
    </interface>
    <input type="keyboard" bus="usb">
      <address type="usb" bus="0" port="1"/>
    </input>
    <input type="mouse" bus="usb">
      <address type="usb" bus="0" port="2"/>
    </input>
    <input type="mouse" bus="ps2"/>
    <input type="keyboard" bus="ps2"/>
    <graphics type="spice" autoport="yes">
      <listen type="address"/>
      <image compression="off"/>
      <gl enable="no"/>
    </graphics>
    <audio id="1" type="spice"/>
    <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>
    <memballoon model="virtio">
      <address type="pci" domain="0x0000" bus="0x02" slot="0x00" function="0x0"/>
    </memballoon>
  </devices>
  <qemu:commandline>
    <qemu:arg value="-smbios"/>
    <qemu:arg value="type=0,version=UX305UA.201"/>
    <qemu:arg value="-smbios"/>
    <qemu:arg value="type=1,manufacturer=ASUS,product=UX305UA,version=2021.1"/>
    <qemu:arg value="-smbios"/>
    <qemu:arg value="type=2,manufacturer=Intel,version=2021.5,product=Intel i7-12700KF"/>
    <qemu:arg value="-smbios"/>
    <qemu:arg value="type=3,manufacturer=XBZJ"/>
    <qemu:arg value="-smbios"/>
    <qemu:arg value="type=17,manufacturer=KINGSTON,loc_pfx=DDR5,speed=4800,serial=000000,part=0000"/>
    <qemu:arg value="-smbios"/>
    <qemu:arg value="type=4,manufacturer=Intel,max-speed=4800,current-speed=4800"/>
    <qemu:arg value="-cpu"/>
    <qemu:arg value="host,family=6,model=158,stepping=2,model_id=Intel(R) Core(TM) i7-12700KF CPU @ 2.60GHz,vmware-cpuid-freq=false,enforce=false,host-phys-bits=true,hypervisor=off"/>
    <qemu:arg value="-machine"/>
    <qemu:arg value="q35,kernel_irqchip=on,hpet=off,memory-backend=qemu-ram"/>
    <qemu:arg value="-object"/>
    <qemu:arg value="memory-backend-file,id=qemu-ram,size=6144M,mem-path=/dev/shm/qemu-win10.mem,share=on"/>
    <qemu:arg value="-qmp"/>
    <qemu:arg value="unix:/tmp/qmp-win10.sock,server,nowait"/>
  </qemu:commandline>
</domain>

error

Help with compiling

When I try to compile for the qemu version 7.2, it gives me this error:

In file included from /usr/include/linux/btrfs.h:29,
                 from ../qemu/linux-user/syscall.c:163:
/usr/include/linux/fs.h:50:8: error: redefinition of ‘struct file_clone_range’
   50 | struct file_clone_range {
      |        ^~~~~~~~~~~~~~~~
../qemu/linux-user/syscall.c:129:8: note: originally defined here
  129 | struct file_clone_range {
      |        ^~~~~~~~~~~~~~~~

Gepard Block Running Windows VM

Hello,

Thank you for this project.

Im trying to apply this bypass in Windows to bypass Gepard detection on VM.

Can you give me a hand with some steps ?

vio driver issue

hi i compiled with the patch like so

../qemu/configure --target-list=x86_64-softmmu,x86_64-linux-user --enable-werror --enable-xen --enable-virtfs --enable-kvm --enable-libusb --enable-libudev --enable-spice --enable-usb-redir --prefix=/usr

then i set the drive to vio and the nic aswell

i then booted up windows 10, load the vio drivers from the attached vio iso image from fedora poeple, and i can not load it. when i uncheck the box hide unsupported drivers, i see the files from the virtio disk, but i cant install

what is going on here?

failing against 8.2.0

 zangetsu  HP-Z840  ~/proj/infra/qemu  (no branch) v8.2.0  git apply qemu-8.2.0.patch
error: patch failed: hw/i386/pc.c:110
error: hw/i386/pc.c: patch does not apply

I deleted this specific diff and the patch was otherwise applied without issues.

Meson Build Error on Arch

Hey when I tried doing exactly what the tutorials says, i get this error:
`
Configuring alpha-softmmu-config-devices.mak with command

../meson.build:2622:25: ERROR: Command /usr/bin/python /opt/Qemu/qemu/scripts/minikconf.py --defconfig alpha-softmmu-config-devices.mak /opt/Qemu/qemu/build/meson-private/alpha-softmmu-config-devices.mak.d /opt/Qemu/qemu/configs/devices/alpha-softmmu/default.mak /opt/Qemu/qemu/Kconfig CONFIG_TPM=y CONFIG_SPICE=y CONFIG_IVSHMEM=y CONFIG_OPENGL=y CONFIG_X11=y CONFIG_VHOST_USER=y CONFIG_VHOST_VDPA=y CONFIG_VHOST_KERNEL=y CONFIG_VIRTFS=y CONFIG_LINUX=y CONFIG_MULTIPROCESS_ALLOWED=y CONFIG_TCG=y CONFIG_ALPHA=y failed with status 1.

A full log can be found at /opt/Qemu/qemu/build/meson-logs/meson-log.txt

ERROR: meson setup failed

[max@Archie qemu]$
`
I am on Arch, that might be the reason but I don't really know. I have been trying to build qemu for 2 days now but it kept failing.

No signal

I start up the virtual machine but I get no signal on the GPU's output to the monitor.

<domain type="kvm">
  <name>Entertainment</name>
  <uuid>6bf8f803-698d-471f-9cfb-4d33a758c711</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">1548288</memory>
  <currentMemory unit="KiB">1548288</currentMemory>
  <memoryBacking>
    <source type="memfd"/>
    <access mode="shared"/>
  </memoryBacking>
  <vcpu placement="static">6</vcpu>
  <os firmware="efi">
    <type arch="x86_64" machine="pc-q35-7.0">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/Entertainment_VARS.fd</nvram>
    <boot dev="hd"/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv mode="custom">
      <relaxed state="on"/>
      <vapic state="on"/>
      <spinlocks state="on" retries="8191"/>
      <vendor_id state="on" value="GenuineIntel"/>
    </hyperv>
    <kvm>
      <hidden state="on"/>
    </kvm>
    <vmport state="off"/>
    <smm state="on"/>
    <ioapic driver="kvm"/>
  </features>
  <cpu mode="host-model" check="partial">
    <topology sockets="1" dies="1" clusters="1" cores="3" threads="2"/>
  </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>/usr/bin/qemu-system-x86_64</emulator>
    <disk type="file" device="cdrom">
      <driver name="qemu" type="raw"/>
      <source file="/home/user/windows_setup.iso"/>
      <target dev="sda" bus="sata"/>
      <readonly/>
      <address type="drive" controller="0" bus="0" target="0" unit="0"/>
    </disk>
    <controller type="usb" index="0" model="qemu-xhci">
      <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
    </controller>
    <controller type="sata" index="0">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x1f" 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="0x8"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0" multifunction="on"/>
    </controller>
    <controller type="pci" index="2" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="2" port="0x9"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x1"/>
    </controller>
    <controller type="pci" index="3" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="3" port="0xa"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x2"/>
    </controller>
    <controller type="pci" index="4" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="4" port="0xb"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x3"/>
    </controller>
    <controller type="pci" index="5" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="5" port="0xc"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x4"/>
    </controller>
    <controller type="pci" index="6" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="6" port="0xd"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x5"/>
    </controller>
    <controller type="pci" index="7" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="7" port="0xe"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x6"/>
    </controller>
    <controller type="pci" index="8" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="8" port="0xf"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x7"/>
    </controller>
    <input type="mouse" bus="ps2"/>
    <input type="keyboard" bus="ps2"/>
    <audio id="1" type="none"/>
    <hostdev mode="subsystem" type="pci" managed="yes">
      <source>
        <address domain="0x0000" bus="0x0a" slot="0x00" function="0x0"/>
      </source>
      <address type="pci" domain="0x0000" bus="0x02" slot="0x00" function="0x0"/>
    </hostdev>
    <hostdev mode="subsystem" type="pci" managed="yes">
      <source>
        <address domain="0x0000" bus="0x0a" slot="0x00" function="0x1"/>
      </source>
      <address type="pci" domain="0x0000" bus="0x03" slot="0x00" function="0x0"/>
    </hostdev>
    <hostdev mode="subsystem" type="pci" managed="yes">
      <source>
        <address domain="0x0000" bus="0x0a" slot="0x00" function="0x2"/>
      </source>
      <address type="pci" domain="0x0000" bus="0x04" slot="0x00" function="0x0"/>
    </hostdev>
    <hostdev mode="subsystem" type="pci" managed="yes">
      <source>
        <address domain="0x0000" bus="0x0a" slot="0x00" function="0x3"/>
      </source>
      <address type="pci" domain="0x0000" bus="0x05" slot="0x00" function="0x0"/>
    </hostdev>
    <hostdev mode="subsystem" type="pci" managed="yes">
      <source>
        <address domain="0x0000" bus="0x04" slot="0x00" function="0x0"/>
      </source>
      <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="0x07" slot="0x00" function="0x0"/>
    </memballoon>
  </devices>
</domain>

Please Help Me

Hi;
Dear Developer, How to use this patch windows qemu version. Please help me.

thanks
best regards

config to use qxl and vnc server

Hi, I have config like you ../qemu/configure --target-list=x86_64-softmmu,x86_64-linux-user --enable-werror --enable-xen --enable-virtfs --enable-kvm --enable-libusb --enable-libudev --enable-spice --enable-usb-redir

still cannot use qxl and vnc server, pls help.

look

编译之后会屏蔽looking-glass的IVSHMEM Device驱动,可有办法解决吗,谢谢

Nvidia Rtx3060 mobile/laptop error 43(Solved)

在完成了显卡直通的笔记本的虚拟机xml配置中加入教程中的feature和qemu agrs中的内容后启动虚拟机,显卡报错代码43,如果不去虚拟化以原始方式启动则不会报错, please help,佬

Help!

I have successfully compiled the thing, what do I do after compiling it?
Please help. Thanks.

ssdt

<qemu:arg value="-acpitable"/>
<qemu:arg value="file=/passthough/ssdt1.dat"/>
Can you please share this file? As I understand it has additional adjustments for acpi tables.

Guide

Hi,
I compiled qemu + patches from this repository and got lost on creating a new virtual machine.
Is there some good guide that i can refer for start my learning on creating windows 10 virtual machine and apply the concepts of this repository?

Thanks.

请求帮助

Uploading image.png…
经过老哥教程装完后还是没有通过,我是否缺少某些环节

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.