Minikube: toolbox: yum install fails: At least 47MB more space needed on the / filesystem.

Created on 14 Mar 2019  路  8Comments  路  Source: kubernetes/minikube

I was trying to install additional packages into Minikube, but that seems not to work properly.
What is the preferred way to install additional tools in Minikube?

_The exact command-lines used so that we can replicate the issue:_

toolbox
yum install vim

_The full output of the command that failed:_

Error Summary

Disk Requirements:
At least 47MB more space needed on the / filesystem.

But there is enough space available!

_Which operating system version was used:_

MacOSX Mojave

There is a closed ticket on this but I'm not sure whether it was fixed or dropped:
https://github.com/kubernetes/minikube/issues/2889

If dropped, as a developer tool it would be very handy to support to install additional tools inside Minikube and re-enable such a feature. This would simplify things a lot in our development cycles.

BTW: Thanks for your great work!

Most helpful comment

I believe the root cause here is how the filesystem shows up in the toolbox jail. Looking at https://redmine.ixsystems.com/issues/3668 - it may be possible to work around this by adding this to /etc/yum.conf:

diskspacecheck=0

Do you mind checking if that does the trick for you? If so, we just have to figure out how to get the toolbox updated to always include that - or of course, fix the underlying disk size plumbing issue.

All 8 comments

I believe the root cause here is how the filesystem shows up in the toolbox jail. Looking at https://redmine.ixsystems.com/issues/3668 - it may be possible to work around this by adding this to /etc/yum.conf:

diskspacecheck=0

Do you mind checking if that does the trick for you? If so, we just have to figure out how to get the toolbox updated to always include that - or of course, fix the underlying disk size plumbing issue.

Thanks Thomas, you pointed me into the right direction!

I added this line to /etc/dnf/dnf.conf:
diskspacecheck=0

And it works fine now.
Yum seems to be deprecated.

What is the preferred way to install additional tools in Minikube?

That is a very good question, so far the answer has been Buildroot

What is the preferred way to install additional tools in Minikube?
That is a very good question, so far the answer has been Buildroot

Today I played a bit with toolbox inside Minikube and everything worked like a charm so far (except that space problem mentioned above). So, the preferred way probably could be toolbox?

We could hack this into toolbox script, after touching the os-release*. Seems it doesn't like the rootfs ?

This _should_ probably check for both fedora and rootfs, before changing the DNF (yum 4) configuration.

At least if we ever want to upstream the rootfs fix back to https://github.com/coreos/toolbox again


Side note: with the "disk" space check disabled, it will probably kill the VM if you install something big.

In minishift they "solved" this with a warning, and a: Are you sure you want to continue? [y/N]

https://github.com/minishift/minishift-centos-iso/blob/master/scripts/yum-wrapper

The better fix would be to symlink something over to the actual disk, I think they used that for /opt

Linking the entire /var/lib/toolbox seems to work fine.

$ sudo mkdir /mnt/sda1/var/lib/toolbox
$ sudo ln -s /mnt/sda1/var/lib/toolbox /var/lib/toolbox

$ toolbox
Downloading sha256:01eb078129a [===============================]   90 MB / 90 MB
successfully removed aci for image: "sha512-319c511eb1e6ad373f65e9347a0157fe4f88e6e41d836ddd181aed24301e8f69"
rm: 1 image(s) successfully removed
Spawning container docker-fedora-29 on /mnt/sda1/var/lib/toolbox/docker-fedora-29.
Press ^] three times within 1s to kill container.
[root@minikube ~]# df -h /
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        17G  2.1G   14G  14% /

Should also help the RAM situation, with toolbox installed.

$ sudo du -hs /var/lib/toolbox/docker-fedora-29
288M    /var/lib/toolbox/docker-fedora-29

Even a simple dnf check-update downloads and unpacks lots of data:

[root@minikube ~]# dnf check-update
Fedora Modular 29 - x86_64                   384 kB/s | 1.5 MB     00:03    
Fedora Modular 29 - x86_64 - Updates         526 kB/s | 2.1 MB     00:04    
Fedora 29 - x86_64 - Updates                 1.9 MB/s |  25 MB     00:13    
Fedora 29 - x86_64                           2.6 MB/s |  62 MB     00:23    
486M    /var/lib/toolbox/docker-fedora-29

So that's _another_ 200M, without even installing any extra tools in the toolbox.

I meet the problem on Macos too.

Increase Disk image size and restart Docker can fix it
image

Was this page helpful?
0 / 5 - 0 ratings