vctl-docs
vctl-docs copied to clipboard
`vctl build` can't build large projects.
I cannot build large project, it always says no space left on device
, even set --builder-mem 8192
, and I tried to enlarge it by --builder-mem 10240
, then it gave me an error:
ERROR error trying to run container vctl-builder-1499b092: failed when running container vctl-builder-1499b092: failed to start the container, please review containerd logs: error code:exit status 255, message:2020-06-12T09:16:27.150| ServiceImpl_Opener: PID 50548
Error: The operation was canceled
Seems vctl build
will put the whole volume of vctl-builder on a RAM disk?
And I can see an vctl-builder persistent storage, but seems builder doesn't use it.
And more, if builder unexpected exit while building, the vm will not stop properly, and if run vctl system stop
error message
Stop virtual machine vctl-builder-b7cce09d ...
ERROR failed to run command:/Applications/VMware Fusion.app/Contents/Public/vmrun -T fusion stop /Users/david/.vctl/.r/vms/vctl-builder-b7cce09d/vctl-builder-b7cce09d.vmx hard, err:exit status 255 module=libcrx package=vmrun
ERROR failed to stop a sandbox, err:error code:exit status 255, message:Error: The virtual machine is not powered on: /Users/david/.vctl/.r/vms/vctl-builder-b7cce09d/vctl-builder-b7cce09d.vmx module=libcrx package=sandbox
Virtual machine vctl-builder-b7cce09d is stopped
Stop virtual machine vctl-builder-b93a0c4d ...
ERROR failed to run command:/Applications/VMware Fusion.app/Contents/Public/vmrun -T fusion stop /Users/david/.vctl/.r/vms/vctl-builder-b93a0c4d/vctl-builder-b93a0c4d.vmx hard, err:exit status 255 module=libcrx package=vmrun
ERROR failed to stop a sandbox, err:error code:exit status 255, message:Error: The virtual machine is not powered on: /Users/david/.vctl/.r/vms/vctl-builder-b93a0c4d/vctl-builder-b93a0c4d.vmx module=libcrx package=sandbox
Virtual machine vctl-builder-b93a0c4d is stopped
will be given.
IIRC, the builder is put into memory for performance reasons.
How large is your project?
@mikeroySoft Actually I am writing a compiler with LLVM, LLVM is big you know.
@david9991 Is the base image public so we can have a try ourselves? Or is there similar public image we can access?
vctl does have some config to use the on-disk storage instead of ram, but that may introduce even worse performance impact. So before we try that approach, I'd like to get a hand on the base image and see if there is anything we can take in the ram approach.
@wswfc Sorry I can't give you the base Image, but https://hub.docker.com/r/nwtgck/llvm-clang/tags maybe you can try. It has 9.17G compressed size.
EDIT: For cleaning up the aborted build as described in https://github.com/VMwareFusion/vctl-docs/issues/22#issuecomment-643042938
vctl system stop
then delete the following folders manually /Users/<user>/.vctl/.r/containers/<id> /Users/<user>/.vctl/.r/sandboxes/<id>
@wswfc I understand that vctl uses a RAM disk for performance reasons and that we can increase this value by specifying --builder-mem
which defaults to "4g". My build also requires more space (10g). Is there a way to set the default using the ~/.vctl/config.toml
file? Is there a reference for the config? I couldn't find anything in the docs.