Comments (7)
You can find the disk image in your machine storage path (default: ~/.docker/machine/machines
)
The disk image is a OS X virtual sparsebundle disk, which sadly is not compactable today for filesystems different from HFS+ :-(
from docker-machine-driver-xhyve.
@johanneswuerbach actually I've found a command to compact disk image - sudo hdiutil compact root-volume.sparsebundle -batteryallowed
however it does not reclaim any size back.
from docker-machine-driver-xhyve.
@zchee @johanneswuerbach any idea why sudo hdiutil compact root-volume.sparsebundle -batteryallowed
didn't work? Are there any others (even hackable) ways to reclaim the space to the host OS?
from docker-machine-driver-xhyve.
hdiutil compact
only works when the filesystem used within the sparebundle is HFS+
, which boot2docker doesn't support (ext4 is used).
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/hdiutil.1.html
There are ideas how to solve that machyve/xhyve#82, but nothing concrete so far.
from docker-machine-driver-xhyve.
@johanneswuerbach thanks for more information about. Do you know if it's to use other distro (i.e. Alpine linux) instead?
I'm just looking for a way to setup my dev env with docker but having a image which can not be compacted on SSD is a deal breaker. Basically when I create a new machine it uses around 1GB for root image. After playing with docker (downloading / building images), sparsebundle
size goes to ~18GB, even tough df -h
shows that only 6GB is used of that space is used. How can I be sure that after a few days it won't take another 20GB from my host, even tough it won't use it?
UPDATE: I've found that there is image size parameter for docker-machine after which it won't take more size from the host. I've tested it with basic dd
command on the boot2docker and it works fine.
UPDATE2: Ok I think no matter which Linux distro I will choose it won't use HFS+ file system for its partition. Propably the only solution that can work in the future is machyve/xhyve#82
from docker-machine-driver-xhyve.
The sparse disk support patches on my github account work. Currently you cannot shrink the images but at least they are fine grained sparse disks. (Apple uses 8MB chunks, my version uses 4KB chunks).
I am currently working on supporting qcow2 because there is already tooling for that format, but it may be a while until that works with enough performance to be usable,
from docker-machine-driver-xhyve.
My rhfs tool allows compacting sparsebundles, without necessarily using HFS+ (though it's optimized for that case):
rhfs compact --search mydisk.sparsebundle
It would probably be better to implement real support for discard in xhyve/block_if.c
, though. See BOP_DELETE.
from docker-machine-driver-xhyve.
Related Issues (20)
- Docker detection with docker-machine 0.13 HOT 1
- Error in driver during machine creation: Could not convert the UUID to MAC address HOT 2
- Can't build with qcov-format as brew now pulls incompatible Ocaml
- Do I need reinstall docker-machine-driver-xhyve for minikube after installed docker for mac ?
- Making experimental NFS share mount options configurable HOT 2
- Possibility to add more disks e.g. for distributed storage
- Installation on OSX prevents OSX to sleep because of use of nfsd
- Failure to build with Xcode 10 / macOS 10.14 Mojave HOT 3
- Error in driver during machine creation HOT 9
- Driver not able to validate newer version of Virtualbox as pre flight check. HOT 3
- Is this project dead? HOT 1
- Regression with v0.4.0 HOT 4
- Unable to run xhyve vm for docker HOT 1
- Unable to create a docker-machine with version 0.4.0 HOT 1
- Cannot remove or create dinghy VM, xhyve process in weird state HOT 1
- vbox 6 is not detected correctly
- A bug in Dockerfile
- Running docker-machine create just hangs with output ending "COM1 connected to /dev/ttys001" HOT 15
- Could not convert the UUID to MAC address HOT 3
- Project not building HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-machine-driver-xhyve.