Skip to content

Instantly share code, notes, and snippets.

@urbantrout
Last active March 22, 2019 15:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save urbantrout/85a44ba3f14ed3dccd47fb290522e5ef to your computer and use it in GitHub Desktop.
Save urbantrout/85a44ba3f14ed3dccd47fb290522e5ef to your computer and use it in GitHub Desktop.
Resize docker machine

Thanks to machine-drivers/docker-machine-driver-xhyve#123 (comment)

  1. Go to ~/.docker/machine/machines/machine_name
  2. sudo hdiutil resize -size new_size root-volume.sparsebundle (i.e. new size can be 30g)
  3. Edit config.json and provide new size in Driver.DiskSize property
  4. SSH to the machine
  5. sudo fdisk /dev/sda then:
    • d
    • 2
    • n
    • p
    • 2
    • enter
    • enter
    • w
  6. Restart the machine
  7. SSH to the machine again
  8. tce-load -wi e2fsprogs.tcz (to download resize2fs)
  9. sudo resize2fs /dev/sda2cz (to download resize2fs)
  10. sudo resize2fs /dev/sda2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment