View previous topic :: View next topic |
Author |
Message |
Zucca Moderator
Joined: 14 Jun 2007 Posts: 3345 Location: Rasi, Finland
|
Posted: Sun Jul 03, 2022 8:19 am Post subject: Virtual Machine managers |
|
|
I've been using libvirtd (and virt-manager) to manage VMs.
It really isn't designed to run on a system without NetworkManager and firewalld.
Now I'm looking for alternatives.
What (qemu based) VM managers people here use?
Nice-to-have features of VM manager:- remote management (over network)
- virtual network management between VMs (which reside on the same host)
- textUI management console as an alternative to the GUI
_________________ ..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6098 Location: Dallas area
|
Posted: Sun Jul 03, 2022 3:41 pm Post subject: |
|
|
I've never used virtual managers, always just straight qemu cmd line, w/"-monitor unix:/tmp/qemu-monitor,server,nowait"
and
Code: | $ cat bin/qemu-monitor
#!/bin/bash
socat -,echo=0,icanon=0 unix-connect:/tmp/qemu-monitor |
There aren't a lot of choices for vm managers, libvirt or virt-manager (from gentoo) or some lang with libvirt bindings like php, perl, python, go, etc and create your own "manager".
And this https://www.linux-kvm.org/page/Management_Tools though not sure how many of these are still "current" _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
Zucca Moderator
Joined: 14 Jun 2007 Posts: 3345 Location: Rasi, Finland
|
Posted: Sun Jul 03, 2022 8:35 pm Post subject: |
|
|
Thanks.
Most of the promising ones use some sort of webUI, which in turn pulls in PHP or something else I don't want.
I'll try to go trough all of those more carefully later. _________________ ..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Sun Jul 03, 2022 9:28 pm Post subject: |
|
|
Zucca,
Quote: | I've been using libvirtd (and virt-manager) to manage VMs.
It really isn't designed to run on a system without NetworkManager and firewalld. |
It works fine here. The GUI is just eye candy wrapping the shell tools.
Its missing some functionality too. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
miket Guru
Joined: 28 Apr 2007 Posts: 488 Location: Gainesville, FL, USA
|
Posted: Tue Jul 05, 2022 2:04 pm Post subject: |
|
|
Anon-E-moose wrote: | I've never used virtual managers, always just straight qemu cmd line, w/"-monitor unix:/tmp/qemu-monitor,server,nowait"
and
Code: | $ cat bin/qemu-monitor
#!/bin/bash
socat -,echo=0,icanon=0 unix-connect:/tmp/qemu-monitor |
There aren't a lot of choices for vm managers, libvirt or virt-manager (from gentoo) or some lang with libvirt bindings like php, perl, python, go, etc and create your own "manager".
And this https://www.linux-kvm.org/page/Management_Tools though not sure how many of these are still "current" |
One of those managers I used was aqemu, a QT-based GUI. Though it's still in Portage and still starts OK and lets you manage guest configurations, it's not been compatable with the last few QEMU versions. The dependencies of libvirt have dissuaded me from solutions using it--not to mention its relatively heavy-handed approach. So I too have been sticking with the QEMU command line.
It's really too bad that aqemu won't do the job any more--especially as a monitor for running QEMU instances. It did a nice job of translating from the user's intent to the particular monitor commands to issue. (For example, to commit changes to the backing store for a drive running in snaphot mode requires the monitor command "commit device", where the particular device name can vary according to how you invoked QEMU.) I come away with the impression that the QEMU maintainers like to make it harder than it could be. Another thing is that they have ignored requests for a feature that several people have requested: that QEMU set up a signal handler to relay an ACPI powerdown event to the guest so that it could do a clean shutdown. That one feature would be a real boon for the writers of init scripts.
Just last week I had a time figuring out what the monitor commands should be to insert a USB stick into a running VM. That's the kind of job a virtual-machine monitor does well.
I did get the USB stick to work, but more than that, I started thinking of what would be needed to talk to the QEMU monitor. I thought a bit about aqemu for the purpose, but a difficulty arises: its designers failed to make a good separation of concerns beween the GUI components, the XML elements as stored in the descriptions of the guest machines, and the generation of the QEMU command line. It needs that information in order to use the monitor. So to fix aqemu requires fixing almost everything about it. I wasn't ready to take on that project without knowing more about QEMU invocation.
I had written two or three fairly small Bash scripts that read from a small text file to start QEMU. I decided I wanted expand the latest one to be more robust. It's still a work in progress--it doesn't even account for all my own use cases--but it already works for files like this (read this with the caution that the API is not yet stable): Code: | # Setup for Windows 10
machine name="Windows 10 Edge" type=pc-q35-2.10 cpu=host smp=1 m=4G kvm
display guest=virtio-vga host=sdl
drive file=hdd/Windows10_Edge.qcow2 if=ide
snapshot
sound ac97 driver=alsa
usb tablet
net user model=e1000 smb=share
monitor unix=sock/windows10.sock server=on wait=off |
Yes, plain-text name/value pairs. No XML, no JSON. It's only after I get this settled that I'll think more about how to monitor the guest.
Like Zucca, I'd like to see other options for monitoring guests, such as a text-based interface. Fortunately, QEMU has multiple communications options suitable for running between hosts, including TCP and UDP sockets, serial ports, and WebSockets. (The trouble with QEMU web sockets, I've found, is that they won't work if you try to connect with an already running instance; you have to start the session with the wait=on monitor option.)
I'm thinking of a Go program that would listen on a good solid UNIX socket and expose a curses interface. As for starting VM guests, I'm leaning to keeping the nice Bash script. |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6098 Location: Dallas area
|
|
Back to top |
|
|
Naib Watchman
Joined: 21 May 2004 Posts: 6051 Location: Removed by Neddy
|
Posted: Tue Jul 05, 2022 8:37 pm Post subject: |
|
|
I just use virt-manager ... lazyness mostly but tbf this is on a centos box where my dayjob isn't admin so I don't want to spend time messing around when something is funky AND I don't mess with it daily to have any musclememory _________________
Quote: | Removed by Chiitoo |
|
|
Back to top |
|
|
sdauth Guru
Joined: 19 Sep 2018 Posts: 569 Location: Ásgarðr
|
Posted: Tue Jul 05, 2022 9:37 pm Post subject: |
|
|
I don't use any. Every vm config are stored in simple bash script and started via an alias inside a 'screen' session. For the networking part, I use a bridge and each VM has its own IP on LAN. Works for me as once it is configured, it basically never change and I don't use fancy features like snapshot etc..
Otherwise, there is app-emulation/nemu which is an ncurses interface for QEMU but I have not enough experience with it to recommend it. (I used two years ago..) That said, the 3.x.x update looks quite nice. |
|
Back to top |
|
|
Zucca Moderator
Joined: 14 Jun 2007 Posts: 3345 Location: Rasi, Finland
|
Posted: Wed Jul 06, 2022 2:11 pm Post subject: |
|
|
Whoa! nemu looks really neat! I'm gonna test that out.
I found one quite interesting, but the last commit is from 2019. :( https://github.com/virtualsquare/virtualbricks
Naib wrote: | I just use virt-manager ... lazyness mostly but tbf this is on a centos box | Yeah. That's what I'd do on on any RH distro. Or even on Gentoo where systemd was init. Currently I have no systemd based Gentoo machines. _________________ ..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
|
kukibl Apprentice
Joined: 10 Jun 2008 Posts: 237
|
Posted: Thu Jul 07, 2022 8:40 am Post subject: |
|
|
I have used virt-manager, but for some reason there were always issues when virgl is used on the guest. I never went deeper into the issue...
So I switched to simple shell script which uses Qemu to launch different disk images with the same VM configuration. I use only Linux guest(s), so it would probably require tweaking for other OSes. |
|
Back to top |
|
|
Zucca Moderator
Joined: 14 Jun 2007 Posts: 3345 Location: Rasi, Finland
|
Posted: Thu Jul 21, 2022 1:45 pm Post subject: |
|
|
Code: | demi ~ # eshowkw -O nemu
Keywords for app-emulation/nemu:
| | u |
| a a p s r a l | n |
| m r h p p i i s l o m m | e u s | r
| d a m p p c a x a s 3 p o 6 i | a s l | e
| 6 r 6 p p 6 r 8 6 c 9 h n 8 p | p e o | p
| 4 m 4 a c 4 c 6 4 v 0 a g k s | i d t | o
------------+-------------------------------+-------+-------
2.5.0-r1 | + o o o o o o + o o o o o o o | 7 o 0 | gentoo
[I]3.0.0 | ~ o o o o o o ~ o o o o o o o | 7 o | gentoo | I managed to compile version 3.0.0, since 2.5.0-r1 failed at the configure phase because it couldn't determine glibc version. Strange...
At the end of installation portage told me that for non-root usage I need to run a script.
But it does look kind of ugly. For example: snippet of /usr/share/nemu/scripts/setup_nemu_nonroot.sh: | case "$OS" in
( linux )
KVM_GROUP=$(ls -la /dev/kvm | cut -d ' ' -f 4)
if [ "$KVM_GROUP" = "root" ]; then
echo "Warning: Additional group for KVM device is missing" >&2
echo "Fix it and run script again, \"-enable-kvm\" will not work" >&2
else |
I think I'll try to read what the script does and then issue the commands manually... _________________ ..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
|
AJM Apprentice
Joined: 25 Sep 2002 Posts: 189 Location: Aberdeen, Scotland
|
Posted: Thu Jul 21, 2022 10:09 pm Post subject: Re: Virtual Machine managers |
|
|
Zucca wrote: | I've been using libvirtd (and virt-manager) to manage VMs.
It really isn't designed to run on a system without NetworkManager and firewalld. |
Hmm, maybe I've not been trying to do complicated enough networking but libvirtd and virt-manager work fine for me - no NetworkManager or firewalld (or anythingD!) for me. |
|
Back to top |
|
|
grknight Retired Dev
Joined: 20 Feb 2015 Posts: 1660
|
Posted: Fri Jul 22, 2022 1:15 pm Post subject: Re: Virtual Machine managers |
|
|
AJM wrote: | Zucca wrote: | I've been using libvirtd (and virt-manager) to manage VMs.
It really isn't designed to run on a system without NetworkManager and firewalld. |
Hmm, maybe I've not been trying to do complicated enough networking but libvirtd and virt-manager work fine for me - no NetworkManager or firewalld (or anythingD!) for me. |
+1 Only using netifrc on a couple machines acting as "virtualize host" servers |
|
Back to top |
|
|
|