Help with libvirt
by Eduardo Kiassucumuca
Good morning I'm Eduardo, a computer science student and I'm doing a final course work focused on virtualization. The work consists of creating virtual machines on a server and allowing ssh access to the virtual machines that are on the server containing qemu/kvm/libvirt. The problem is that I can't access the virtual machines from an external network but I can access them inside the server. I would like to know what would be the best way since we want to have a single public ip and be able to have a reverse proxy to access the virtual machines, I would like to know from your experience what you recommend?
2 years, 4 months
Libvirt vs QEMU benefits
by M, Shivakumar
Hello,
For one of our case validation, we were using direct QEMU commands before for VM creation as it was easier to configure the VMs. Inside VM we do run the real-time latency test.
Recently we switched to libvirt for the VM creation and deletion. Surprisingly, we do see a significant increase in the real-time latency performance for the VMs launched through the libvirt.
W.r.t configuration wise both VMs are the same, we just converted the existing QEMU commands into libvirt XMLs.
I am wondering what and all the features which libvirt has, improving this performance.
Thanks,
Shivakumar M
2 years, 4 months
Libvirt Daemon Question
by Michael Espinoza
Hi
I’ve been googling this for a bit with no luck. Is there a way of
determining what mode an already running libvirt daemon is running
in.(session or system) From the docs it sounded like it was determined by
what user started the daemon. But in a test node I set up, I have libvirtd
running as root yet I can still connect to both the session and system
qemus with virsh. And if I were to want libvirtd only in session mode, how
would I do that?
Thanks for the help! This stuff is really awesome and I’m just trying to
get a full understanding of it.
-Mike
--
Michael Espinoza
Mobile Phone : 646 327 9273
Email : Mikespinoza(a)gmail.com
2 years, 4 months
"default" watchdog device - ?
by lejeczek
Hi guys.
Without explicitly, manually using watchdog device for a VM,
the VM (centOS 8 Stream 4.18.0-365.el8.x86_64) shows
'/dev/watchdog' exists.
To double check - 'dumpxml' does not show any such device -
what kind of a 'watchdog' that is?
watchdog-5.15-2.el8.x86_64 on such a VM does not seem to do
anything with it.
Host is centOS 9 with: qemu-img-6.2.0-11.el9.x86_64
libvirt-daemon-8.0.0-5.el9.x86_64
many thanks, L.
2 years, 5 months
Network interface element not working
by Ian Pilcher
I've added an interface element to a libvirt network, but it isn't
working. The interface is not being added to the bridge, even after the
system is rebooted.
# virsh net-dumpxml ocp4-net
<network>
<name>ocp4-net</name>
<uuid>b5852945-9889-4d22-ba61-879125316cec</uuid>
<forward dev='eno2' mode='nat'>
<nat>
<port start='1024' end='65535'/>
</nat>
<interface dev='eno2'/>
</forward>
<bridge name='virbr-ocp4' stp='on' delay='0'/>
<mac address='52:54:00:99:99:99'/>
<ip address='192.168.123.1' netmask='255.255.255.0'>
</ip>
</network>
# brctl show
bridge name bridge id STP enabled interfaces
virbr-ocp4 8000.525400999999 yes vnet0
virbr0 8000.525400a7ce7f yes
virbr1 8000.52540051eb1f yes vnet1
# rpm -q libvirt
libvirt-8.0.0-2.module_el8.6.0+1087+b42c8331.x86_64
Any ideas?
--
========================================================================
Google Where SkyNet meets Idiocracy
========================================================================
2 years, 5 months
Guest restarting after issuing a shutdown
by jonetsu
Hello everyone,
I create kvm machines using a bash script. As expected from the
script, the resulting virtual machines are performing as they should
be. The aspect that I do not get is at the end of the creation, when
issuing a 'shutdown now' in the guest and expecting that it will shut
down. Instead it does shut down, but it is restarted immediately.
The machines are created using an Arch Linux ISO file. The bash script
runs in three stages, the first stage is on the host. virt-install
will show the regular Arch Linux installation interface. The bash
script is copied to the machine and its second stage is ran. After
that a chroot is done and the third phase of the script is executed.
When everything is configured and installed, here is what happens,
commands are prefixed '%', text output is as is, and comments in
'()' :
guest : % shutdown now
host : Domain creation completed.
host : Restarting guest.
(virt-manager shows the guest restarting)
host : % virsh shutdown test02
(nothing happens, guest still shown)
host : % virsh destroy test02
host : Domain test02 destroyed
(guest display closes)
What I'm expecting is that, when the 'shutdown now' is issued in the
guest, that it will effectively terminate the guest, 'virsh list --all'
will not show it running, and there'll be no need to issue a 'virsh
destroy'. I have no clue at the moment why virsh is restarting the
guest after a shutdown was issued in the guest. Looks like virsh did
not get that it should terminate the guest and considers the shutdown
as an error.
Here are the versions involved :
host : xubuntu 20.04 LTS
libvirt 6.0.0-0ubuntu8.15
virt-manager 1:2.2.1-3ubuntu2.1
guest : archlinux 2022.03.01-x86_64
Thanks !
2 years, 5 months
Debugging hanging libvirt
by Tobias Hofmann (tohofman)
Hello all,
I have a system with one VM running. After some time the VM needs to be temporarily stopped and started again. This start operation fails and from that point on any virsh command is hanging and does not execute.
This issue is reproducible and I have already figured out that restarting libvirtd resolves this issue. However, I’m now trying to understand why it’s getting stuck in the first place.
I try not to get too much into detail because I think this would be more confusing than it would actually help to understand the problem. In general, I’m wondering what approach you should follow to debug why libvirt gets stuck.
Online I’ve read that you should run this command: `# gdb -batch -p $(pidof libvirtd) -ex 't a a bt f'`. I’ve run that command and attached the output to this mail. However, I have to admit that I have no idea what to do with it.
System related info:
* OS: CentOS 7.8.2003
* libvirt version: 4.5.0-33
Appreciate any help here!
Thank you!
Tobias
2 years, 5 months