BOSH is a project that unifies release engineering, deployment, and lifecycle management of small and large-scale cloud software.

Check your environment:

$ bosh env

Set your deployment environment:

$ export BOSH_DEPLOYMENT=foo

if have multiple deployments in same dir better to use -d <deployment-name> since many commands are bound to this variable.

To recreate your environment (virtualbox), remove the line that start with current_manifest from the file state.json:

$ sed -i "" '/current_manifest_sha/d' state.json

Deploy your manifest:

$ bosh deploy deployments/foo.yml

Check your instances:

$ bosh instances

To check processes within instances:

$ bosh instances --ps

this is the output of monit summary

To ssh into the instance of your deployment:

$ bosh ssh

If you have multiple instances:

$ bosh ssh worker/C17C59B3-FE07-4BAE-BD51-398010295BAD

To login without the uuid:

$ bosh ssh worker/0

Show all your deployments:

$ bosh deployments

Follow logs via ssh:

$ bosh logs -f

Get logs only for a specifying job (/var/vcap/jobs/<job name>):

$ bosh logs -f --job foo

Within an instance:

# tail -f /var/vcap/sys/log/{*.log,*/*.log}

View a BOSH director's Cloud Config:

$ bosh cloud-config

Update params in default config:

$ bosh cloud-config > cloud.yml

Do you changes and then update the config:

$ bosh update-cloud-config cloud.yml

Update the running manifest:

$ bosh -d <your-deployment> manifest > manifest.yml

Do your changes and then re-deploy:

$ bosh -d <your-deployment> deploy manifest.yml

List available stemcells:

$ bosh stemcells

Get recent tasks

$ bosh tasks --recent

Debug output for a task:

$ bosh task <id> --debug


To add more cpu, memory to the VM within virtualbox, edit virtualbox/cpi.yml:

-    cpus: 2
-    memory: 4096
-    ephemeral_disk: 16_384
+    cpus: 6
+    memory: 16_384
+    ephemeral_disk: 51_200

To suspend (prevent bosh not starting when rebooting):


VBoxManage controlvm $(jq -r '.current_vm_cid' state.json) savestate

To start:


VBoxManage startvm $(jq -r '.current_vm_cid' state.json) --type headless

🔗Delete every orphaned disk

bosh disks --orphaned | awk 'NR>0 {print $1}' |  xargs -L1 bosh delete-disk -n
# or
bosh disks --orphaned | awk '$1 ~ /^disk-/ {print $1}' | xargs -L1 bosh delete-disk -n

To clean all including orphaned disks:

bosh clean-up --all