Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error deleting a VM #19

Open
c3d opened this issue Aug 4, 2022 · 4 comments
Open

Error deleting a VM #19

c3d opened this issue Aug 4, 2022 · 4 comments

Comments

@c3d
Copy link

c3d commented Aug 4, 2022

Created two VMs from a fedora-rawhide image, and got the following trying to delete the second one:

% krunvm delete fedora-f37
error unmounting container fedora-working-container-1: container not known
buildah returned an error: 

There is nothing below, i.e. if there was an actual error from buildah, it is not shown.

It is possible the error message was different the first time, but unfortunately, I closed the corresponding terminal window.

@c3d
Copy link
Author

c3d commented Aug 4, 2022

The problem might be related to having multiple "fedora" VMs at the same time.

Setup of a Fedora 35 VMs, while I have a Rawhide microvm defined.

% krunvm create --name f35 fedora:35
Resolving "fedora" using unqualified-search registries (/opt/homebrew/etc/containers/registries.conf)
Trying to pull quay.io/fedora:35...
Trying to pull docker.io/library/fedora:35...
Getting image source signatures
Copying blob 623fc6c8f399 done  
Copying config 775b4cdd6b done  
Writing manifest to image destination
Storing signatures
microVM created with name: f35

% krunvm  changevm f35 -v /Users/ddd:/ddd --mem 4096 --cpus 4
f35
 CPUs: 4
 RAM (MiB): 4096
 DNS server: 1.1.1.1
 Buildah container: fedora-working-container-1
 Workdir: /root
 Mapped volumes: {"/Users/ddd": "/ddd"}
 Mapped ports: {}

The first run sort of works, but with a weird error about /var not existing:

% krunvm start f35 /bin/bash
[root@f35 ~]# dnf install -y dmesg
Fedora 35 - aarch64                             957 kB/s |  75 MB     01:19    
Fedora 35 openh264 (From Cisco) - aarch64       1.0 kB/s | 2.5 kB     00:02    
Fedora Modular 35 - aarch64                     815 kB/s | 3.2 MB     00:04    
Fedora 35 - aarch64 - Updates                   906 kB/s |  30 MB     00:33    
[Errno 2] No such file or directory: '/var/cache/dnf/metadata_lock.pid'
Failed to store expired repos cache: [Errno 2] No such file or directory: '/var'
[root@f35 ~]# exit
exit

The second run does shows an error similar to what I had with delete:

% krunvm -v start f35
error unmounting container fedora-working-container-1: container not known
buildah returned an error: 

@c3d
Copy link
Author

c3d commented Aug 4, 2022

The container indeed does not show up for buildah:

% buildah --root /Volumes/krunvm/root --runroot  /Volumes/krunvm/runroot containers
CONTAINER ID  BUILDER  IMAGE ID     IMAGE NAME                       CONTAINER NAME
35038b6e9a92     *     f8a1a9e13d62 registry.fedoraproject.org/fe... fedora-working-container
c3e1d8d70c8c     *     585393df054a docker.io/library/debian:latest  debian-working-container
e90f078efb2d     *     bad148f8963f docker.io/library/ubuntu:latest  ubuntu-working-container

@c3d
Copy link
Author

c3d commented Aug 4, 2022

Right after the first create, the container is there:

CONTAINER ID  BUILDER  IMAGE ID     IMAGE NAME                       CONTAINER NAME
35038b6e9a92     *     f8a1a9e13d62 registry.fedoraproject.org/fe... fedora-working-container
c3e1d8d70c8c     *     585393df054a docker.io/library/debian:latest  debian-working-container
e90f078efb2d     *     bad148f8963f docker.io/library/ubuntu:latest  ubuntu-working-container
d1f672d2d174     *     775b4cdd6b58 docker.io/library/fedora:35      fedora-working-container-1

@c3d
Copy link
Author

c3d commented Aug 4, 2022

This is not systematic. I tried again, this time having another window with a watch for the list of containers, trying to see when it was destroyed. I could start the VM multiple times, and I could delete it successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant