Live data from Hacker News

QEMU 6.0

qemu.org

51–60 of 90 posts

Re: QEMU 6.0

#51
Alright HN, I need your help.

Sorry for the approximative English, I'm losing my vocabulary with WFH and I'm pretty sleep-deprived.

I've been building a game streaming platform for influencers for the past months. We scaled to 9k users in a month.

We have android x86 running on QEMU-KVM and there are a bunch of issues I need to address.

- virsh (and virt-manager) always add a PS2 mouse to the guest. The issue is PS2 mouses have a relative movement and not an absolute one -> When you use a mouse or the touch screen through VNC you have to move the pointer to a position instead of directly clicking/capturing the mouse

- My VM resolutions are 720x1080 but VNC always launches in 1920x1080. I have black rectangles on both sides of the Screen.

- Streaming the app viewport with VNC has some (small) latency, any way to fix it?

- Can we host an arm android emulator on QEMU? (armeabi-v7 or v8)

- We had a sales presentation from Canonical for their anbox cloud solution, but they never returned to us with a proposal. Is there any other way for us to have the Android VMs in K8S? Or even Lxc if possible, we are flexible. Also, the juju charms for anbox is nowhere to be found

If you want to get in contact, my email is jadiaheno[at]ludexgames.com I can even show you a demo, we have influencers increasing their revenue with our Beat the boss campaign. We're not VC backed.

Re: QEMU 6.0

#52
post #40

Does this support Apple Silicon yet without patches? Can’t seem to see definite info.

Should work for TCG (emulation); not yet for HVF (virtualization).

HVF does build with Nix (with an overlay), so the build experience doesn't suck. [1] for the base, then apply [2] to SLIRP if you don't want to use HVF's network adapter (which needs root). I'm happily running FreeBSD and Linux VMs on my Mac Mini with this

[1]: https://github.com/benpye/nix-config/tree/main/overlays/qemu

[2]: https://gitlab.freedesktop.org/slirp/libslirp/-/commit/72713...

Re: QEMU 6.0

#53

Alright HN, I need your help. Sorry for the approximative English, I'm losing my vocabulary with WFH and I'm pretty sleep-deprived. I've been building a game streaming platform for influencers for the past months. We scaled to 9k users in a month. We have android x86 running on QEMU-KVM and there are a bunch of issues I need to address. - virsh (and virt-manager) always add a PS2 mouse to the guest. The issue is PS2…

Hey I don't know how much help this is, but anbox is a very rough solution. The bootup time for the android container is on the order of minutes, and lits does not work.

You can try to get support in #anbox on freenode, though. There are postmarketOS people that know how to get the system working. I've never seen someone use anbox with qemu, though. It has always been same arch.

Re: QEMU 6.0

#54

Earlier quoted context omitted.

There's a lot of useful command-line tooling for KVM- and QEMU-based virt. Here's a small selection of them: • virsh — This[1] is libvirt's shell interface; and gives you access to the rich set of libvirt APIs. • virt-builder — Use this for rapidly building minimal or customized virtual machines; it's greatly flexible; check out its man page[2]. And here's[3] a quick example that connects both virt-builder and virsh…

In terms of speed, how is virt-builder compare to say Terraform? Terraform is dog slow sometimes due to cloud provisioning. Would be nice to just be able to build the VM locally then push the AMI/VHD into AWS or Azure.

virt-builder can usually build out a disk image in 15-60 seconds if the template has already been downloaded and you're running on baremetal. Might be 120 seconds if you have to use nested KVM or TCG.

  $ virt-builder fedora-33
  [   1.5] Downloading: http://builder.libguestfs.org/fedora-33.xz
  [   2.3] Planning how to build this image
  [   2.3] Uncompressing
  [   8.6] Opening the new disk
  [  13.8] Setting a random seed
  [  13.8] Setting passwords
  virt-builder: Setting random password of root to mZbPJw9d1ZHgowBk
  [  14.8] Finishing off
                   Output file: fedora-33.img
                   Output size: 6.0G
                 Output format: raw
            Total usable space: 6.0G
                    Free space: 4.7G (79%)
By the way, interesting virt-builder factoid: It uses a STRIPS-based planner to optimize the order of steps when building the image, so it doesn't waste time doing multiple copies. https://en.wikipedia.org/wiki/Stanford_Research_Institute_Pr... https://github.com/rwmjones/guestfs-tools/blob/0cffcbb7848af... https://github.com/libguestfs/libguestfs-common/blob/74bc5c5... https://github.com/libguestfs/libguestfs-common/blob/74bc5c5...

Re: QEMU 6.0

#55
post #14

Semi-related question... I recently spent an evening trying to familiarize myself with virtualization tooling and my initial impression was that the CLI experience for kvm and hyper-v was rather clunky compared to let's say docker, gcloud, ignite and kubectl. Also a lot of the learning material seems to be oriented towards GUI. It could be that I just haven't spent enough time with kvm and hyper-v. I've spent a LOT o…

I'd recommend Packer and Terraform for this. Packer to provision the machine images from unmodified vendor ISOs and then Terraform to provision the network and VMs.

https://www.packer.io/docs/builders/qemu

https://github.com/dmacvicar/terraform-provider-libvirt

