News for hackers. Stuff that matters.
Re:QEMU v4.0.0 released by founderling on Wednesday April 24, 2019 @04:20AM (#19736496)
Anybody here using QEMU? What is your use case?
Re:QEMU v4.0.0 released by kashyapc on Wednesday April 24, 2019 @04:51AM (#19736635)
QEMU is one of the core building blocks for many of the KVM-based data center virtualization and infrastructure projects (e.g. OpenStack, oVirt, KubeVirt, etc). And is used by a wide variety of other projects for various use cases (e.g. `systemd` upstream uses QEMU to speed-up development/testing).

When you launch a KVM-based guest, most often you would see QEMU doing the major user space heavy-lifting by providing a PC-like environment—it handles guest memory management, network cards, emulated storage devices, and so forth. QEMU also has a robust Block Layer; not to mention its versatile, and widely-used, native disk image format, QCOW2.

PS: I am biased, as I work with QEMU on a daily basis :-)

Re:QEMU v4.0.0 released by 1125 on Wednesday April 24, 2019 @05:08AM (#19736701)
I'm using it in conjunction with PCI passthrough instead of dual boot. I've been running Windows 10 for more than a year now and played all kinds of AAA titles successfully. The performance-loss seems minimal. Recently I managed to get a second GPU and spin up another VM, so now me and my partner can play on the same machine, heaving each a keyboard, mouse and screen.
Re:QEMU v4.0.0 released by scbrg on Wednesday April 24, 2019 @05:23AM (#19736757)
Do you have any hints on how to set up a similar system? Links, guides, gotchas, whatnot? I've seen someone mention this setup before (perhaps it was you?) and I'm sure I'm not the only one interested in running something similar.
Re:QEMU v4.0.0 released by usernam33 on Wednesday April 24, 2019 @05:55AM (#19736902)
I have written a "guide" for myself to replicate my setup. It is by no means perfect, but maybe it helps: https://gitlab.com/snippets/1678554
Re:QEMU v4.0.0 released by PudgePacket on Wednesday April 24, 2019 @05:43AM (#19736839)
You might be able to find some info here https://www.reddit.com/r/VFIO/.
Re:QEMU v4.0.0 released by scbrg on Wednesday April 24, 2019 @05:53AM (#19736891)
This seems very helpful, yes. Thanks a bunch for posting!
Re:QEMU v4.0.0 released by 1125 on Wednesday April 24, 2019 @03:56PM (#19742053)
I posted about this on my blog here: https://1125.io/#/2019-01-21_21:58_Playing_within_a_Windows_...

Also I recently discovered some very in-depth blog posts here: https://heiko-sieger.info/iommu-groups-what-you-need-to-cons...

Another whole website about this topic (no joke): https://passthroughpo.st/

Re:QEMU v4.0.0 released by pizza234 on Wednesday April 24, 2019 @03:42PM (#19741966)
An overall good introduction/guide is: https://github.com/saveriomiroddi/vga-passthrough.

The most complete guide is probably the Arch Linux one: https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVM....

Re:QEMU v4.0.0 released by kawsper on Wednesday April 24, 2019 @06:16AM (#19737000)
I do the same, I used to run my VMs off of ZFS with spinning disks, but that was too slow at times, so my last upgrade has been giving the VMs their own SSDs and that has worked out great, I then backup the VMs to ZFS and snapshot them.
Re:QEMU v4.0.0 released by rnhmjoj on Wednesday April 24, 2019 @04:41AM (#19736592)
I'm on NixOS and QEMU is well integrated in Nix.

You can write a system configuration, generate a QEMU VM and run it. Also all NixOS automatic tests[1] are running in QEMU VMs that are generated from a Nix configuration.

The most beautiful thing is that you can create multiple VMs and run them simultaneously to create a virtual network. For example you can test a client-server application by running the client and the server on two hosts or test some network configuration[2].

[1]: https://nixos.org/nixos/manual/index.html#sec-nixos-tests

[2]: https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/nat...

Re:QEMU v4.0.0 released by MuffinFlavored on Wednesday April 24, 2019 @05:24AM (#19736762)
You use NixOS as your daily operating system? What’s that like?
Re:QEMU v4.0.0 released by callahad on Wednesday April 24, 2019 @05:45AM (#19736857)
I've been using it on my personal laptop for the past two months.

There are a lot of rough edges to the desktop experience, but it generally works. And while that's faint praise, I have no current plans to switch back to Fedora (3 years) or Debian (12 years prior to that).

It's comforting to know that my entire base system configuration is declarative, and it's pleasant to not worry about libraries conflicting or unnecessary packages lingering around.

Immediate, ephemeral access to programs via, e.g., `nix-shell -p pdftk` is extremely convenient: they're only available in that shell session, and they (along with their dependencies) get cleaned up the next time you run `nix-collect-garbage`. Super handy.

Re:QEMU v4.0.0 released by pknopf on Wednesday April 24, 2019 @11:39AM (#19739473)
What do you think about Darch?

https://godarch.com/

Re:QEMU v4.0.0 released by MuffinFlavored on Wednesday April 24, 2019 @06:22AM (#19737029)
What do you use as a web browser?

edit: nevermind, I didn't realize it was a Linux distro.

Re:QEMU v4.0.0 released by LukeShu on Wednesday April 24, 2019 @09:53AM (#19738302)
I use qemu to run multiple virtualized machines on a single beefy (32-core) headless box; including a shared build-server, and my own remote-workstation.

I got sick of trying to figure out which thing I needed to click in virt-manager to get it to pass the flags I wanted, so I wrote my own minimal qemu-wrapper that covers all of the functionality from libvirt that I care about (vCPU pinning, binding to NUMA nodes, running as non-privileged user), and integrates better with the other system (systemd) monitoring than libvirt does. https://git.lukeshu.com/systemd-qemu/

----

I'm also involved with the Parabola GNU/Linux-libre distribution. Qemu user-mode emulation is essential to our support of non-x86 platforms (ARM and PPC). It lets us run cross-architecture chroots without a full-blown VM.

Re:QEMU v4.0.0 released by kstenerud on Wednesday April 24, 2019 @04:54AM (#19736649)
I have a NUC sitting in a closet that I've set up to serve virtual desktops using LXC or libvirt (depending on what features I need, or if it's a Linux or MacOS or Windows guest). I made some scripts to build the various types of virtual environments I need [1], and then connect to them using x2go or Chrome Remote Desktop.

This has really freed me up because I'm no longer tied to a single machine. My home dirs are mounted volumes that are also backed up, so I can tear down and rebuild the environment with a single command (which means that my environments are also deterministic). I can connect to them from anywhere on the planet, using any machine as a client (even my phone or a tablet). My main laptop is now a weaksauce 1080p chromebook that acts as a glorified thin client and web browser.

[1] https://github.com/kstenerud/virtual-builders

Re:QEMU v4.0.0 released by qalmakka on Wednesday April 24, 2019 @05:20AM (#19736745)
We've a shared beefy Threadripper workstation in my lab that has a boatload of RAM and cores to spare. We set up Qemu + KVM in order to run a big Windows VM that we use mainly for MS Office via RDP connections and when we really need Visual Studio. We also have a FreeBSD and a Aarch64 Linux instance that we use for testing. It's amazing how flexible Qemu is, and how reliable the whole stack can be.
Re:QEMU v4.0.0 released by checkyoursudo on Wednesday April 24, 2019 @05:34PM (#19742812)
I used QEMU for VFIO, GPU passthrough to a Win 10 guest for games. It worked really well. I passed an nvidia card, an ssd with the os/programs, and an hdd data disk from a Linux host (Gentoo).

Setting it up was somewhat difficult. When I did it there weren't many good guides for just exactly my situation, so I had to use many, many different resources to get it running. Based on some of the links others have posted here, there seems to be more out there on it now.

This was my last working startup script. I no longer recall why or even if any of these options were necessary or beneficial. At the time, it was just what worked. (Dual monitor, separate video cards for host and guest, L-CTRL+R-CTRL to pass mouse/keyboard control back and forth.) I haven't used this in quite a while, so I can't say if all of these options are still legit anymore.

  #!/bin/bash

  cp /usr/share/edk2-ovmf/OVMF_VARS.fd /tmp/my_vars.fd

  qemu-system-x86_64 \
        -enable-kvm \
        -m 16G \
        -cpu qemu64,hv_vendor_id=whatever,kvm=off,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time,smep=off \
        -smp cores=8,threads=1,sockets=1 \
        -machine q35,type=pc -vga std -display gtk \
        -drive if=pflash,format=raw,readonly,file=/usr/share/edk2-ovmf/OVMF_CODE.fd \
        -drive if=pflash,format=raw,file=/tmp/my_vars.fd \
        -drive file=/dev/disk/by-id/ata-Samsung_SSD_860_EVO_250GB_XXXXXXXXXXXXXXX,format=raw,if=virtio \
        -drive file=/dev/disk/by-id/ata-ST3000DM001-XXXXXXXXXXXXXXX,format=raw,if=virtio \
        -boot order=d \
        -object input-linux,id=kbd,evdev=/dev/input/by-id/usb-XXXXXXXXXXXXX_USB_Keyboard-event-kbd,grab_all=yes \
        -object input-linux,id=mouse,evdev=/dev/input/by-id/usb-XXXXXXXXXXXXXXXX-event-mouse \
        -device virtio-mouse-pci \
        -device virtio-keyboard-pci \
        -netdev user,id=user.0 -device e1000,netdev=user.0 \
        &
Re:QEMU v4.0.0 released by rvp-x on Wednesday April 24, 2019 @10:22AM (#19738585)
We use it with a wrapper[1] for continuous testing of an operating system[2]. The wrapper will perform the installation process as users do, then run the testsuite and upload the results. It's nice because it lets us catch regressions in the installation process, too.

[1] - https://www.gson.org/netbsd/anita/

[2] - http://releng.netbsd.org/test-results.html

Re:QEMU v4.0.0 released by usernam33 on Wednesday April 24, 2019 @05:50AM (#19736881)
Running linux as Host and optionally starting my gaming vm. With KVM and various hardware passthroughs (pci network card, usb devices, gpu, etc.) it is as fast a native installation and sometimes even faster compared to my old bloated windows host. Ofcourse it was not easy to setup and some games needed tweaking (e.g. Just Cause 2 wanted to use unsupported cpu features and therefore needed an extra flag). But if one has the time and patience this is awesome.
Re:QEMU v4.0.0 released by sgtcodfish on Wednesday April 24, 2019 @05:20AM (#19736746)
I currently have a messy side project[1] where I'm writing bare-metal RISC-V machine code (i.e. writing in hex after assembling instructions by hand) targeting the SiFive HiFive1. QEMU is handy for testing since it supports that board pretty well - it lets me skip the "code upload" step and just run a binary with gdb right away.

I did a similar thing with the Raspberry Pi a few years ago, but the QEMU support wasn't great back then which made debugging incredibly hard. I think the support has improved a lot since then, so I should probably give it another go.

[1] https://github.com/SgtCoDFish/bedrock-bootstrap - I'm writing the steps as a kind of tutorial to myself to aid learning, but fair warning that it's all a bit of a mess right now!

Re:QEMU v4.0.0 released by gattilorenz on Wednesday April 24, 2019 @04:27AM (#19736533)
Mainly playing with old operating systems, I'm a retrocomputing enthusiast.

While years ago I would mainly use Virtual PC (I do miss its great GUI) and VMWare (and rarely bochs), qemu improved a lot and has (somewhat decent) support for so many more architectures. You can run Solaris for SPARC and Mac Os 9, for example.

Re:QEMU v4.0.0 released by bane on Wednesday April 24, 2019 @05:09AM (#19736705)
I'm interested in your is cases. Do you have any good write-ups for Mac OS 9 and others? I never considered QEMU for those older systems.
Re:QEMU v4.0.0 released by gattilorenz on Wednesday April 24, 2019 @05:49AM (#19736876)
Well, usually the internet is large and you can find lots of guides :)

I'm an avid follower of virtuallyfun.com and right now the latest post is about installing AIX on QEMU. If you look into the qemu category ( https://virtuallyfun.com/wordpress/category/qemu/ ) you'll find OS X Server, Unixware and more.

The author, neozeed, is very friendly and you can leave him comments or shoot him an email and he usually answers pretty in depth.

As for OS 9, I'm not sure it is as refined and functional as SheepShaver on Windows yet, but I'm on OS X, where SheepShaver takes more effort to set up. There's a modified QEMU for enhanced OS 9 compatibility (I think more G3 emulation?) here, and people managed to install 9.2: https://www.emaculation.com/forum/viewtopic.php?f=34&t=9028

Re:QEMU v4.0.0 released by jayalpha on Wednesday April 24, 2019 @03:34PM (#19741902)
"Solaris for SPARC"

Link?

Re:QEMU v4.0.0 released by gattilorenz on Wednesday April 24, 2019 @06:16PM (#19743116)
https://astr0baby.wordpress.com/2018/09/22/running-solaris-2...

Or do you mean a copy of the ISO? For that I'd try archive.org or winworldpc

Re:QEMU v4.0.0 released by rcarmo on Wednesday April 24, 2019 @04:30AM (#19736540)
Re:QEMU v4.0.0 released by selvakn on Wednesday April 24, 2019 @07:02AM (#19737188)
Same here. Use it to build tools targeting arm architecture (rpi, etc) on a x86_64 machine, that too in docker.
Re:QEMU v4.0.0 released by rcarmo on Thursday April 25, 2019 @09:44AM (#19747979)
My experience is that building for ARMv7 is relatively quick, but ARMv6/armhf is MUCH slower. I have no idea why, really.

Will be trying ARM64 soon, as soon as I have a suitable development board.

Re:QEMU v4.0.0 released by akling on Wednesday April 24, 2019 @06:17AM (#19737007)
I use QEMU every day for testing my new operating system: https://github.com/awesomekling/serenity

QEMU has just the right mix of performance and hackability that I need for my "printf debugging" workflow :) (I've used Bochs a lot, too, which is more hackable, but far less performant.)

Re:QEMU v4.0.0 released by osmay88 on Wednesday April 24, 2019 @04:25AM (#19736523)
Virtualbox doesn't work with Linux 5.1 so I moved a bunch of VMs to Qemu.
Re:QEMU v4.0.0 released by Dylan16807 on Wednesday April 24, 2019 @05:09AM (#19736702)
Huh, surprised it broke that badly.

But support appears to be there as of a week ago, fyi.

Re:QEMU v4.0.0 released by Svenstaro on Wednesday April 24, 2019 @05:22AM (#19736751)
It does now for me at least in version 6.0.6.
Re:QEMU v4.0.0 released by osmay88 on Wednesday April 24, 2019 @06:13AM (#19736994)
Interesting, I installed 6.0.6 and got issues generating the kernel modules.
Re:QEMU v4.0.0 released by hpaavola on Wednesday April 24, 2019 @04:29AM (#19736536)
We build our own Linux images (using Yocto) for various embedded devices and run the same images on QEMU for testing purposes.
Re:QEMU v4.0.0 released by kbumsik on Wednesday April 24, 2019 @05:22AM (#19736750)
Is there any great resources to learn QEMU for ARM embedded system? I googled them bit it's a little bit mess.
Re:QEMU v4.0.0 released by V1r on Wednesday April 24, 2019 @04:42AM (#19736595)
I use it to run aarch64 unit test builds on my x86 system. Pretty cool with binfmt support, allowing me to run aarch64 executables just like any other x86 executable: https://wiki.debian.org/QemuUserEmulation
Re:QEMU v4.0.0 released by bronco21016 on Wednesday April 24, 2019 @05:18AM (#19736735)
My employer provides me with an iPad Pro and rather than carry around an additional laptop I run x86 systems (Linux and Windows 10) using QEMU-KVM on my ridiculously overpowered home server and remote desktop to them from the iPad Pro.
Re:QEMU v4.0.0 released by MuffinFlavored on Wednesday April 24, 2019 @05:25AM (#19736766)
What’s your mouse/keyboard situation like?

What remote desktop app do you use?

What’s your latency like? What are the drawbacks to a setup like this?

Re:QEMU v4.0.0 released by bronco21016 on Wednesday April 24, 2019 @11:59AM (#19739731)
For software I use Jump Desktop. On Linux I connect via VNC and Windows I use their custom Fluid protocol. For keyboard and mouse I use an Anker Bluetooth keyboard and mouse is a Swiftpoint GT.

Latency varies a lot and I’ve found hotel WiFi to sometimes be unusable. ATT LTE on the device generally works pretty well. I’m primarily running this setup just to have access to a full browser environment for my tinkering with web scraping so having a super responsive low latency connection isn’t as vital as it would be to do something like gaming. The main drawback is always needing a solid connection which is mostly solved with LTE where I go.

Re:QEMU v4.0.0 released by megous on Wednesday April 24, 2019 @04:59AM (#19736668)
Website browser compatibility testing on Windows/macOS under Linux.
Re:QEMU v4.0.0 released by hatsubai on Wednesday April 24, 2019 @09:50AM (#19738277)
We use it here exclusively at my current place of employment in the OS and BSP team. We create pre-built, bootable ramdisk images inside a QEMU instance which are hashed and saved for fast provisioning, as well as having multiple QEMU instances on targets to prevent cross domain pollution (being mandated by NSA). I work in defense, for context.
Re:QEMU v4.0.0 released by JoshuaRLi on Wednesday April 24, 2019 @09:43AM (#19738207)
Currently using it as part of a testing workflow in making my own linux distribution. It makes booting kernels with initramfs, as well as live images, super easy and painless. QEMU is great software! https://jrl.ninja/joy/1/
Re:QEMU v4.0.0 released by ttflee on Wednesday April 24, 2019 @08:41AM (#19737746)
Trying to run Linux and Windows guest on macOS host with hvf acceleration. Found that FreeBSD won’t boot perhaps due to lack of support of v86 mode IVT in hvf part.

Also trying to setup gvt-g with dmabuf but corner cases still need fixes, e.g. video playback doesn’t work on overlay sprite of yuv encoding.

Re:QEMU v4.0.0 released by sangnoir on Wednesday April 24, 2019 @11:31AM (#19739380)
I use it as a VirtualBox replacement via libvert - no thanks to Oracle setting it (VB) up as an IP licensing minefield. Some VirtualBox extensions are non-free in commercial environments, and installing them creates liability for your organization.
Re:QEMU v4.0.0 released by stefan_ on Wednesday April 24, 2019 @03:41PM (#19741956)
I have a library that needs to target, among other platforms, big endian MIPS. It does a lot of endianness sensitive stuff but all the CI workers are naturally little endian, so I run the testsuite through qemu-user simulating a MIPS system.
Re:QEMU v4.0.0 released by pmarin on Wednesday April 24, 2019 @05:36AM (#19736812)
Recently I started playing with classic Forth systems like figforth and pygmy.

If you are using MS-DOS on QEMU there is a open source utility called DOSIDLE.EXE that keep the CPU usage low and stop the annoying CPU fan from spinning.

Re:QEMU v4.0.0 released by cbluth on Wednesday April 24, 2019 @04:34AM (#19736556)
i use qemu/kvm almost everyday. i also use qemu-img tools quite often. and as other people have mentioned, building inside qemu is quite convenient, especially with tools like packer.
Re:QEMU v4.0.0 released by jeffhuys on Wednesday April 24, 2019 @04:24AM (#19736518)
I used it before to dabble in BIOS coding. Just for fun.
Re:QEMU v4.0.0 released by unixhero on Wednesday April 24, 2019 @06:39AM (#19737090)
Screenshots? :)
Re:QEMU v4.0.0 released by pizza234 on Wednesday April 24, 2019 @03:40PM (#19741953)
VFIO! I play videogames and use Lightroom. It's rock solid (at least, with my usage pattern), however, v4.0.0 hangs on boot, so I use v3.1.0.
Re:QEMU v4.0.0 released by classichasclass on Wednesday April 24, 2019 @05:37AM (#19736819)
Running PowerPC Mac OS X on Talos (and OS 9, but this doesn't work with KVM-PR ... yet).
Re:QEMU v4.0.0 released by unixhero on Wednesday April 24, 2019 @09:34AM (#19738129)
So that's OSX Tiger 10.4 with OS9 emulation layer you want to run on your Talos under a linux-ppc build of QEMU?