docker-machine-driver-xhyve
docker-machine-driver-xhyve copied to clipboard
Resize existing machine
Is it possible to upgrade machine parameters after it has been created? I would like to increase memory (to 3GB) and cpu count (to 2) from the default ones.
Bumped.
@zchee @johanneswuerbach any ideas?
Ok, I've found I can just update the config.json however it does not work for increasing disk size - I've increased the .sparsebundle image using hdutil and updated disk size in the config.json but changes are not visible (df -ah still returns 20GB). I've also tried to create new docker-machine with updated size and copy the volume from previous machine but it does not work either - machine times out during start.
@johanneswuerbach do you have any idea how to increase the disk size without losing the data?
Increasing should work using hdutil, ssh into the machine and then use resize2fs http://askubuntu.com/a/109360, but I haven't tested this.
@johanneswuerbach thanks for the tip but unfortunately it does not work for me. When I ssh into the machine and run resize2fs nothing happens:
docker@boot2docker:~$ sudo resize2fs /dev/sda2
resize2fs 1.42.13 (17-May-2015)
The filesystem is already 4871711 (4k) blocks long. Nothing to do!
And df -a still displays the old size.
Ok I figured that out, here is instruction step by step:
- Go to
~/.docker/machine/machines/machine_name sudo hdiutil resize -size new_size root-volume.sparsebundle(i.e. new size can be30g)- Edit
config.jsonand provide new size inDriver.DiskSizeproperty - SSH to the machine
sudo fdisk /dev/sdathen:d2np2- enter
- enter
w
- Restart the machine
- SSH to the machine again
tce-load -wi e2fsprogs.tcz(to downloadresize2fs)sudo resize2fs /dev/sda2