[Ubuntu 18.04] [Libvirt] virsh qemu-attach fails to add qemu process with libvirt

Bug #1752797 reported by bugproxy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
The Ubuntu-power-systems project
Won't Fix
High
Canonical Server
libvirt (Ubuntu)
Won't Fix
Low
Canonical Server

Bug Description

virsh qemu-attach <pid of qemu> errors with "Failed to attach to pid"

---Libvirt version---

# dpkg -l | grep libvirt

ii gir1.2-libvirt-glib-1.0:ppc64el 1.0.0-1 ppc64el GObject introspection files for the libvirt-glib library
ii gir1.2-libvirt-sandbox-1.0 0.5.1+git20160404-1 ppc64el GObject introspection files for the libvirt-sandbox library
ii libvirt-bin 4.0.0-1ubuntu4 ppc64el programs for the libvirt library
ii libvirt-clients 4.0.0-1ubuntu4 ppc64el Programs for the libvirt library
ii libvirt-clients-dbgsym 4.0.0-1ubuntu4 ppc64el debug symbols for libvirt-clients
ii libvirt-daemon 4.0.0-1ubuntu4 ppc64el Virtualization daemon
ii libvirt-daemon-dbgsym 4.0.0-1ubuntu4 ppc64el debug symbols for libvirt-daemon
ii libvirt-daemon-driver-storage-gluster 4.0.0-1ubuntu4 ppc64el Virtualization daemon glusterfs storage driver
ii libvirt-daemon-driver-storage-gluster-dbgsym 4.0.0-1ubuntu4 ppc64el debug symbols for libvirt-daemon-driver-storage-gluster
ii libvirt-daemon-driver-storage-rbd 4.0.0-1ubuntu4 ppc64el Virtualization daemon RBD storage driver
ii libvirt-daemon-driver-storage-rbd-dbgsym 4.0.0-1ubuntu4 ppc64el debug symbols for libvirt-daemon-driver-storage-rbd
ii libvirt-daemon-driver-storage-sheepdog 4.0.0-1ubuntu4 ppc64el Virtualization daemon Sheedog storage driver
ii libvirt-daemon-driver-storage-sheepdog-dbgsym 4.0.0-1ubuntu4 ppc64el debug symbols for libvirt-daemon-driver-storage-sheepdog
ii libvirt-daemon-driver-storage-zfs 4.0.0-1ubuntu4 ppc64el Virtualization daemon ZFS storage driver
ii libvirt-daemon-driver-storage-zfs-dbgsym 4.0.0-1ubuntu4 ppc64el debug symbols for libvirt-daemon-driver-storage-zfs
ii libvirt-daemon-system 4.0.0-1ubuntu4 ppc64el Libvirt daemon configuration files
ii libvirt-daemon-system-dbgsym 4.0.0-1ubuntu4 ppc64el debug symbols for libvirt-daemon-system
ii libvirt-dev:ppc64el 4.0.0-1ubuntu4 ppc64el development files for the libvirt library
ii libvirt-doc 4.0.0-1ubuntu4 all documentation for the libvirt library
ii libvirt-glib-1.0-0:ppc64el 1.0.0-1 ppc64el libvirt GLib and GObject mapping library
ii libvirt-glib-1.0-0-dbgsym:ppc64el 1.0.0-1 ppc64el debug symbols for package libvirt-glib-1.0-0
ii libvirt-glib-1.0-dev:ppc64el 1.0.0-1 ppc64el Development files for the libvirt-glib library
ii libvirt-ocaml 0.6.1.4-2build1 ppc64el OCaml bindings for libvirt (runtime)
ii libvirt-ocaml-dbgsym 0.6.1.4-2build1 ppc64el debug symbols for libvirt-ocaml
ii libvirt-ocaml-dev 0.6.1.4-2build1 ppc64el OCaml bindings for libvirt (development files)
ii libvirt-sandbox-1.0-5 0.5.1+git20160404-1 ppc64el Application sandbox toolkit shared library
ii libvirt-sandbox-1.0-5-dbgsym 0.5.1+git20160404-1 ppc64el Debug symbols for libvirt-sandbox-1.0-5
ii libvirt-sandbox-1.0-dev 0.5.1+git20160404-1 ppc64el Development files for libvirt-sandbox library
ii libvirt-sanlock 4.0.0-1ubuntu4

---qemu output---

# dpkg -l | grep qemu
ii ipxe-qemu 1.0.0+git-20180124.fbe8c52d-0ubuntu2 all PXE boot firmware - ROM images for qemu
ii ipxe-qemu-256k-compat-efi-roms 1.0.0+git-20150424.a25a16d-0ubuntu2 all PXE boot firmware - Compat EFI ROM images for qemu
ii qemu-block-extra:ppc64el 1:2.11+dfsg-1ubuntu2 ppc64el extra block backend modules for qemu-system and qemu-utils
ii qemu-kvm 1:2.11+dfsg-1ubuntu2 ppc64el QEMU Full virtualization on x86 hardware
ii qemu-slof 20170724+dfsg-1ubuntu1 all Slimline Open Firmware -- QEMU PowerPC version
ii qemu-system-common 1:2.11+dfsg-1ubuntu2 ppc64el QEMU full system emulation binaries (common files)
ii qemu-system-ppc 1:2.11+dfsg-1ubuntu2 ppc64el QEMU full system emulation binaries (ppc)
ii qemu-utils 1:2.11+dfsg-1ubuntu2 ppc64el QEMU utilities

