[HN Gopher] QEMU Internals (2021)
___________________________________________________________________
QEMU Internals (2021)
Author : signa11
Score : 156 points
Date : 2022-08-22 08:39 UTC (14 hours ago)
(HTM) web link (airbus-seclab.github.io)
(TXT) w3m dump (airbus-seclab.github.io)
| [deleted]
| belter wrote:
| Related:
|
| _QEMU Internals_ - https://news.ycombinator.com/item?id=26941744
| - April 2021 (33 comments)
| john_alan wrote:
| Plug for UTM: https://mac.getutm.app
|
| A frontend for QEMU which makes it usable for normal people
| LeoPanthera wrote:
| They're not official but I have made Windows 95 and Windows 98
| images for UTM, if anyone would find that useful:
|
| https://archive.org/details/@davidga
| lmarcos wrote:
| If only it were more developer-friendly (like Vagrant).
| Nevertheless, UTM is good.
| kashyapc wrote:
| FWIW, if you're comfortable with command-line, here's a way
| to use QEMU with `virt-builder`[a] and libvirt (the
| virtualization API):
|
| (1) Download a Fedora image (or any one of the images that
| `virt-builder` supports: `virt-builder --list | less`)
| $> virt-builder fedora-36 --format qcow2 \ -o
| vm1.qcow2 --root-password secret
|
| (2) Import the image to libvirt: $> sudo
| virt-install --name vm1 --ram 4096 \ --disk
| path=/var/lib/libvirt/images/vm1.qcow2,format=qcow2 \
| --nographics --os-variant fedora-36 --import
|
| Then you can do various operations via `virsh` (the shell
| tool). Start a VM, and see the boot process on the serial
| console: $ sudo virsh start --console
|
| Create a snapshot: $ sudo virsh snapshot-
| create-as vm1 snap1 "Clean Fedora 1"
|
| With this kind of snapshot (called "internal snapshots"), the
| original and its delta, i.e. the snapshot, are stored in a
| single disk image file; this is convenient for moving it
| across machines. This only works with QCOW2 images. To revert
| to the snapshot: $ sudo virsh snapshot-
| revert vm1 snap1
|
| And so on[b].
|
| [a] https://libguestfs.org/virt-builder.1.html
|
| [b] https://developer.fedoraproject.org/tools/virt-
| builder/about...
| koprulusector wrote:
| Does this work on Mac M1?
|
| Last time I tried setting up libvirt/libguestfs on my work
| Mac M1 I ran into various problems and gave up. This was
| somewhere around April 2022.
| suchar wrote:
| I've recently tested UTM and Parallels Desktop (Intel Mac) with
| Linux workloads (Ubuntu and NixOS). IME, UTM seems to be
| considerably slower than Parallels. I haven't investigated this
| much, but it looked like a very slow IO (despite using a disk
| in raw format) + htop showed that the CPU spent a lot of time
| in the kernel.
|
| Nonetheless, it is a pretty nice tool
| immmmmm wrote:
| looks great on paper, managed to get the aarch64 version of
| Ubuntu server running on M1 but the intel version crashed
| somewhere in the install.
| artandlol wrote:
| lionkor wrote:
| Virtual Machine Manager takes the cake IMO
| rdtsc wrote:
| I like Virtual Machine Manager too. It's been a trusty
| workhorse for years. It had tried Vagrant and Docker and both
| didn't work out too well. With Docker being a container
| engine for instance, systemd doesn't work, so installing
| packages which start services and manage systemd units fails.
| There are some hacks and workaround but VMM just works as
| expected.
| dizhn wrote:
| Does it work on Macs?
| lioeters wrote:
| If this is the right "Virtual Machine Manager", it doesn't
| look like macOS or Windows is supported.
|
| https://github.com/virt-manager/virt-
| manager/blob/main/INSTA...
| lambda_matt wrote:
| not well. There are various ports in brew and macports but
| they are all hamstringed in various ways
| gorkish wrote:
| Curious about all the negative experiences with UTM; for me it
| was a breeze to set up both an Ubuntu/aarch64 and a Windows 11
| VM, though the process to get a windows installer iso was a bit
| silly.
|
| Biggest problem for me is that it seems every solution for
| running a VM on Apple Silicon puts a big ding in the otherwise
| insane battery life. I'd love to have a Linux VM "at the ready"
| similar to WSL2 but there doesn't seem to be a great way to
| achieve this.
| vim-guru wrote:
| I don't know. I'm a dev and just tried booting ArchLinux with
| UTM. All I got was a cryptic call trace on my M1. But yeah, if
| it had worked I would have considered it easy to use even for
| non devs.
| vim-guru wrote:
| Now I tried Debian as well. It boots fine, but the username &
| password mentioned are incorrect. There's some way to go
| until this thing is usable I would say.
| vbezhenar wrote:
| I've found using ordinary qemu to be more convenient than
| those wrappers. It's faster to read man than to find what I
| need in those GUIs.
|
| Be aware though, it was easy to crash M1 with default qemu
| settings few months ago.
| CoastalCoder wrote:
| Are you saying that it crashed the host OS, or just qemu?
| vbezhenar wrote:
| Entire host macOS was crashed. Must be a bug with macOS.
| May be it is fixed by now, I don't really want to try as
| I don't like when my OS crashes. You can inspect qemu
| command line from UTM, I'm not sure if I saved my
| scripts, but there're some weird flags which I had no
| idea what they're for, but when I removed them, it was
| boom, reboot.
| [deleted]
| ecnahc515 wrote:
| Were you trying to use more than 8GB of memory? There's
| an option to pass to qemu for highmem. Could be hitting
| this issue: https://github.com/lima-vm/lima/issues/713
| vbezhenar wrote:
| I think that I hit something similar to this issue:
| https://github.com/utmapp/UTM/issues/3946
|
| I didn't set too much RAM, definitely less than 8GB.
| [deleted]
___________________________________________________________________
(page generated 2022-08-22 23:01 UTC)