[libvirt-users] [virtual interface] detach interface during boot succeed with no changes
by Yalan Zhang
Hi guys,
when I detach an interface from vm during boot (vm boot not finished), it
always fail. I'm not sure if there is an existing bug. I have
confirmed with someone that for disk, there is similar behavior, if
this is also acceptable?
# virsh destroy rhel7.2; virsh start rhel7.2 ;sleep 2; virsh
detach-interface rhel7.2 network 52:54:00:98:c4:a0; sleep 2; virsh
dumpxml rhel7.2 |grep /interface -B9
Domain rhel7.2 destroyed
Domain rhel7.2 started
Interface detached successfully
<address type='pci' domain='0x0000' bus='0x00' slot='0x06'
function='0x0'/>
</controller>
<interface type='network'>
<mac address='52:54:00:98:c4:a0'/>
<source network='default' bridge='virbr0'/>
<target dev='vnet0'/>
<model type='rtl8139'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03'
function='0x0'/>
</interface>
When I detach after the vm boot, expand the sleep time to 10, it will succeed.
# virsh destroy rhel7.2; virsh start rhel7.2 ;sleep 10; virsh
detach-interface rhel7.2 network 52:54:00:98:c4:a0; sleep 2; virsh
dumpxml rhel7.2 |grep /interface -B9
Domain rhel7.2 destroyed
Domain rhel7.2 started
Interface detached successfully
-------
Best Regards,
Yalan Zhang
IRC: yalzhang
Internal phone: 8389413
2 years, 3 months
Need more doc for libvirt-console-proxy
by Guy Godfroy
Hello,
I'm making a web app for my company that will enable different teams to
manage their own VMs. I wish to make possible to interact with each VM
console, so I plan to use some xterm.js with websockets.
So I discovered libvirt-console-proxy [1] when I looked for something to
put a libvirt console into a websocket. That seems like the right tool
for the job.
The only doc I found is this article from 2017 [2]. After trying to
understand from this article and from --help, I still have many
questions. I am really bad at reading code so I can't even get answers
from the sources.
My main concern is: How a client is supposed to talk to the proxy? It is
said that a security token must be provided. How? HTTP header? Which
header? Am I missing something in websocket protocol? I think an example
client implementation would help a lot.
Also, I tried to use virtconsoleresolveradm to set up metadata on my
domains like explained in the article [1] :
./virtconsoleresolveradm enable milou
Enabled access to domain 'milou'
But that doesn't seem to do anything (except defining the metadata
namespace in the XML):
virsh metadata milou http://libvirt.org/schemas/console-proxy/1.0
<consoles/>
I precise that I have already this in my XML:
<serial type='pty'>
<target type='isa-serial' port='0'>
<model name='isa-serial'/>
</target>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
Should I remove that? Should I edit that?
Thanks for your help.
Guy Godfroy
[1] https://gitlab.com/libvirt/libvirt-console-proxy
[2]
https://www.berrange.com/posts/2017/01/26/announce-new-libvirt-console-pr...
3 years, 2 months
issues with vm after upgrade
by daggs
Greetings,
a few weeks ago I've upgraded my system, this resulted with qemu and libvirt being upgraded to 6.0.0 and ~7.5.0 respectfully.
I have two vms running on my system, router and streamer.
the router vm works great, the streamer vm doesn't.
after the streamer vm start, the monitor screen gets black and thats it. no relevant error are found in the log, see: http://dpaste.com/ERWDEJQPC
the xml ca be found at https://dpaste.com/FQDN6NTN2
in contrast the following oneliner works: qemu-system-x86_64 \
-machine pc-q35-5.0,accel=kvm,usb=off,smm=on,dump-guest-core=off \
-cpu host,migratable=on \
-m 15360 \
-smp 4,sockets=1,dies=1,cores=2,threads=2 \
-drive file=/home/streamer/streamer.img.qcow2.new,if=virtio,format=qcow2 \
-device vfio-pci,host=0000:00:02.0,romfile=/home/streamer/gpu-8086:5912-uefi.rom,multifunction=on \
-device vfio-pci,host=0000:00:1f.3,multifunction=on \
-usb \
-device usb-host,vendorid=0x046d,productid=0xc52e \
-device usb-host,vendorid=0x2548,productid=0x1002 \
-display none \
-netdev tap,id=hostnet0,ifname=virtsw-streamer,script=no,downscript=no \
-device e1000e,netdev=hostnet0,id=net0,mac=52:54:00:5a:4c:8c \
-blockdev '{"driver":"file","filename":"/usr/share/edk2-ovmf/OVMF_CODE.secboot.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/streamer-vm-q35_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}'
another issue encountered caused by this param: "-audiodev id=audio1,driver=none" which is auto added to the qemu line.
if I add the line to the above oneliner, the guest doesn't detects the pt sound card. without it it does and it works.
help on solving both issues will be appreciated.
Thanks,
Dagg
3 years, 3 months
ERROR Couldn't find hvm kernel for Ubuntu tree.
by Kaushal Shriyan
Hi,
I am running the below command to spawn Ubuntu 18.04 based Virtual Machine
using KVM based technology.
#virt-install --version
1.5.0
#
virt-install --name=snipeitassetmanagement
> --file=/linuxkvmguestosdisk/snipeitassetmanagement.img --file-size=40
> --nonsparse --vcpus=2 --ram=8096 --network=bridge:br0 --os-type=linux
> --os-variant=ubuntu18.04 --graphics none
> --location=/linuxkvmguestosdisk/var/lib/libvirt/isos/ubuntu-18.04.5-live-server-amd64.iso
> --extra-args="console=ttyS0"
>
> Starting install...
> Retrieving file .treeinfo...
>
> | 0 B 00:00:00
> Retrieving file content...
>
> | 0 B 00:00:00
> Retrieving file info...
>
> | 70 B 00:00:00
> ERROR Couldn't find hvm kernel for Ubuntu tree.
> Domain installation does not appear to have been successful.
> If it was, you can restart your domain by running:
> virsh --connect qemu:///system start snipeitassetmanagement
> otherwise, please restart your installation.
>
>
Any clue and i look forward to hearing from you. Thanks in advance.
Best Regards,
3 years, 4 months
Passthrough PCI GPU device fails on reboot
by Francesc Guasch
Hello.
I have a host with an NVIDIA RTX 3090. I configured PCI passthrough
and it works fine. We are using it for CUA and Matlab on Ubuntu 20.04.
The problem comes sometimes on rebooting the virtual machine. It doesn't
happen 100% of the times but eventually after 3 or 4 reboots the PCI
device stops working. The only solution is to reboot the host.
Weird thing is this only happens when rebooting the VM. After a host
reboot if we shutdown the virtual machine and we start it again,
it works fine. I wrote a small script that does that a hundred times
just to make sure. Only a reboot triggers the problem.
When it fails I run "nvidia-smi" in the virtual machine and I get:
No devices were found
Also I spotted some errors in syslog
NVRM: installed in this system is not supported by the
NVIDIA 460.91.03 driver release.
NVRM: GPU 0000:01:01.0: GPU has fallen off the bus
NVRM: the NVIDIA kernel module is unloaded.
NVRM: GPU 0000:01:01.0: RmInitAdapter failed! (0x23:0x65:1204)
NVRM: GPU 0000:01:01.0: rm_init_adapter failed, device minor number 0
The device is there because typing lspci I can see information:
0000:01:01.0 VGA compatible controller [0300]: NVIDIA Corporation
Device [10de:2204] (rev a1)
Subsystem: Gigabyte Technology Co., Ltd Device [1458:403b]
Kernel driver in use: nvidia
Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia
I tried different Nvidia drivers and Linux kernels in the host and
the virtual machine with the same results.
I wonder if some process is keeping hold of the PCI device but every
thing I tried failed. I made sure the virtual machines are down. Then
I start it again. I also tried restarting libvirtd.
I was thinking about a hardware problem but we 3 different GPUs
of the same model and it happens with all of them.
I know this is hard but I wonder if anyone here has any idea of
what can I do to fix this.
thank you for your time
3 years, 4 months
investigate locks on a domain
by Jiatong Shen
Hello community,
I am seeing following log in production,
2021-07-20 07:43:49.417+0000: 3918294: error :
qemuDomainObjBeginJobInternal:4945 : Timed out during operation: cannot
acquire state change lock (held by qemuProcessReconnect)
2021-07-20 07:44:19.424+0000: 3918296: warning :
qemuDomainObjBeginJobInternal:4933 : Cannot start job (modify, none) for
domain instance-0000074e; current job is (modify, none) owned by (3919429
qemuProcessReconnect, 0 <null>) for (2183193s, 0s)
2021-07-20 07:44:19.424+0000: 3918296: error :
qemuDomainObjBeginJobInternal:4945 : Timed out during operation: cannot
acquire state change lock (held by qemuProcessReconnect)
2021-07-20 07:44:49.428+0000: 3918296: warning :
qemuDomainObjBeginJobInternal:4933 : Cannot start job (query, none) for
domain instance-0000074e; current job is (modify, none) owned by (3919429
qemuProcessReconnect, 0 <null>) for (2183223s, 0s)
2021-07-20 07:44:49.428+0000: 3918296: error :
qemuDomainObjBeginJobInternal:4945 : Timed out during operation: cannot
acquire state change lock (held by qemuProcessReconnect)
2021-07-20 07:45:19.429+0000: 3918298: warning :
qemuDomainObjBeginJobInternal:4933 :
I am confused about what is qemuProcessReconnect and why it acquires a
domain state lock..
--
Best Regards,
Jiatong Shen
3 years, 5 months
Failed to terminate process 1901409 with SIGKILL: Device or resource busy
by 梁朝军
Hi All,
I hit another issue that libvirt sometimes throw exception like 'Failed to terminate process 1901409 with SIGKILL: Device or resource busy’ once we try to destroy vm through 'conn.lookupByID(id_).destroy()’.
After this issue occur, it will caused the socket fd and pipe increased and finally caused fd leak.
Who know the root cause of this issue or give some cues? Any comments are appreciated
Thanks !
3 years, 5 months
Re: how to build a github release tarball
by Andrea Bolognani
[re-adding the list]
On Thu, Jul 15, 2021 at 01:25:02PM +0800, Jiatong Shen wrote:
> On Thu, Jul 15, 2021 at 5:54 AM Jiatong Shen <yshxxsjt715(a)gmail.com> wrote:
> > thank you very much for reply. but what should I do if I want to
> > build release tarball myself (for 6.0.0..)? I would like to backport some
> > features
> > to 6.0.0..
>
> hmm. it looks like `make -j3 dist` could produce a tarball for 6.0.0.. Is
> it the right
> approach?
Yes, if your goal is to create a release archive for libvirt 6.0.0
with some patches on top[1] then the best way to go about it is to
clone the repo, branch off the v6.0.0 tag, cherry-pick the changes
you're interested in and then generate the archive using 'make
distcheck'.
[1] You could have told us this in the first place instead of asking
a more generic question for which a different answer was more
appropriate ;)
--
Andrea Bolognani / Red Hat / Virtualization
3 years, 5 months
openVswitch won't get to a virtual IP
by lejeczek
Hi guys.
Among all the mailing lists I'm subscriber of this one I
thought, would where chances to find
'openvswitch'+'libvirtd' experts to share thoughts &
suggestions should be grater.
A case:
a) all guests are KVM.
b) I have NM managed OVS bridge and libvirtd network to/on
that bridge
c) "regular" NM bridge and network off it in libvirt
problem is - guests on OVS network can _not_ ping a virtual
IP of a guest(s) on 'regular' bridge network, but.. can
ping "actual" IP of that same guest(s) okey.
any thoughts and ideas on how & what to investigate are very
appreciated.
many thanks, L.
3 years, 5 months