uvt-simplestreams-libvirt purge by mistake now have two zombies

Asked by Neyder

Hi,It was my mistake to run:

uvt-simplestreams-libvirt purge

because two VM's where running and now i have those two that can't be destroyed with

uvt-kvm destroy

like this:

~$ uvt-kvm destroy test
Traceback (most recent call last):
  File "/usr/bin/uvt-kvm", line 35, in <module>
    uvtool.libvirt.kvm.main_cli_wrapper(sys.argv[1:])
  File "/usr/lib/python2.7/dist-packages/uvtool/libvirt/kvm.py", line 729, in main_cli_wrapper
    libvirt_message
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 13: ordinal not in range(128)

I can create new VM's with uvt-kvm create, but can't user VirtualBox or other VM software.

Please help.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu uvtool Edit question
Assignee:
No assignee Edit question
Solved by:
Neyder
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

What is the output of:

lsb_release -a; uname -a; apt-cache policy uvtool

Thanks

Revision history for this message
Neyder (neyder) said :
#2

~$ lsb_release -a; uname -a; apt-cache policy uvtool
LSB Version: core-9.20160110ubuntu0.2-amd64:core-9.20160110ubuntu0.2-noarch:printing-9.20160110ubuntu0.2-amd64:printing-9.20160110ubuntu0.2-noarch:security-9.20160110ubuntu0.2-amd64:security-9.20160110ubuntu0.2-noarch
Distributor ID: Ubuntu
Description: Ubuntu 16.04.4 LTS
Release: 16.04
Codename: xenial
Linux cande 4.13.0-37-generic #42~16.04.1-Ubuntu SMP Wed Mar 7 16:03:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
uvtool:
  Instalados: 0~bzr99-0ubuntu1
  Candidato: 0~bzr99-0ubuntu1
  Tabla de versión:
 *** 0~bzr99-0ubuntu1 500
        500 http://pe.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        500 http://pe.archive.ubuntu.com/ubuntu xenial/universe i386 Packages
        100 /var/lib/dpkg/status

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

what is the parent PID of the zombies, if you kill that then they will die

Revision history for this message
Neyder (neyder) said :
#4

sorry for late response.

There are no zombie PIDs, i mean i cant destroy them, thats why call them zombies.

Revision history for this message
Neyder (neyder) said :
#5

Ok, after many try and error i fixed it.

When you run

```
~$ uvt-simplestreams-libvirt purge
```

and you haven't read ```man uvt-simplestreams-libvirt``` and you have some VMS created with uvt-kvm, you run into a problem, because you just deleted (purge) all your disk images for any VM created with uvt-kvm, as there is no qcow images, uvt-kvm can't destroy your images, so kvm device will be busy forever, so you can't use any other hypervisor than qemu/hvm/libvirt .

so I created a new VM:

```
~$ uvt-simplestreams-libvirt sync release=xenial arch=amd64
~$ uvt-kvm create chuls
```

so i have image files

```
~$ ls /var/lib/uvtool/libvirt/images/
chuls-ds.qcow chuls.qcow x-uvt-b64-Y29tLnVidW50dS5jbG91ZDpzZXJ2ZXI6MTYuMDQ6YW1kNjQgMjAxODAzMDY=
```

I just turned off "chuls" VM, then copied chuls-ds.qcow chuls.qcow to [VM]-ds.qcow [VM].qcow , restarted just in case it will not works, you can try directly

and now i can happily destroy all VMs

```
~$ uvt-kvm destroy test
~$ uvt-kvm destroy tester
~$ uvt-kvm destroy chuls
```

no more problem with KVM device busy.

recomendation: never ever use purge, again.