Live data from Hacker News

Linux Hypervisor Setup (Libvirt/QEMU/KVM)

octetz.com

31–40 of 64 posts

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

#31

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.

Then you need to compare to the (for non-commercial use free ) vmware workstation (player) as well.

- Simple OpenGL accelerated guest graphics (alternatives: intel gvt-g, card passthrough, virgl in qemu (not generally available), SPICE+qxl in qemu (not nearly as performant))

- bridged networking "just works"

- open-vm-tools enable quite an interesting array of comfortable guest integration

- disk image format can be handled by qemu-img for conversion purposes, so it's easy to migrate vmware virtualbox qemu+kvm.

The graphics part is why for desktop VMs, I prefer the vmware solution at the moment.

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

#32

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.

This is the main virtualbox feature I sorely missed running kvm. Is there any easy way to configure bridge mode on kvm? I didn't dig too much because I also run docker and kubernetes on the same machine and I don't want to break their network config accidentally.

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

#33

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.

If anyone knows how to setup the bridge with wireless in libvirt/qemu/kvm following the steps with/without ebtables listed in Debian and Arch wiki, please do tell

1. https://wiki.archlinux.org/index.php/QEMU#Network_sharing_be...

2. https://wiki.archlinux.org/index.php/Network_bridge#Wireless...

3. https://wiki.debian.org/BridgeNetworkConnections#Bridging_wi...

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

#34
libvirt has too many gotchas to be as easy to use as virtualbox, vmware or proxmox. Proxmox also uses qemu+kvm, but is opinionated enough to pick the most appropriate option by default.

Example? For Networking, you probably want the virtio driver for maximum throughput if it is supported on the guest (even Windows has drivers now), using the emulated realtek device/e1000 is very slow. That means you should probably also use the virtio block devices, right? Nope, wrong, work on that was abandoned years ago, use SATA!

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

#35

libvirt has too many gotchas to be as easy to use as virtualbox, vmware or proxmox. Proxmox also uses qemu+kvm, but is opinionated enough to pick the most appropriate option by default. Example? For Networking, you probably want the virtio driver for maximum throughput if it is supported on the guest (even Windows has drivers now), using the emulated realtek device/e1000 is very slow. That means you should probably a…

The point about storage doesn't seem to be true: https://www.qemu.org/2021/01/19/virtio-blk-scsi-configuratio...

However, I am not an expert and would love to learn more. Intuitively though I wouldn't expect emulated SATA to be better than paravirt of any kind.

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

#36
post #14
post #5

Earlier quoted context omitted.

virt-install or virt-builder.

I have some extremely clunky 50 line shell scripts around virt-install presently but was hoping to find something a little more streamlined (like the usual Vagrant or docker-machine workflow). Do you just manually run a huge virt-install command each time?

Have you looked into Weaveworks Ignite?

https://github.com/weaveworks/ignite

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

#37
One annoyance I had with the defaults are the short dhcp lease time configured for dnsmasq, causing repeated dhcp lease logging in the logs. Turns out you can configure the lease time using virsh net-edit. The libvrit docs contain additional useful configuration options.

Another small thing but big quality of life improvement is exporting LIBVIRT_DEFAULT_URI='qemu:///system', so that everything you execute uses the correct connection.

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

#40
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.…

I've had luck with Proxmox and this Terraform provider: https://registry.terraform.io/providers/Telmate/proxmox/late...

Other than a working Proxmox install, you'll need to create a cloud-init template, which is documented here: https://pve.proxmox.com/wiki/Cloud-Init_Support

Post reply on HN