Skip to content

Enable running minikube on Silverblue #379

Closed

Description

@dotellie

I'm not super knowledgeable in podman or libvirt so this issue might be a bit wish-washy while I try to express my wishes somewhat concretely. 😅

For some background, while I don't feel comfortable moving to silverblue yet, I wanted to try moving as much as possible of my environment in my new Fedora installation to be in containers. Now I'm at the point where I want to start a Kubernetes cluster and the only realistic option for me is minikube with KVM.

The problem I'm having is that minikube fails inside a toolbox because it can't find the file containing the IP of the VM which is understandable since no libvirt folders are mounted to the container. Here is the error from minikube:

💣  Unable to start VM. Please investigate and run 'minikube delete' if possible: post-start: command runner: ssh client: Error creating new ssh host from driver: Error getting ssh host name for driver: getting IP: reading status file: open /var/lib/libvirt/dnsmasq/virbr1.status: no such file or directory

Would this be possible to fix in toolbox or should I just revert to installing everything on the host?

Activity

  1. martymichal commented on Mar 13, 2020

    @martymichal
    Member

    Hello @dotellie! I never used Kubernetes or libvirt before so I'm just guessing now. Toolbox now bind mounts almost all folders in root inside of a new container (specifically /etc, /dev, /run, /tmp, /usr, /var). They are mounted in /run/host. So you can try inside of a container to do something like this: mount /run/host/var/lib/libvirt /var/lib/libvirt.

  2. debarshiray commented on May 18, 2020

    @debarshiray
    Member

    If you created the toolbox container with Toolbox 0.0.14 or later, then /run/libvirt from the host is bind mounted inside the container at the same location.

    It might be that you are missing /var/lib/libvirt. As @HarryMichal pointed, you can still try to bind mount it yourself and see if that gets you further along the road.

  3. debarshiray commented on May 20, 2020

    @debarshiray
    Member

    I learnt from the libvirt developers that this error message comes from libvirtd:

    open /var/lib/libvirt/dnsmasq/virbr1.status: no such file or directory
    

    Are you trying to run libvirtd inside the container? Or are you running it on the host?

  4. dhodyn commented on May 26, 2020

    @dhodyn

    Faced the same issue and resolved it with the steps,

    To run minikube inside on silverblue inside the toolbox,

    First ensure that the libvirtd is install and running on the host system. You will have to layer the virtualization packages

    https://docs.fedoraproject.org/en-US/quick-docs/getting-started-with-virtualization/

    rpm-ostree install virt-install libvirt-daemon-config-network libvirt-daemon-kvm qemu-kvm virt-manager virt-viewer
    

    After restart disable polkit and ensure that the service libvirtd is running

    sudo vi /etc/polkit-1/rules.d/80-libvirt-manage.rules
    
    polkit.addRule(function(action, subject) {
      if (action.id == "org.libvirt.unix.manage" && subject.local && subject.active && subject.isInGroup("wheel")) {
          return polkit.Result.YES;
      }
    });
    
    systemctl enable --now libvrtd
    

    Then inside the toolbox install the virtualization group and bind mount the host libvirtd,

    dnf install @virtualization
    
    sudo mount --bind /run/host/var/lib/libvirt /var/lib/libvirt
    

    After this minikube should work

  5. debarshiray commented on Aug 28, 2020

    @debarshiray
    Member

    Thanks for the detailed comment, @dhodyn !

    Toolbox already bind mounts /run/libvirt from the host. Back then, that was enough to boot a Fedora live ISO in virt-manager.

    Do we also need /var/lib/libvirt? If so, we could do that.

  6. debarshiray commented on Aug 30, 2020

    @debarshiray
    Member

    Does #548 help?

  7. added this to the Release 0.1.0 milestone on Sep 10, 2020
  8. added
    1. Bug
    1. Feature request
    and removed
    1. Bug
    on Sep 10, 2020
  9. debarshiray commented on Oct 1, 2020

    @debarshiray
    Member
  10. changed the title [-]Controlling libvirt from a container[/-] [+]Enable running minikube on Silverblue[/+] on Oct 21, 2020
  11. debarshiray commented on Oct 21, 2020

    @debarshiray
    Member

    I am going to close this now. Please let us know if this lets you run minikube now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    1. Feature request

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions