Open rkoster opened 7 years ago
Currently if my machine shuts down the concourse vm goes down and can not be brought back up. If there was a way to save state that would be great. Also, the same with credhub, I have lost all credentials that were entered as my machine shut down and could not figure out how to bring it back up without doing a complete bucc up
If you remove current_vm_cid
from your state.json
then bosh create-env
should go thru the motions of creating it again and moving on.
Have had limited success using the following
# savestate
vboxmanage controlvm $(bosh int state/state.json --path /current_vm_cid) savestate
# resume
vboxmanage startvm $(bosh int state/state.json --path /current_vm_cid) --type headless
Just on this, I've been saving and resuming state on my local bucc for a while now I've found that the date is out of sync when resuming, setting the time using the following works.
sudo date --set="$(date -s "$(wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f5-8)Z" +"%Y-%m-%d %H:%M:%S")"
I have the following helper commands for resuming
vboxmanage startvm $(bosh int state/state.json --path /current_vm_cid) --type headless
bucc ssh cat > cmd.sh << "EOF"
date --set="$(date -s "$(wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f5-8)Z" +"%Y-%m-%d %H:%M:%S")"
EOF
bucc ssh sudo bash cmd.sh
i'm still convinced that this should be solved in the virtualbox-cpi and not in bucc it self. we need to address this to the bosh developers
It would be nice to be able to resume a bucc deployed virtualbox vm. Currently the bosh jobs won't be able to start because they are missing their persistent disk: https://github.com/cppforlife/bosh-virtualbox-cpi-release/issues/7
below some things I have tried so far to workaround the above issue, with mixed results: