Minikube: Virtual Machine Settings not retained in /etc/sysctl.d/ with xhyve on OS X

Created on 29 Mar 2017  路  3Comments  路  Source: kubernetes/minikube

Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG

Minikube version (use minikube version):
v0.17.1

Environment:

  • OS : OS X 10.12.4
  • VM Driver: xhyve
  • ISO version: minikube-v1.0.7.iso
  • Install tools: homebrew
  • Others:

What happened:

Modify the xhyve VM with the following command

 minikube ssh 'echo "vm.max_map_count=262144" | sudo tee -a /etc/sysctl.d/elasticsearch.conf'

ssh into the system to view the file

minikube ssh
cd /ets/sysctl.d
ls -al

The file may appear. However, after a minute, this directory seems to be wiped out.

What you expected to happen:

The setting to be retained after the ssh command, and retained on stop/start

How to reproduce it (as minimally and precisely as possible):

See above

Anything else do we need to know:

Most helpful comment

This works. Thanks for the information. For anyone else looking at this issue, I have the following command executed in my configure script.

minikube ssh 'echo "sysctl -w vm.max_map_count=262144" | sudo tee -a /var/lib/boot2docker/bootlocal.sh'

This sets the value, and is retained across VM stop/starts.

All 3 comments

/etc won't be persisted inside the VM across reboots. If you need this command run on every start/stop, you can put it in the script /var/lib/boot2docker/bootlocal.sh which will run on every VM start and is persisted.

Let me know if this fixes the issue for you

This works. Thanks for the information. For anyone else looking at this issue, I have the following command executed in my configure script.

minikube ssh 'echo "sysctl -w vm.max_map_count=262144" | sudo tee -a /var/lib/boot2docker/bootlocal.sh'

This sets the value, and is retained across VM stop/starts.

Is there a way to configure this from minikube start?

Was this page helpful?
0 / 5 - 0 ratings