The owner of this website is Stefan Weil, Kirchenstraße 5, D-68526 Ladenburg.I can be contacted by mail or e-mail (qemu-website at weilnetz dot de).Acknowledgement This website is kindly hosted by netcup GmbHon a vServer VPS 4000 G7 which is based on KVM / QEMU.
You'll also need to be running a windows insider build of Windows 10. The insiders Fast ring which is mentioned in the pre-requisites is now the Dev channel. One of the features required didn't come into Windows 10 until build 19619 and the nested virtualisation support for AMD didn't come in until build 19636 either, so that's a must if you are on AMD too. The windows insider page currently lists 19042.423 as the highest build available in Beta and 19041.423 as Release Preview, so for the moment this will not work correctly without using the Dev channel.
Once nested KVM is up and running and you've configured WSL to send X output to windows, you are ready to try a distro. If you keep following the post at this point you'll set up an Ubuntu 20.10 daily build. I ran through this as a check to see if everything was working, the steps for this were exactly the same as in the post.
After that it was a matter of selecting which virtual "CPU" I wanted and I think I selected Skylake-Client?
mankier.com/7/qemu-cpu-models#Desc...
This list is to select what the cpu is that's being mimiced in the VM, and NOT what hardware model you have on your host machine.
Wow this post is so good, i spent a good chunk of time and was finally able to install catalina, updating it to BIGSUR as we speak.
I am new to kvm and unfortunately the qemu documentation is really crap.
May be someone can guide me:
1) how can i connect a usb device to the macos running
2) what is a nice setting for CPU, right now i just removed the thread option and added 6 cores, its not really fast but its ok
I'm sharing this here because I think anyone doing this now will encounter these troubles, and I've sunk a lot time into trying harebrained fixes (classic Linux-hole wasting-time pattern) to no avail. I've posted a question on Reddit that's gotten some up-votes already (UPDATE: my posts were yanked for "too little information" provided, so I can't recommend these Reddit forums) (reddit.com/r/bashonubuntuonwindows...) that includes a link to a more detailed post on r/hackintosh that looks like it's unlisted, IOW waiting for mod approval that may never come.
It seems that the dev channel is locked into wanting to upgrade to windows 11. And I haven't found a way to get access to previous dev channel windows builds otherwise. It seems I need at least the old dev channel build 19619 iso to get past kvm-ok. My system is stuck on 19044, and doesn't support upgrading to windows 11 because of the TPM requirement. Thoughts?
When I am running kvm-ok, I am getting: KVM acceleration can be used
However, when I run ./basic.sh, I am getting Could not access KVM kernel module: Permission denied
qemu-system-x86_64: failed to initialize KVM: Permission denied
It seems to be some kind of authorization problem, but I can't figure out a solution. Did anybody run into the same problem and has somehow resolved it? Thank you!
Nice writeup! I had recently installed macos on virtualbox using this repo github.com/myspaghetti/macos-virtu.... I was wondering, if running it through KVM improves any performance. Though, I have also installed macos on qemu on a Linux distro, and it is more performant than the virtualbox one. Have you ever tried the virtualbox solution?
I'm trying to install Sketchup 2019 on a Windows 10 VM (Ubuntu 18.04, QEMU 3.1.0), however Sketchup requires OpenGL 3.1 or later in order to run. I had asked a similar question previously hoping by enabling 3D acceleration with Virgl would work, however even though I was able to enable Virgl on the host and have the option to choose 3D acceleration with Virtio, OpenGL is still not on my windows VM. I then instead passed through an MSI GeForce GT 710 Nvidia GPU which works and shows up on the VM, however OpenGL still doesn't exist and Sketchup won't run.
In case other people have the same issue I had to setup the cpu to be a core2duo during the windows 10 installation process. After the windows installation, switching back to host-passthrough with the options kvm ignore_msrs=1 on /etc/modprobe.d/kvm.conf worked fine.
VM is fine , just change you windows os version. some windows os version get this error. Me 27x time try and i found this easy way. Same setting just different Os version And must your cpu configuration host-passthrough
To "install" this version as a non-admin, open a command prompt, issue the command set __COMPAT_LAYER=RunAsInvoker and run qemu-w64-setup-20170131.exe from that prompt. Install in a folder where you have write permissions, like "My Documents" or something.
I'm trying to set up a virtualized windows installation with qemu, using VGA passthrough, so I could ditch my dedicated windows partition, and generally have an easier life. I have followed the instructions on the arch wiki:
I am running two Windows 10 VMs. On one of the VMs I am able to install the 64 bit version of qemu guest agent. On the other VM I can only install an older version of the 32 bit qemu guest agent. This is the error I get:
Shutdowns do work for the menu. The thing for me is that a windows shutdown can take anywhere between 30 seconds and an hour depending on updates to be installed etc. Not a good thing when running on battery
Sent via telekinesis
So, back to the original reason for posting. How do I get past the qemu 64 bit install problem? The newer drivers insist on a 64 bit install, but it doesn't work so I have to go back to older drivers and install the 32 bit version.
Manually added the balloon device to the xml and got the driver working, but still the same issue with the 64 bit qemu driver. I always thought it was the serial driver that was needed for the guest agent.
To try the new qlx-dod driver linked above, in order to use the driver, update' the basic windows display adapter driver and point it to the unzipped folder for the new driver. This can be found by: Right click the Start button -> Device Manager. Expand 'Display adapters' and right click on the sub entry and hit update driver.
The steps to reproduce this solution has a prerequisite: one has to create the tap0 device using the OpenVPN utility tapctl.exe create --name tap0 (or any other way to create a tap device), and then bridge the connection between tap0 and eth (windows) in the Network Connections panel. In my system, I had some trouble to get it to work: I had to fire up the QEMU machine (so the link becomes ready), create the bridge, shut down the QEMU machine, restart the QEMU machine (not a reboot!) and everything after that was fine. Of course, I changed the OpenWRT LAN address using `uci set network.lan.ipaddr='192.168.0.1'; uci commit; service network restart .
While this setup "just works" (it may be enough for users which needs to get the things done using Windows and QEMU, like the guide says), I don't like to have the qemu-user network as WAN bridge, since it's enough for normal stuffs but things like ping does not work. Moreover, it adds too much things (a firewall, a DHCP server, ...) which does not reflect a true OpenWRT setup on a real machine
I stupidly went down the rabbit hole and drained my time on qemu. So I documented the quirks to help the next poor sap who has to get qemu running on Windows 10 host efficiently over Bridged-Adapter (VirtualBox lingo) networking mode.
I typically want Bridged-Adapter option from VirtualBox, which means the virtual NIC plugs into the same router as the host and just appears as another computer on the same network as host. This is broken into a few components in qemu and you have to manage them separately. Great for learning about how Bridged-Adapter really works, but a lot of swearwords coming from people who just want to get basic things done.
Networking in QEMU is another can of worms if you deviate from the default SLIRP (user mode). I figured out how to work it, but the network bridge is faulty and it keeps crashing my windows with BSOD on bridge.sys with varying error tag. I have short glimpse of it working if I move very fast. Looks like the TAP driver is corrupting the memory as the bridge became very erratic that I see error messages deleting it and have persistent BSOD when the bridge starts after the VM hanged at the TAP bridge on boot.
I am trying to setup a windows guest VM with Qemu. I managed to do so by following the article QEMU on the Arch Linux wiki and I also referred this article Windows Guest VM using Qemu , the setup and installation were smooth with no issues, but VM does not have internet. The guest sees the network adapter and driver but reports no internet.
Screenshot from 2021-07-24 16-30-0319151077 166 KB
Migrating a VirtualBox Windows Virtual Machine to QEMU/KVM/virt-managerA month ago I wrote aboutGetting virt-manager Running on Debian.The ultimate goal of this was to migrate my Windows 10 install fromVirtualBox to QEMU, because VirtualBox is becoming increasinglydifficult to install on Linux, especially on Debian, which hasremoved VirtualBox from Bookworm (testing) and there are indications thatit might be removed from Sid (unstable) as well. I gather there'ssomething unsavory about the license now that Oracle owns it,but I haven't been following the details.Anyway, after getting virt-manager running, I'd been putting off therest of the migration out of a suspicion that there lay dragons.I was right: it took several days of struggling, but I now haveWindows 10 working under virt-manager and qemu/kvm. Here's how.Step 1, of course, was to get virt-manager running in the first place,the topic of the earlier article.Step 2: Migrate the VMThis part was easy-peasy.VBoxManage list hdds tells you the name of the virtualmachines you have installed. It'll probably turn out to be something like/path/to/VirtualBox Vms/your-vm-name/LONG-UUID.vdi.Pass that path to VBoxManage clonehd to make a rawdisk image. I created a directory /QEMU to store my new VMs.VBoxManage clonehd --format RAW '/path/to/VirtualBox Vms/your-vm-name/LONG-UUID.vdi' /QEMI/Win10.imgThen convert the raw file into a qemu-style QCOW file:cd /QEMUqemu-img convert -f raw Win10.img -O qcow2 Win10.qcow2You should be able to delete the raw image now, but if you have space,I'd recommend keeping it around until you get everything working.Step 3: Set Your System InfoWhen I set up my VirtualBox VM, I found several howtos explaining howI could copy my MSDM table, likethis superuser.com answer.MSDM stands for MicroSoft Data Management, and it's an ACPI tablethat you can find in /sys/firmware/acpi/tables/MSDM.In VirtualBox, using it is trivial:sudo cat /sys/firmware/acpi/tables/MSDM > /VirtualBox\ VMs/win10/msdm.binVBoxManage setextradata win10 \ "VBoxInternal/Devices/acpi/0/Config/CustomTable" \ /VirtualBox\ VMs/win10/msdm.binBut in QEMU, it's not so easy.First extract your various hardware and ACPI tables. I put these inthe same place where I put my qcow file.dmidecode -t 0 -u grep $'^\t\t[^"]' xargs -n1 perl -lne 'printf "%c", hex($_)' > smbios_type_0.bindmidecode -t 1 -u grep $'^\t\t[^"]' xargs -n1 perl -lne 'printf "%c", hex($_)' > smbios_type_1.bincat /sys/firmware/acpi/tables/SLIC > slic.bincat /sys/firmware/acpi/tables/MSDM > msdm.bin(some of these required sudo).I skipped the slic.bin line because my CX1 apparently doesn'thave a SLIC table (to check that, try dmesg grep SLIC).Now run virt-manager. Edit/Preferences and make sureEnable XML editing is checked.Now make a new virtual machine,choosing Import existing disk image, that beingthe .qcow you made in step 2.Important: make sure Customize before install is checked,otherwise it will try to boot your Windows image as soon as you clickFinish, before you've had a chance to import anything.In the window that pops up after you click Finish,click the Info tab (the second icon in the toolbar, a lightbulb),click on the XML tab, and make sure you're looking at the XML forOverview in the left sidebar.Customize it as suggested inthisgist, How to use Windows 10 OEM license in libvirt VM,using the path to the ACPI and hardware tables you stored earlier.My new XML section looked like Also change the first line of the XML file to read:so it will let you use the qemu:arg namespace.Click Apply.Conflicts Between virt-manager, virsh and Plain Old EditorsAny time you change virt-manager's XML,check that the changes you made are actually showing up in/etc/libvirt/qemu/win10.xml. I had some trouble with that.The file has a prominent warning at the top that it's anauto-generated file and you shouldn't edit it. And indeed, ifyou edit it with a regular text editor, any changes you makewon't be saved.If you get tired of always editing with virt-manager's XML tab,you might be able to use virsh:$ virsh list --all Id Name State------------------------ - win10 shut off$ virsh edit win10That will open the XML file in your favorite editor. And when youwrite, the changes might persist. Or they might not. I foundit inconsistent, so if you're making nontrivial changes, keep anothercopy in case you need to paste something into virt-manager later.If virsh list --all doesn't see your VM at all, you may berunning a root session in virt-manager (you can do thatif you're in the right groups, like libvirt and libvirt-qemu).virsh only looks at user sessions by default, while virt-manager createsroot sessions by default.You can make virsh use root sessions with an environment variable:export LIBVIRT_DEFAULT_URI="qemu:///system"Or, of course, you could run virsh with sudo every time.If you try to start your VM and see something like "error starting domain,network 'default' is not active", check its status with:virsh net-list --allIf "default" isn't active,start it with: virsh net-start defaultand make it automatic with: virsh net-autostart defaultHow to Disable NetworkingSpeaking of networking,for my first boot, I wanted to disable the network, since I wasn'tsure it was actually using my laptop's MSDM and I didn't want Windowsto de-authorize me. So I tried clicking on the network in the Info(lightbulb) screen and un-checking active, but it madeno difference, virt-manager activated its network anyway.(Fortunately I didn't get deactivated.)I later found a more effective method:click on the Network device and click Remove.It's easy to add it back later once you're convinced yourmachine is set up okay.Now I had my Windows 10 guest booting and running, and could removevirtualbox and try to clean up the mess I'd made of my system librariesto keep it installed. That's enough for now.I picked up a few other virt-manager/QEMU tips along the way, but I'llcover those in a separate article.
df19127ead