News for hackers. Stuff that matters.
Re:QEMU v4.0.0 released by idoubtit on Wednesday April 24, 2019 @04:26AM (#19736528)
Last week, I intended to replace VirtualBox with QEMU for my personal use. The spartiate documentation made it really hard. I lack the competence to seriously contribute.

The official documentation just explains the numerous parameters. It also points to tutorials (wikibook, etc), which unfortunately are very basic and out of sync. Even Arch Linux does not provide a good documentation (lack of clarity, some obsolete syntax, "Networking" section is a mess...). Like often, Debian's wiki is obsolete, and even their QEMU images are 5 years old. I had to combine the following 3 sources and a lot of try and guesses to build my VMs.

QEMU Gentoo : https://wiki.gentoo.org/wiki/QEMU/Options

QEMU official : https://qemu.weilnetz.de/doc/qemu-doc.html

KVM Performance : http://www.linux-kvm.org/page/Tuning_KVM

Re:QEMU v4.0.0 released by kashyapc on Wednesday April 24, 2019 @05:15AM (#19736722)
Launching QEMU directly is not merely "tricky", but incredibly inefficient and ineffective once you need something that's beyond bare minimal.

E.g. here is a minimal QEMU command-line that gives you access to a serial console in the guest:

`qemu-system-x86_64 -display none -no-user-config -nodefaults -m 2048 -device virtio-scsi-pci,id=scsi -device virtio-serial-pci -serial stdio -drive file=/export/cirros.qcow2,format=qcow2,if=virtio`

Simple, yeah? Now here (it's too long to post in this comment) is a real world QEMU command-line (as launched by the libvirt[1]):

htttps://kashyapc.fedorapeople.org/Fedora-28-QEMU-command-line-by-libvirt.txt

Compare and contrast the number of devices that libvirt adds.

FWIW, I strongly recommend to use libvirt to launch your QEMU-based guests. It is far more effective, and more importantly, provides security infrastructure like running the QEMU process as an unprivileged user, protecting the QEMU process (and its associated disk iamges) via the SELinux-based sVirt mechanism, and so forth.

Check out these[2] slides (recording is online, too) on "Security in QEMU" from one of the QEMU maintainers, Stefan Hajnoczi, at last year's KVM Forum in Edinburgh.

[1] http://libvirt.org/

[2] https://vmsplice.net/~stefan/stefanha-kvm-forum-2018.pdf

Re:QEMU v4.0.0 released by fulafel on Wednesday April 24, 2019 @07:22AM (#19737289)
There's a lot to be said for running qemu from the command line, vs the complexity and opaqueness of libvirt. For example you can put the invocation in a script and check it into version control, and it will work on anyone's Linux box. You can easily debug the config and be suire about what options qemu was given.

Yes, there may be many switches in the invocation, but at least they are in one place, the invocation syntax rarely changes and works accross distributions, and they are applied from scratch in each invocation rather than having lots of implicit state hidden in daemons and their configurations / databases.

Your example is nicer on the eyes written in a config file style and leaving out the unnecessary options:

  qemu-system-x86_64 \
     -display none \
     -m 2048 \
     -serial stdio \
     -drive file=/export/cirros.qcow2,\
            format=qcow2,\
            if=virtio
Re:QEMU v4.0.0 released by kashyapc on Wednesday April 24, 2019 @09:25AM (#19738061)
I can see the value in "putting the command-line in a script and launch it anywhere". Many of us use bespoke QEMU command-line scripts for test and development. And I even know a small hosting provider who manages their production guests entirely via QEMU command-line "config file" syntax (-writeconfig and -readconfig options—they're little-known, not least because they don't cover all the options; upstream has some proposals to address it).

I appreciate that libvirt may not be a suitable option for some. That said, you might want to consider the below points on where it adds value (for production VMs; not talking about test and development setups):

• It's not about having all the QEMU "switches available in one place". The dizzying array of switches make it trivial to let you shoot yourself in the shoulder (e.g. getting fiddly details like PCI device addressing right manually).

• Knowing the "best practice" command-line will get you optimal performance out of your (production) guest—libvirt handles that for you. And if the best practices change, libvirt will automatically handle that for you, as it keeps track of "QEMU command-line best practice evolution".

• Launching the command-line is only the first step. If it's a production guest, at some point you might need to live-migrate the guest, or take a live disk backup, or if your guest has a long disk image backing chain, you want to "merge" the disk images into a single, coalesced image—all of this without the guest going offline. These tasks can be done manually (assuming you launched QEMU the 'right away' upfront) via extremely tedious and error-prone ways using QEMU's JSON-based run-time interface, QMP (QEMU Machine Protocol). But that's too risky and a colossal waste of time.

• Speaking of QMP, the run-time interface, it has even more dizzying array of commands—to be more precise, as of 2015: QMP had about 126 commands + 33 events. And more than 700 named arguments and results. Try keeping track of all of that manually. It reminds me of how once a QEMU sub-maintainer memorably compared (in his 2015 talk, "QEMU interface introspection: From hacks to solutions") the volume of QMP schema to old religious books: "QMP schema is larger than "Gospel of Luke", but smaller than "Genesis". :-)

IOW, I'm yet to see anyone who launches multiple guests (on the moderate scale of hundreds of VMs) use direct QEMU in production. There are odd examples, as I noted earlier, but it's certainly not the norm.

Re:QEMU v4.0.0 released by ris on Wednesday April 24, 2019 @05:53PM (#19742957)
Sometimes I feel like all I do is plug Nix.

But NixOS has a neat feature where any (?) NixOS configuration can trivially instead be built as a "vm", which will assemble an initrd for the described system along with a script which will run a tailored qemu invocation to launch the system, leaving a qcow2 file of any changes you make to the filesystem in your cwd. Makes the whole thing extremely usable, and is done in a very extensible way.

Re:QEMU v4.0.0 released by jolmg on Wednesday April 24, 2019 @11:02AM (#19739029)
You're splitting the option value for -drive into multiple arguments. Here's an idea to fix that while keeping the same style:

  qemu-system-x86_64 \
      -display none \
      -m 2048 \
      -serial stdio \
      -drive "$(printf "%s"
          file=/export/cirros.qcow2, \
          format=qcow2, \
          if=virtio
      )"
Re:QEMU v4.0.0 released by yrro on Wednesday April 24, 2019 @06:53PM (#19743341)
If you don't mind using bash:

    args=(
     -display none
     -m 2048
     -serial stdio
    # -disabled-option
    )

    qemu-system-x86_64 "${args[@]}"
The array syntax means you can ditch the tedious backslashes and easily comment individual lines.
Re:QEMU v4.0.0 released by jolmg on Thursday April 25, 2019 @11:07AM (#19748930)
You're right about the ability to comment, but it doesn't save you from the tedious commas:

  drive_args=(
      file=/export/cirros.qcow2,
      format=qcow2,
      if=virtio
  )

  qemu_args=(
      -display none
      -m 2048
      -serial stdio
      -drive "$(printf "%s" "${drive_args[@]}")"
  )

  qemu-system-x86_64 "${qemu_args[@]}"
Personally, I prefer it with the backslashes if I don't need to comment.
Re:QEMU v4.0.0 released by kashyapc on Thursday April 25, 2019 @03:54AM (#19745957)
Ah, indeed. Thanks for the nice trick to avoid the tedium.
Re:QEMU v4.0.0 released by LukeShu on Wednesday April 24, 2019 @09:40AM (#19738184)
> minimal QEMU command-line"

> -nodefaults

Once you add `-nodefaults`, the list of arguments grows because now you must add a bunch of things that were there by default. If by "minimal command-line" you mean "the simplest list of arguments", then your example is wrong. If by "minimal command-line" you mean "command-line that gives the minimal VM", then you're being misleading, because that's not how people will take it.

Most of the devices added by libvirt would be included by qemu automatically if you didn't say `-nodefaults`. libvirt uses `-nodefaults` and specifies its own defaults, so that it doesn't need to keep track of changes in Qemu's defaults between versions of Qemu (since libvirt cares about the nitty-gritty more than most humans do).

PS: You have too many "t"s in the "htttps://" in one of those URLs.

Re:QEMU v4.0.0 released by kashyapc on Wednesday April 24, 2019 @12:47PM (#19740243)
> Once you add `-nodefaults`, the list of arguments grows because now you must add a bunch of things that were there by default [...]

Partly true (refer below).

> If by "minimal command-line" you mean [...]

I appreciate your corrections, but please don't read too much into the word "minimal". I just quickly pasted it from one of the "subjective scripts" named `min-qemu.sh` lying around on my file system. By the time I realized, it was too late to adjust it.

> Most of the devices added by libvirt would be included by qemu automatically if you didn't say `-nodefaults`

Not quite; I just double-checked with an upstream libvirt dev: when you remove `-nodefaults`, some of the built-in devices get removed, whether those equate to "most" or not depends how many devices you've asked for.

> PS: You have too many "t"s in the "htttps://" in one of those URLs.

Yeah, realized too late that there was a typo :-(

Re:QEMU v4.0.0 released by JoshuaRLi on Wednesday April 24, 2019 @09:56AM (#19738350)
This. Also, most of the example command line has nothing to do with serial consoles.
Re:QEMU v4.0.0 released by antocv on Wednesday April 24, 2019 @07:21AM (#19737277)
> like running the QEMU process as an unprivileged user,

Anyone can run your example "qemu-system-x86_64 -display none -no-user-config -nodefaults -m 2048 -device virtio-scsi-pci,id=scsi -device virtio-serial-pci -serial stdio -drive file=/export/cirros.qcow2,format=qcow2,if=virtio" from the command line/bash, as non-root user, yet libvirt which requires root to install, and is expecting root to configure it, is better? How?

Libvirt is one of those softwares which ads a layer of complexity for the sake of complexity, yet offers nothing of value in return.

Re:QEMU v4.0.0 released by throwaway2048 on Wednesday April 24, 2019 @08:44AM (#19737761)
its not true that libvirt adds nothing of value, it adds easy networking support, easy snapshots, a nice gui interface, a very nice remote protocol and clients (that seamlessly support both graphical and serial output, aswell as on the fly reconfiguration of VMs without restarting them), template VMs (including one time initial provision setup), easy support for storage pools including remote ones, an easy way to manipulate RAM usage on live VMs, easy PCI and USB passthrough, live migration to other hosts, etc etc.

Sure its possible to do all this without libvirt, but it comes as one integrated, easy to manage package instead of hundreds of disparate parts.

You might not need (all) these features, but to claim libvirt is useless is extremely parochial.

Its also untrue that it needs root, you can virt-manager for instance without a root libvirtd instance at all, and it will run VMs without any permissions needed.

Re:QEMU v4.0.0 released by antocv on Wednesday April 24, 2019 @09:08AM (#19737927)
> its not true that libvirt adds nothing of value, it adds easy networking support, easy snapshots, a nice gui interface, a very nice remote protocol and clients (that seamlessly support both graphical and serial output, aswell as on the fly reconfiguration of VMs without restarting them), template VMs (including one time initial provision setup), easy support for storage pools including remote ones, an easy way to manipulate RAM usage on live VMs, easy PCI and USB passthrough, live migration to other hosts, etc etc.

everything libvirt does can be done without it by talking to qemu directly. and yes, Ive done many of the above "by hand", it was easier to read man qemu and other qemu docs than to swallow libvirt.

Re:QEMU v4.0.0 released by throwaway2048 on Wednesday April 24, 2019 @09:16AM (#19737975)
No, not everything it does can be done by qemu directly, plenty of it lies outside of the scope of QEMU entirely, like managing networks (not just network devices), or storage pools, setting up permissions for device redirection, or doing the legwork for VM provisioning and configuration (including net booting and automatically running appropriate scripts), or managing access to VMs both locally and remotely.

Its fine if your use cases are covered by plain QEMU, but libvirt does a hell of a lot more than plain QEMU alone is capable of.

Again all of that is possible via other means, but when other means involve recreating half of libvirt in shell scripts or other code, id rather let somebody else do the work for me.

QEMU is designed to run virtual machines, libvirtd is designed to manage VM server infrastructure.

Re:QEMU v4.0.0 released by fulafel on Wednesday April 24, 2019 @09:36AM (#19738152)
The alternative is not that many commands: https://blog.elastocloud.org/2015/07/qemukvm-bridged-network...
Re:QEMU v4.0.0 released by throwaway2048 on Wednesday April 24, 2019 @09:45AM (#19738222)
For one static network, what about complicated inter VM networking schemes (including firewalling) that need to be dynamically adjusted as VMs go on and offline?

Libvirtd is much better suited to managing that sort of complexity.

Re:QEMU v4.0.0 released by fulafel on Wednesday April 24, 2019 @09:52AM (#19738297)
I have the luxury of opining that such complicated networking schemes should be reined in, and not served with baroque management software. Complexity is the arch enemy of security, because systems must be kept easy to reason about.
Re:QEMU v4.0.0 released by ori_b on Wednesday April 24, 2019 @07:56AM (#19737483)
Indeed. Instead of contributing a patch to qemu with better defaults, or even support for config files, someone wrote tens of thousands of lines of complex code.

People forget that software is malleable. Bend it to your needs, instead of adding fragile wrapper layers.

Re:QEMU v4.0.0 released by LukeShu on Wednesday April 24, 2019 @09:34AM (#19738134)
libvirt-the-software is tens of thousands of lines of complex code that doesn't really add much. libvirt-the-project does contribute patches in to qemu, and a lot of the reason that libvirt-the-software doesn't add much of value is because libvirt-the-project worked to get capabilities in to upstream qemu.

The libvirt team definitely does view qemu as malleable, and bends it to their needs.

The problem is that the libvirt authors contributing to qemu look at qemu as a machine-interface (to be consumed by libvirt), not as a human-interface. Many of the more poorly documented or otherwise difficult-for-humans flags were contributed by the libvirt team. And they're useful! They make it so qemu can do things it couldn't do before. But they're also kinda the reason qemu is difficult to use without libvirt.

Re:QEMU v4.0.0 released by JoshuaRLi on Wednesday April 24, 2019 @09:52AM (#19738299)
Good observations! I can't say I like it when a wrapper (loosely said here) starts to exert too much influence over what it wraps.
Re:QEMU v4.0.0 released by kbenson on Wednesday April 24, 2019 @10:53AM (#19738920)
> Libvirt is one of those softwares which ads a layer of complexity for the sake of complexity, yet offers nothing of value in return.

Isn't that sort of like saying the system startup scripts/subsystem adds complexity for the sake of complexity, and you should just use ifconfig and route manually in some script after startup?

In both cases, that you can fall back to the underlying commands is great. That you should use them instead of the normalized interface provided is debatable.

Re:QEMU v4.0.0 released by jolmg on Wednesday April 24, 2019 @11:16AM (#19739216)
Unless the default changed one of these last few years, I'm pretty sure if you don't use `-enable-kvm` then qemu emulates the selected architecture. That's probably why it doesn't need root.

EDIT: Nevermind, `-enable-kvm` also doesn't need root. I'm not sure what libvirt uses root for.

Re:QEMU v4.0.0 released by uname_a on Wednesday April 24, 2019 @05:11PM (#19742626)
Hear, hear. QEMU is excellent software, and I don't find that libvirt adds any value to its use.

Instead, one of the more annoying things I have ever done was foolishly installing libvirt and having it do all kinds of whackiness to a previously excellent QEMU set-up. I still cannot figure out where it managed to change all QEMU invocations to be VNC-based.

Re:QEMU v4.0.0 released by jolmg on Wednesday April 24, 2019 @11:28AM (#19739337)
> E.g. here is a minimal QEMU command-line that gives you access to a serial console in the guest:

> `qemu-system-x86_64 -display none -no-user-config -nodefaults -m 2048 -device virtio-scsi-pci,id=scsi -device virtio-serial-pci -serial stdio -drive file=/export/cirros.qcow2,format=qcow2,if=virtio`

That's far more than I typically put in my qemu calls. You can technically be fine with just:

  qemu-system-x86_64 foobar.qcow2
but I always add `-enable-kvm` and use `-monitor stdio` or `-nographic` depending if I want a graphic display from the vm or not. `-nographic` is all I need to give me access to a serial console in the guest (besides configuring the guest kernel with the paramater `console=ttyS0`). I also add `-m` because the default amount of memory is just 128 MiB, which is typically not enough for my use. Sometimes I add network related arguments, but we're going beyond minimal then.
Re:QEMU v4.0.0 released by diaz on Wednesday April 24, 2019 @10:07AM (#19738457)
There's not really much choice than trying to use qemu command line directly on windows. I didn't find any single useful GUI that was usable or newer than 3 or 4 years ago. It's a pretty sad state of affairs. I spend hours until I discovered that I needed to add some magic flag called machine for acceleration even work.
Re:QEMU v4.0.0 released by chousuke on Wednesday April 24, 2019 @04:41AM (#19736590)
Using QEMU directly is a bit tricky and it's not really intended to be used in that fashion by most users, unlike VirtualBox.

Both gnome-boxes and virt-manager use QEMU under the hood though, and they provide a point-and-click experience. I use virt-manager myself and I do not think it's any more difficult than VirtualBox is.

Re:QEMU v4.0.0 released by vero2 on Wednesday April 24, 2019 @04:47AM (#19736616)
We have several windows vms running in virtualbox. All have rdp/vnc for specialised programs. (These are offline).

Everytime I tried to migrate to qemu or virt-manager or gnome-boxes it was a real nightmare especially installing SPICE+virtio drivers+ networking. I read in Phoronix the performance of virtualbox is subpar and all KVM/qemu is the way to go.

Please, could the OSS community build a easy to use GUI that SPICE+virtio drivers+ networking is made simple. Any one from qemu, I really appreciate the work but still very challenging for sysadmins.

Re:QEMU v4.0.0 released by nwatson on Wednesday April 24, 2019 @08:21AM (#19737627)
About 12 years ago when I had access to Microsoft MSDN I got a big SuperMicro box, set it up with CentOS 4 (RHEL) Linux, and used QEMU/KVM to set up a Windows domain controller and several other Windows VMs, and several Linux VMs, on a couple of virtual subnets, along with iptables port forwarding, Windows Remote Desktop, VNC, and many services. Some of the Linux VMs services authenticated with the Windows domain. I wanted to set up at least one non-x86/x64 emulated-CPU VM but never got that working very well in QEMU.

The exercise was a good (and incremental) learning experience and increased my general networking and sys-admin knowledge, which I've used well as part of my software engineering career. I would have been lost in many professional situations without it. QEMU/KVM are awesome.

EDIT: more and better words

Re:QEMU v4.0.0 released by oblio on Wednesday April 24, 2019 @10:23AM (#19738590)
So basically what you're saying is RTFM, in a polite fashion :)
Re:QEMU v4.0.0 released by aasasd on Wednesday April 24, 2019 @05:52AM (#19736888)
Virt-manager seems to be written in Python. So if libvirt supports the bits you want then with some tinkering in GTK you might be able to bolt the controls onto Virt-manager, at least to get things started.
Re:QEMU v4.0.0 released by chousuke on Wednesday April 24, 2019 @05:10AM (#19736708)
I confess that I haven't run Windows with virt-manager on my own desktop in a long while, but it worked just fine after installing the required drivers at install time. IIRC Redhat distributes signed drivers for Windows for free.

The problems I did have were with VMs I tried to convert from VMware to KVM, and those stemmed from Windows' inability (version 7) to properly handle changing hardware. Perhaps it's better at nowadays.

Re:QEMU v4.0.0 released by naasking on Wednesday April 24, 2019 @08:20AM (#19737619)
Did this recently. It runs ok, but input and responsiveness latency is very noticeable.
Re:QEMU v4.0.0 released by soulnothing on Wednesday April 24, 2019 @11:23AM (#19739292)
I mainly use windows + libvirt for gaming. But I also have an instance on a dedicated server for a remote development environment.

I would say forget spice + libvirt graphics layer. Use RDP, if on linux remmina work's great. RDP will outperform in my experience SPICE. I've also had constant troubles with the vga/qxl/virtio graphics.

Secondily for virtio: https://docs.fedoraproject.org/en-US/quick-docs/creating-win...

There is an iso at the above link. Grab that and have it added during install. When you get to the select a drive. None will show up until you load the virtiostorage driver.

There are a lot of nuances to first setting up a windows vm. But the performance is great. It has removed the need for a windows install for gaming at all.

Re:QEMU v4.0.0 released by throwaway2048 on Wednesday April 24, 2019 @09:00AM (#19737874)
Install the guest tools for windows from here

https://www.spice-space.org/download.html

It will contain everything you need for a fairly seamless experience on windows, and libvirtd and virt-manager make host side a cakewalk as well.

Re:QEMU v4.0.0 released by jsight on Wednesday April 24, 2019 @10:54AM (#19738935)
TBH, I tend to give up on the accelerated video drivers on Windows inside of virt-manager. It is often easier to just use RDP for basic office applications.
Re:QEMU v4.0.0 released by pm215 on Wednesday April 24, 2019 @04:45AM (#19736609)
My recommendation for that sort of use would be to look at using a 'management layer' app that sits above QEMU and handles all the fiddly command line details for you -- https://virt-manager.org/ (which uses/is part of libvirt) is a popular one, I think. The QEMU project has kind of settled on the philosophy of being the low-level tool which provides you "full manual control" and interfaces for a higher-level UI to make use of. User-friendliness is not really our forte and so we let other projects provide that part.
Re:QEMU v4.0.0 released by idoubtit on Wednesday April 24, 2019 @05:03AM (#19736683)
This is the context I was missing when I switched to QEMU. I had not heard about libvirt. A simple "apt search qemu" had shown a few unsatisfying GUIs, but nothing about other layers above qemu.

I suggest QEMU's documentation could mention libvirt and its user-friendly interfaces.

Re:QEMU v4.0.0 released by kashyapc on Wednesday April 24, 2019 @05:28AM (#19736784)
FWIW, QEMU's upstream README does mention libvirt and higher-level managment tools:

"QEMU aims to fit into a variety of use cases. It can be invoked directly by users wishing to have full control over its behaviour and settings. It also aims to facilitate integration into higher level management layers, by providing a stable command line interface and monitor API. It is commonly invoked indirectly via the libvirt library when using open source applications such as oVirt, OpenStack and virt-manager."

But I get it, not everyone goes in search of a README buried in a Git repository. I myself am not sure if this REAMDE is rendered in an HTML format somewhere.

[1] https://git.qemu.org/?p=qemu.git;a=blob_plain;f=README

Re:QEMU v4.0.0 released by LukeShu on Wednesday April 24, 2019 @09:45AM (#19738224)
Note that libvirt isn't Qemu-specific; it supports multiple backends, including VirtualBox and Xen.
Re:QEMU v4.0.0 released by carlavilla on Wednesday April 24, 2019 @06:36AM (#19737071)
Modern GUI for QEMU: https://gitlab.com/qtemu
Re:QEMU v4.0.0 released by signa11 on Wednesday April 24, 2019 @05:02AM (#19736678)
> I lack the competence to seriously contribute.

actually, having gone through the process of successfully setting up the vm’s make you eminently suitable to contribute documentation knowledge that is sorely lacking in the online resources you have pointed out.

i am sure it will be greatly appreciated and will get improved upon areas that are missing etc.

Re:QEMU v4.0.0 released by simula67 on Wednesday April 24, 2019 @04:35AM (#19736558)
I have not used it, but Drew Devault had a post explaining how to get started with Qemu : https://drewdevault.com/2018/09/10/Getting-started-with-qemu...
Re:QEMU v4.0.0 released by aorth on Wednesday April 24, 2019 @05:42AM (#19736833)
After a decade of only using qemu via libvirt on the server, and lazily using VirtualBox on the desktop, this post convinced me to start using qemu locally. I run unprivileged guests for development and testing and it fits my workflow perfectly for about six months now.
Re:QEMU v4.0.0 released by emmelaich on Wednesday April 24, 2019 @04:37AM (#19736571)
The Gnome Boxes app is excellent

https://wiki.gnome.org/action/show/Apps/Boxes

Re:QEMU v4.0.0 released by pferde on Wednesday April 24, 2019 @04:40AM (#19736589)
There are several higher level frameworks that wrap QEMU-KVM and make it easier to use. oVirt, libvirt and proxmox are among my favourites, with the latter being quite polished and with advanced features for HA use.
Re:QEMU v4.0.0 released by BossingAround on Wednesday April 24, 2019 @04:44AM (#19736605)
Rather than using QEMU by itself, it might be advisable to use libvirt..? As somewhat of a newbie to virtualization, that's how I started - googling how to use libvirt and virsh, and I found a lot of resources that helped me to deploy what I needed... What are your painpoints in particular? I.e. which topics would you like to explore deeper and can't due to poor documentation/resources? We could work on improving the resources.
Re:QEMU v4.0.0 released by qalmakka on Wednesday April 24, 2019 @05:02AM (#19736680)
I personally dislike libvirt a lot, and virsh in particular. I think that it's pointlessly complicated and burdensome to use, and that in general the hypervisor-agnosticabstractions provided by libvirt are nullified by the fact that no backend except Qemu really works well, this making them a pointless exercise in futility.
Re:QEMU v4.0.0 released by jezze on Wednesday April 24, 2019 @06:05AM (#19736955)
I agree with you whole-heartedly. Instead of running one simple qemu command for each vm you instead have hundreds of lines of xml split into many different files. Files you need to run through libvirts session manager that needs to implements its own pretty pointless state management (this could be handled by systemd instead). If there is a nice feature in qemu you want to use, not only do you need to know how to define it in libvirts xml, it might not even be supported at all.
Re:QEMU v4.0.0 released by babuskov on Wednesday April 24, 2019 @04:48AM (#19736623)
> What are your painpoints in particular?

I believe his pain point is that with Virtual Box you get a very simple GUI where you can get VM up and running very quickly without having to use Google or read any guides at all.

Re:QEMU v4.0.0 released by BossingAround on Wednesday April 24, 2019 @05:45AM (#19736853)
For that, I use 'Virtual Machine Manager' [1], which works for me extremely well, and is available for major distros.

[1] https://virt-manager.org/

Re:QEMU v4.0.0 released by philpem on Wednesday April 24, 2019 @06:27AM (#19737043)
Well, qemu + libvirt + virt-manager works pretty well.

Virt-manager adds a very nice VirtualBox-style GUI front-end to libvirt.

Re:QEMU v4.0.0 released by carlavilla on Wednesday April 24, 2019 @06:38AM (#19737084)
You can use QtEmu (https://gitlab.com/qtemu)
Re:QEMU v4.0.0 released by tobbyb on Wednesday April 24, 2019 @02:22PM (#19741345)
We need to spin up a lot of VMs of various Linux distributions for testing Flockport and we found the existing tooling too heavy and involved.

In the end we rolled our own solution that is much more lightweight, uses QEMU directly and provides better visibility, ease of use and even some potentially useful networking features. Here are a few screencasts [1].

This is mainly designed as a module for Flockport and we will preview this soon.

[1] https://www.youtube.com/watch?v=uEnk9m-egeA

Re:QEMU v4.0.0 released by bloopernova on Wednesday April 24, 2019 @08:13AM (#19737580)
When I was running a Fedora desktop and was doing a lot of dev/test work on VMs+Foreman+Puppet, I used Libvirt+QEMU as the VM hypervisor.

I ran Foreman inside a CentOS VM, which talked to my desktop's Libvirtd to provision new VMs, hand out IPs via DHCP, boot via TFTP, then kickstart. It worked pretty well, and helped me to spin up a vcenter foreman controlled dev environment for a few hundred users in just a few days.

My recommendation would be Vagrant + Libvirt.

Re:QEMU v4.0.0 released by chapium on Wednesday April 24, 2019 @09:27AM (#19738076)
You can always document your experience, what worked, what didn't work, things you are still unsure about.
Re:QEMU v4.0.0 released by revskill on Wednesday April 24, 2019 @04:55AM (#19736653)
This reminds me of: One clear documentation page is worth thousands hours of man work.
Re:QEMU v4.0.0 released by Double_a_92 on Wednesday April 24, 2019 @04:29AM (#19736537)
Welcome to the Open Source experience... sadly.
Re:QEMU v4.0.0 released by Retra on Wednesday April 24, 2019 @10:02AM (#19738416)
As opposed to what? Most proprietary tools don't have good documentation either. And then you may not even be able to look at the code to see what it does.
Re:QEMU v4.0.0 released by oblio on Wednesday April 24, 2019 @10:25AM (#19738609)
I don't get why he's downvoted. Virtualbox (which is not proprietary), VMWare, Hyper-V are way easier to use.

That's a fact.

And not many people need to look at the code in real life...

Re:QEMU v4.0.0 released by bonzini on Wednesday April 24, 2019 @10:58AM (#19738983)
You should compare VirtualBox to virt-manager or GNOME Boxes, not QEMU, just like you shouldn't compare Visual Studio to gcc.
Re:QEMU v4.0.0 released by nurettin on Wednesday April 24, 2019 @12:13PM (#19739888)
I am on my third confusing error using virt-manager to create an armv7 build environment. First one was some ca-cert error, which meant I forgot to type a slash somewhere in some URL, second was something about not being able to enable firewall, which required firewalld and dnsmasq to be installed, now I'm having an error adding a qcow2 image to my vm setup, it probably doesn't like my mounted storage. We can compare this experience to terrible vendor lockins.
Re:QEMU v4.0.0 released by oblio on Wednesday April 24, 2019 @11:55AM (#19739678)
Yeah, but VirtualBox & co. come as a package. virt-manager and Gnome Boxes, as you can see from the other comments, have been missed by various people trying to use these tools :)
Re:QEMU v4.0.0 released by darkwater on Wednesday April 24, 2019 @04:36AM (#19736569)