---uname output---
# uname -a Linux ltc-boston8 4.15.0-10-generic #11-Ubuntu SMP Tue Feb 13 18:21:52 UTC 2018 ppc64le ppc64le ppc64le GNU/Linux

Machine Type = Boston

---Debugger---
A debugger is not configured

---Steps to Reproduce---
 1. Start a guest with qemu command line and ensure guest comes up properly
qemu-system-ppc64 --enable-kvm --nographic -vga none -machine pseries,cap-htm=off -m 4G,slots=32,maxmem=32G -smp 16,maxcpus=32 -device virtio-blk-pci,drive=rootdisk -drive file=/home/bala/avocado-fvt-wrapper/data/avocado-vt/images/ubuntu-18.04-ppc64le.qcow2,if=none,cache=none,format=qcow2,id=rootdisk -monitor telnet:127.0.0.1:1234,server,nowait -net nic,model=virtio -net user -redir tcp:2000::22

2. Check the qemu process to get the pid,

# ps -ef | grep qemu
root 3025 1 0 Feb23 ? 00:55:32 /usr/sbin/irqbalance --foreground
root 159016 157926 97 10:55 pts/8 00:00:33 qemu-system-ppc64 --enable-kvm --nographic -vga none -machine pseries,cap-htm=off -m 4G,slots=32,maxmem=32G -smp 16,maxcpus=32 -device virtio-blk-pci,drive=rootdisk -drive file=/home/bala/avocado-fvt-wrapper/data/avocado-vt/images/ubuntu-18.04-ppc64le.qcow2,if=none,cache=none,format=qcow2,id=rootdisk -monitor telnet:127.0.0.1:1234,server,nowait -net nic,model=virtio -net user -redir tcp:2000::22
root 159100 159085 0 10:56 pts/1 00:00:00 grep --color=auto bala

3. Try to attach the qemu process with libvirt using qemu-attach command,
# virsh qemu-attach 159016
error: Failed to attach to pid 159016
error: internal error: missing index/unit/bus parameter in drive 'file=/home/bala/avocado-fvt-wrapper/data/avocado-vt/images/ubuntu-18.04-ppc64le.qcow2,if=none,cache=none,format=qcow2,id=rootdisk'

we need this patch at https://libvirt.org/git/?p=libvirt.git;a=commit;h=67a52f709a7606cb3329abae2d04eb4de5185090

bugproxy (bugproxy)
tags: added: architecture-ppc64le bugnameltc-165273 severity-high targetmilestone-inin---
Changed in ubuntu:
assignee: nobody → Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage)
affects: ubuntu → libvirt (Ubuntu)
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Thanks,
that looks good - I'll make it part of the next upload but want to group a few more changes into it, so I beg your pardon to wait a few days.

Changed in libvirt (Ubuntu):
status: New → Triaged
Frank Heimes (fheimes)
Changed in ubuntu-power-systems:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Canonical Server Team (canonical-server)
Frank Heimes (fheimes)
tags: added: triage-g
Manoj Iyer (manjo)
Changed in libvirt (Ubuntu):
assignee: Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage) → Canonical Server Team (canonical-server)
importance: Undecided → Critical
importance: Critical → High
tags: added: 4.0.0-1ubuntu5
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Looking more in depth now I must summarize it makes no sense.
This is reported against libvirt 4.0.0-1ubuntu4 in Bionic.

But the requested patch is in:
$ git tag --contains 67a52f709a7606cb3329abae2d04eb4de5185090
oldstable
v3.10.0
v3.10.0-rc1
v3.10.0-rc2
v3.9.0
v3.9.0-rc1
v3.9.0-rc2
v4.0.0
v4.0.0-rc1
v4.0.0-rc2
v4.1.0
v4.1.0-rc1
v4.1.0-rc2

There also were no related changes to the arg parsing recently that would be missing.
So would you please reconsider the patch you ask to be applied?

Changed in libvirt (Ubuntu):
status: Triaged → Incomplete
Changed in ubuntu-power-systems:
status: Triaged → Incomplete
tags: removed: 4.0.0-1ubuntu5
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2018-03-20 01:55 EDT-------
The patch is for parsing the memory parameters. The current failure is for the drive parameters.

Changed in libvirt (Ubuntu):
importance: High → Low
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2018-05-02 05:57 EDT-------
Bala, As pointed out, index/unit/bus parameter in driver parameters are must for qemu-attach to work reliably.

The other commit mentioned in the bug is already part of the current libvirt version.

Closing this as WILL_NOT_FIX.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Following the update to set won't fix here as well

Changed in libvirt (Ubuntu):
status: Incomplete → Won't Fix
Frank Heimes (fheimes)
Changed in ubuntu-power-systems:
status: Incomplete → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.