https://blog.ruanbekker.com/blog/2020/10/08/using-the-libvir...

I include the blog link because there is some nuance in how to get the path right for community Terraform providers that aren't in the Hashicorp registry. The documentation on the GitHub project isn't quite up to date with respect to how the latest versions of Terraform expect the plugin paths to be set up.

I've done this pretty successfully with all the major Linux distros minus Arch, which requires some bootstrapping to get an iso that Packer can work with (no such thing as an answers file for Arch). It's not that big a deal, though. Just find some instructions on how to create and mount a cloud-init iso in addition to the installer iso and use that to add an ssh public key so you can script the installation steps externally. I actually think Packer can do this, but I just haven't gotten it to work yet and have relied on shell scripts.

Hyper-V actually has a very comprehensive PowerShell module that is pretty well documented, by the way: https://docs.microsoft.com/en-us/powershell/module/hyper-v/?.... I've found it pretty easy to use and actually got the Arch auto-provision working on Hyper-V in Windows before I got it working in KVM in Linux.

Another thing is you can just use the cloud images and cloud-init for bootstrapping everything pretty easily, even on-prem. cloud-init has a "no cloud" config option, as mentioned above, where you just mount an iso with the config data as a DVD drive and cloud-init will find it automatically when the distro iso boots.

This guy has a pretty comprehensive example of how to set up a kubernetes homelab entirely using the libvirt Terraform provider from Ubuntu cloud images bootstrapped with cloud-init: https://github.com/zloeber/k8s-lab-terraform-libvirt

Re: QEMU 6.0

#56

Alright HN, I need your help. Sorry for the approximative English, I'm losing my vocabulary with WFH and I'm pretty sleep-deprived. I've been building a game streaming platform for influencers for the past months. We scaled to 9k users in a month. We have android x86 running on QEMU-KVM and there are a bunch of issues I need to address. - virsh (and virt-manager) always add a PS2 mouse to the guest. The issue is PS2…

Hey I don't know how much help this is, but anbox is a very rough solution. The bootup time for the android container is on the order of minutes, and lits does not work. You can try to get support in #anbox on freenode, though. There are postmarketOS people that know how to get the system working. I've never seen someone use anbox with qemu, though. It has always been same arch.

Hey Thanks for the reply. I will try to use postmarketOS on qemu. I'm wondering if there is any ec2 machine than can support (qemu-)aarch64, and also if AAA games can run on postmarketOS.

Trying it and i'll let you know.

Re: QEMU 6.0

#58
post #39
post #14

Semi-related question... I recently spent an evening trying to familiarize myself with virtualization tooling and my initial impression was that the CLI experience for kvm and hyper-v was rather clunky compared to let's say docker, gcloud, ignite and kubectl. Also a lot of the learning material seems to be oriented towards GUI. It could be that I just haven't spent enough time with kvm and hyper-v. I've spent a LOT o…

QEMU can be daunting at first (like ffmpeg, also by Fabrice Bellard!). But check out this 2018 guide to using QEMU by Drew Devault: https://drewdevault.com/2018/09/10/Getting-started-with-qemu... I stopped bothering with libvirt and other frontends for local dev environments. Now I use shell scripts to start my VMs. I only create one per month or two so it isn't that much of a hassle.

I second this! I have a shell script to download if necessary Debian, run its installer with setting matching production and then run VM with necessary development directories exposed to it. I tried initially to do that with virsh, but then I gave up. Raw qemu commands in fact rather straightforward indeed.

Re: QEMU 6.0

#59
post #39
post #14

Semi-related question... I recently spent an evening trying to familiarize myself with virtualization tooling and my initial impression was that the CLI experience for kvm and hyper-v was rather clunky compared to let's say docker, gcloud, ignite and kubectl. Also a lot of the learning material seems to be oriented towards GUI. It could be that I just haven't spent enough time with kvm and hyper-v. I've spent a LOT o…

QEMU can be daunting at first (like ffmpeg, also by Fabrice Bellard!). But check out this 2018 guide to using QEMU by Drew Devault: https://drewdevault.com/2018/09/10/Getting-started-with-qemu... I stopped bothering with libvirt and other frontends for local dev environments. Now I use shell scripts to start my VMs. I only create one per month or two so it isn't that much of a hassle.

Another nice guide is on ArchWiki: https://wiki.archlinux.org/index.php/QEMU.

Re: QEMU 6.0

#60

Alright HN, I need your help. Sorry for the approximative English, I'm losing my vocabulary with WFH and I'm pretty sleep-deprived. I've been building a game streaming platform for influencers for the past months. We scaled to 9k users in a month. We have android x86 running on QEMU-KVM and there are a bunch of issues I need to address. - virsh (and virt-manager) always add a PS2 mouse to the guest. The issue is PS2…

Hey I don't know how much help this is, but anbox is a very rough solution. The bootup time for the android container is on the order of minutes, and lits does not work. You can try to get support in #anbox on freenode, though. There are postmarketOS people that know how to get the system working. I've never seen someone use anbox with qemu, though. It has always been same arch.

Just used postmarketOS x86 on qemu. Anbox does not run the games, and there are unfortunately a lot of issues.

Will see if i can make some pull requests. Thank you for your help, it's appreciated.

Post reply on HN