"qemu-kvm.service" should be removed upon uninstall

Bug #1613451 reported by Wise Melon
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu GNOME
New
Undecided
Unassigned
qemu-kvm (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I recently uninstalled qemu along with qemu-kvm recently but found that qemu-kvm.service was still running at startup, though giving errors because it couldn't find the stuff that had been uninstalled. But it still concerns me that uninstalling qemu-kvm still leaves something behind which remains active, and I used the apt-get "purge" option which should have really got rid of everything.

So I think that to make the uninstall more complete and clean that the service should also be removed. I am running Ubuntu GNOME 16.04 with GNOME 3.20. I hope that qemu-kvm does not leave anything else behind after its removal.

Tags: xenial
Revision history for this message
Robie Basak (racb) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

I cannot reproduce this on Xenial. In a KVM, I did "sudo apt install qemu" which provided /etc/init.d/qemu-kvm and "systemctl status qemu-kvm" reported this as started. This was provided by the qemu-system-common package. Then I did "sudo apt purge qemu-system-common". This worked, /etc/init.d/qemu-kvm is gone, and "systemctl status qemu-kvm" reports that the service is gone.

Since there does not seem to be a bug here, I'm marking this as Invalid.

If you still believe that this is really a bug, then you may find it helpful to read "How to report bugs effectively" http://www.chiark.greenend.org.uk/~sgtatham/bugs.html. We'd be grateful if you would then provide a more complete description of the problem, provide steps to reproduce, explain why you believe this is a bug in Ubuntu, and then change the bug status back to New.

Changed in qemu-kvm (Ubuntu):
status: New → Invalid
Revision history for this message
Wise Melon (wise-melon-deactivatedaccount) wrote :
Download full text (5.1 KiB)

Look, I just did:

    sudo apt-get install qemu qemu-kvm virt-manager

To install it, then when I wanted to uninstall it I ran:

    sudo apt-get purge qemu qemu-kvm virt-manager
    sudo apt-get autoremove

And it seemed to work however after restarting my machine I found that the qemu-kvm.service was still active at startup:

● qemu-kvm.service - LSB: QEMU KVM module loading script
   Loaded: loaded (/etc/init.d/qemu-kvm; bad; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2016-08-14 13:19:28 BST; 33min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 2099 ExecStart=/etc/init.d/qemu-kvm start (code=exited, status=5)

Aug 14 13:19:28 <Computer-Name> systemd[1]: Starting LSB: QEMU KVM module loading script...
Aug 14 13:19:28 <Computer-Name> systemd[1]: qemu-kvm.service: Control process exited, code=exited status=5
Aug 14 13:19:28 <Computer-Name> systemd[1]: Failed to start LSB: QEMU KVM module loading script.
Aug 14 13:19:28 <Computer-Name> systemd[1]: qemu-kvm.service: Unit entered failed state.
Aug 14 13:19:28 <Computer-Name> systemd[1]: qemu-kvm.service: Failed with result 'exit-code'.

Aug 14 13:19:23 <Computer-Name> ureadahead[866]: ureadahead:/lib/udev/rules.d/60-qemu-system-common.rules: No such file or directory
Aug 14 13:19:24 <Computer-Name> ureadahead[866]: ureadahead:/usr/bin/qemu-system-alpha: No such file or directory
Aug 14 13:19:24 <Computer-Name> ureadahead[866]: ureadahead:/usr/lib/x86_64-linux-gnu/qemu/block-curl.so: No such file or directory
Aug 14 13:19:24 <Computer-Name> ureadahead[866]: ureadahead:/usr/bin/qemu-system-arm: No such file or directory
Aug 14 13:19:24 <Computer-Name> ureadahead[866]: ureadahead:/usr/lib/x86_64-linux-gnu/qemu/block-iscsi.so: No such file or directory
Aug 14 13:19:24 <Computer-Name> ureadahead[866]: ureadahead:/usr/lib/x86_64-linux-gnu/qemu/block-dmg.so: No such file or directory
Aug 14 13:19:24 <Computer-Name> ureadahead[866]: ureadahead:/usr/lib/x86_64-linux-gnu/qemu/block-rbd.so: No such file or directory
Aug 14 13:19:24 <Computer-Name> ureadahead[866]: ureadahead:/usr/bin/qemu-system-aarch64: No such file or directory
Aug 14 13:19:24 <Computer-Name> ureadahead[866]: ureadahead:/usr/bin/qemu-system-cris: No such file or directory
Aug 14 13:19:24 <Computer-Name> ureadahead[866]: ureadahead:/usr/bin/qemu-system-i386: No such file or directory
Aug 14 13:19:24 <Computer-Name> ureadahead[866]: ureadahead:/usr/bin/qemu-system-lm32: No such file or directory
Aug 14 13:19:24 <Computer-Name> ureadahead[866]: ureadahead:/usr/bin/qemu-system-m68k: No such file or directory
Aug 14 13:19:24 <Computer-Name> ureadahead[866]: ureadahead:/usr/bin/qemu-system-microblaze: No such file or directory
Aug 14 13:19:24 <Computer-Name> ureadahead[866]: ureadahead:/usr/bin/qemu-system-microblazeel: No such file or directory
Aug 14 13:19:24 <Computer-Name> ureadahead[866]: ureadahead:/usr/bin/qemu-system-x86_64: No such file or directory
Aug 14 13:19:24 <Computer-Name> ureadahead[866]: ureadahead:/usr/bin/qemu-system-ppc64: No such file or directory
Aug 14 13:19:24 <Computer-Name> ureadahead[866]: ureadahead:/usr/bin/qemu-system-ppcemb: No such file or directory
Aug 14 13:19:24 <Compu...

Read more...

Revision history for this message
Wise Melon (wise-melon-deactivatedaccount) wrote :

Running "service --status-all | grep qemu" also revealed:

     [ - ] qemu-kvm

Revision history for this message
Wise Melon (wise-melon-deactivatedaccount) wrote :

I would have expected it to be removed when I purged all that I had selected to install.

Changed in qemu-kvm (Ubuntu):
status: Invalid → New
Revision history for this message
Robie Basak (racb) wrote : Re: [Bug 1613451] Re: "qemu-kvm.service" should be removed upon uninstall

On Tue, Aug 16, 2016 at 01:56:11PM -0000, Nikita Yerenkov-Scott wrote:
> sudo apt-get autoremove

I think you want "sudo apt-get --purge autoremove" here to get the
behaviour you want.

I'm sorry apt is more complicated than you think, but this is how it
works. The behaviour you're seeing is by design.

Again, I'm setting this bug to Invalid as I don't see any bug here. If
you still disagree, go ahead and explain, and then change the bug status
back to New.

Changed in qemu-kvm (Ubuntu):
status: New → Invalid
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.