Live data from Hacker News

Linux Hypervisor Setup (Libvirt/QEMU/KVM)

octetz.com

21–30 of 64 posts

Re: Linux Hypervisor Setup (Libvirt/QEMU/KVM)

#21
post #2

What do you all use for quick one-command (non gui) new vm bringup? I haven't had much luck with terraform with libvirt, and I miss Vagrant but don't want to lock myself into its syntax. Maybe I should just start using it again but I feel like there has got to be a good libvirt-based way. Provisioning new test vms with userdata embedded into an kickstart-or-whatever iso that is provided to libvirt also seems clunky.…

You mention Terraform, I'm using https://github.com/dmacvicar/terraform-provider-libvirt quite heavily and it works a treat.

Re: Linux Hypervisor Setup (Libvirt/QEMU/KVM)

#22
One thing is missing comparing to virtualbox, is the bridge-mode especially when host uses wireless which is very common these days.

virtualbox hacked bridge-mode and made it working well all the time, with libvirt/qemu/kvm you will need write a lot of scripts and click around to set this up.

This is the sole reason I had to stick with virtualbox these years.

Re: Linux Hypervisor Setup (Libvirt/QEMU/KVM)

#23
post #18

How annoying that this page uses a non-standard port for the WebSocket "livereload" feature (1313). It makes my firewall pop up constantly.

Browse with JS disabled by default. Then in uBlock Origin you can temporarily whitelist the page and browse it with JS enabled if it really requires it.

Re: Linux Hypervisor Setup (Libvirt/QEMU/KVM)

#24

One thing is missing comparing to virtualbox, is the bridge-mode especially when host uses wireless which is very common these days. virtualbox hacked bridge-mode and made it working well all the time, with libvirt/qemu/kvm you will need write a lot of scripts and click around to set this up. This is the sole reason I had to stick with virtualbox these years.

I'm a big VirtualBox fan as well and I'm sad to see that Apple M1 (ARM) support isn't really a priority.

Re: Linux Hypervisor Setup (Libvirt/QEMU/KVM)

#25
post #15
post #3

I use qemu and never really understood the need for any further abstraction such as libvirt over it's cli usage. Can anyone tell me what there is to be gained other than needing further setup, packages and systemd services?

It's not just about abstraction. VirtIO is significantly more efficient than SATA emulation, and as it is built into the Linux kernel it just works. There is also a Windows driver package that adds VirtIO support, but it's a bit tricky to get it to work when porting in an existing Windows VM. VirtIO also makes it possible to do USB relay.

There's more cool stuff coming in this area too. For a long time there's been the virtio family of protocols for shuttling IO to something outside QEMU to handle. Originally that was always KVM and the implementation is called vhost. Then later it became clear that these same messages could be sent to another user space process to handle instead (called vhost-user). These work great for creating virtio devices in the guest. But operating systems like Windows don't have virtio device drivers in-box, so it's a little annoying.

Recently, a new protocol to replace virtio has been defined. It is modeled on vfio ioctls and currently only can forward to another user space process, so we're calling it vfio-user. With this protocol, it's possible to emulate any PCI device rather than only virtio devices. Projects like SPDK (what I work on) can now use this to present fully emulated NVMe devices into guests and back them with whatever actual storage is available (a file, something over the network, a real NVMe SSD, etc). This allows an OS, including Windows, to boot from the virtual disk using it's in-box NVMe driver. This hasn't quite made it into a QEMU release yet, but it's close!

Re: Linux Hypervisor Setup (Libvirt/QEMU/KVM)

#26

One thing is missing comparing to virtualbox, is the bridge-mode especially when host uses wireless which is very common these days. virtualbox hacked bridge-mode and made it working well all the time, with libvirt/qemu/kvm you will need write a lot of scripts and click around to set this up. This is the sole reason I had to stick with virtualbox these years.

I'm a big VirtualBox fan as well and I'm sad to see that Apple M1 (ARM) support isn't really a priority.

I get the impression Oracle is killing VirtualBox through neglect.

Re: Linux Hypervisor Setup (Libvirt/QEMU/KVM)

#28
post #2

What do you all use for quick one-command (non gui) new vm bringup? I haven't had much luck with terraform with libvirt, and I miss Vagrant but don't want to lock myself into its syntax. Maybe I should just start using it again but I feel like there has got to be a good libvirt-based way. Provisioning new test vms with userdata embedded into an kickstart-or-whatever iso that is provided to libvirt also seems clunky.…

You mention Terraform, I'm using https://github.com/dmacvicar/terraform-provider-libvirt quite heavily and it works a treat.

That's the one I've had suboptimal experience with. Maybe I need to learn it better. What kind of storage are you using it with? I ran into issues using file-backed trying to keep everything in tf.

Re: Linux Hypervisor Setup (Libvirt/QEMU/KVM)

#29
post #3

I use qemu and never really understood the need for any further abstraction such as libvirt over it's cli usage. Can anyone tell me what there is to be gained other than needing further setup, packages and systemd services?

When I started using virt-manager I started there because I was specifically looking to replace Virtual box due to having kernel modules for VB sometimes block kernel upgrades. So I guess I was looking for a GUI since I was on a desktop anyways. (Just have some dev VMs so I don't have to clutter my desktop with running MySQL etc for some projects and so I can match the distro of the production server)

So I guess, it worked, didn't look into raw qemu. I also use it infrequently enough that I would have to relearn the CLI all the time.

Post reply on HN