Skip to content
This repository has been archived by the owner on Feb 27, 2018. It is now read-only.

Starting from saved state skips setUpShares #293

Merged
merged 1 commit into from
Oct 22, 2014

Conversation

lalyos
Copy link
Contributor

@lalyos lalyos commented Oct 16, 2014

When trying to start from saved state, virtualbox.setUpShares() fails while running:

VBoxManage guestproperty set boot2docker-vm /VirtualBox/GuestAdd/SharedFolders/MountPrefix /

The error message gives a hint: VBoxManage: error: The machine is not mutable (state is Saved)

Fixes #292

@@ -195,7 +195,9 @@ func (m *Machine) Start() error {
switch m.State {
case driver.Paused:
return vbm("controlvm", m.Name, "resume")
case driver.Poweroff, driver.Saved, driver.Aborted:
case driver.Saved:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this be simpler if you moved it down above the existing startvm line and used fallthrough in the Poweroff/Aborted block? (http://golang.org/ref/spec#Fallthrough_statements)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right, fixed with fallthrough

@lalyos lalyos force-pushed the start-from-saves-state branch from 0d318c9 to 5d389e8 Compare October 16, 2014 20:38
@lalyos
Copy link
Contributor Author

lalyos commented Oct 17, 2014

For a reference, until it gets merged a workaround is:

VBoxManage startvm --type headless boot2docker-vm

@SvenDowideit
Copy link
Contributor

LGTM (untested)

@tianon
Copy link
Contributor

tianon commented Oct 22, 2014

LGTM

tianon added a commit that referenced this pull request Oct 22, 2014
Starting from saved state skips setUpShares
@tianon tianon merged commit 4973f89 into boot2docker:master Oct 22, 2014
SvenDowideit pushed a commit to SvenDowideit/boot2docker-cli that referenced this pull request Nov 10, 2014
…n-script-from-init

Fix/call opt shutdown script from init
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

virtualbox vm can't start from saved state
3 participants