I wanted to stay as close as possible to the guest I already have (copy
files, adapt definition, start in session context).
Steps to get from system setup above to a session setup:
$ virsh shutdown n-lp-2138902
$ cp -v /var/lib/uvtool/libvirt/images/*.qcow /home/ubuntu/
$ chown ubuntu:ubuntu /home/ubuntu/*.qcow
$ virsh -c qemu:///system dumpxml n-lp-2138902 > /home/ubuntu/vm_definition.xml
$ chmod ubuntu:ubuntu /home/ubuntu/vm_definition.xml
$ sudo usermod -aG kvm ubuntu
$ sudo usermod -aG libvirt ubuntu
# Since it uses in qcow pointer to base - hand over access to user as well
$ chown ubuntu:ubuntu
/var/lib/uvtool/libvirt/images/x-uvt-b64-Y29tLnVidW50dS5jbG91ZC5kYWlseTpzZXJ2ZXI6MjQuMDQ6YW1kNjQgMjAyNjAxMDg=
# reboot, log in as ubuntu
# Edit the vm_definition
#- change file paths
# - drop network (not needed)
# - drop identifiers like uuid's and Mac adresses
$ virsh -c qemu:///session define vm_definition.xml
$ virsh -c qemu:///session start n-lp-2138902
And then there I can confirm:
ubuntu@n-testvm:~$ virt-xml -c qemu:///session n-lp-2138902 --update
--add-device --filesystem
type=mount,accessmode=passthrough,driver.type=virtiofs,source.dir=/mnt,target.dir=mnt
ERROR Error attempting device hotplug: End of file while reading data:
Input/output error
And in journal:
Feb 04 09:57:24 n-testvm systemd[1050]: launchpadlib-cache-clean.service -
Clean up old files in the Launchpadlib cache was skipped because of an unmet
condition check
(ConditionPathExists=/root/.launchpadlib/api.launchpad.net/cache).
Feb 04 09:57:24 n-testvm systemd[1]: Starting update-notifier-download.service
- Download data for packages that failed at package install time...
Feb 04 09:57:25 n-testvm systemd[1]: update-notifier-download.service:
Deactivated successfully.
Feb 04 09:57:25 n-testvm systemd[1]: Finished update-notifier-download.service
- Download data for packages that failed at package install time.
Feb 04 09:57:36 n-testvm kernel: Lockdown: systemd-logind: hibernation is
restricted; see man kernel_lockdown.7
Feb 04 09:57:36 n-testvm kernel: Lockdown: systemd-logind: hibernation is
restricted; see man kernel_lockdown.7
Feb 04 09:57:36 n-testvm kernel: Lockdown: systemd-logind: hibernation is
restricted; see man kernel_lockdown.7
Feb 04 09:57:36 n-testvm kernel: rpc-libvirtd[1203]: segfault at 188 ip
00007bba8bad8973 sp 00007bba87bfe660 error 4 in
libvirt.so.0.10000.0[7bba8ba9f000+2cb000] likely on CPU 0 (core 0, socket 0)
Feb 04 09:57:36 n-testvm kernel: Code: 0f 1f 80 00 00 00 00 f3 0f 1e fa e9 77
ff ff ff 0f 1f 80 00 00 00 00 55 48 89 e5 41 55 41 89 d5 41 54 41 89 f4 53 48
83 ec 08 <48> 8b 9f 88 01 00 00 48 85 db 48 0f 44 df 48 8b 03 48 85 c0 74 0d
Using that in the session context is indeed what pushes it over the cliff.
And due to being the way less common way to use it that was likely undetected
ever since.
=> Confirmed
** Changed in: libvirt (Ubuntu)
Status: Incomplete => Confirmed
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2138902
Title:
session libvirtd crashes when hot adding filesystems
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/2138902/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs