[go: nahoru, domu]

Skip to content
This repository has been archived by the owner on Jan 1, 2021. It is now read-only.

Impossible to pause, stop, restart or get status of boot2docker-vm #133

Open
hackdna opened this issue Feb 6, 2014 · 9 comments
Open

Impossible to pause, stop, restart or get status of boot2docker-vm #133

hackdna opened this issue Feb 6, 2014 · 9 comments
Labels

Comments

@hackdna
Copy link
hackdna commented Feb 6, 2014

OS X 10.6.8
boot2docker: 0.5.2

$ ./boot2docker up
[2014-02-05 21:51:06] Starting boot2docker-vm...
[2014-02-05 21:51:39] Started.
$ ./boot2docker status
[2014-02-05 21:51:55] boot2docker-vm does not exist.
$ ./boot2docker info | grep "State:"
State:           running (since 2014-02-06T02:51:07.013000000)
$ ./boot2docker pause
[2014-02-05 21:54:44] boot2docker-vm is not running.
$ ./boot2docker stop
[2014-02-05 21:52:12] boot2docker-vm is not running.
$ ./boot2docker restart
[2014-02-05 21:56:07] Starting boot2docker-vm...
[2014-02-05 21:56:07] Started.
$ VBoxManage: error: The machine 'boot2docker-vm' is already locked by a session (or being locked or unlocked)
VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component Machine, interface IMachine, callee nsISupports
VBoxManage: error: Context: "LaunchVMProcess(a->session, sessionType.raw(), env.raw(), progress.asOutParam())" at line 580 of file VBoxManageMisc.cpp
@steeve
Copy link
Contributor
steeve commented Feb 6, 2014

Which version of VirtualBox are you running ?

@hackdna
Copy link
Author
hackdna commented Feb 6, 2014
$ VBoxHeadless --version
Oracle VM VirtualBox Headless Interface 4.2.16
(C) 2008-2013 Oracle Corporation
All rights reserved.

4.2.16r86992

@aheissenberger
Copy link
Contributor

which version of grep?

@aheissenberger
Copy link
Contributor

can you try:
$ ./boot2docker info | grep 'State:[[:space:]]+running'; echo $?
and
$ ./boot2docker info | grep "State:\s+running"; echo $?

@hackdna
Copy link
Author
hackdna commented Feb 7, 2014

$ ./boot2docker info | grep 'State:[[:space:]]+running'; echo $?
1
$ ./boot2docker info | grep "State:\s+running"; echo $?
1
$ grep --version
grep (GNU grep) 2.5.1

@SvenDowideit
Copy link
Contributor

@hackdna can you paste the output of ./boot2docker info | grep State please - I had something like this where there was a different state than we coded, but I thought I fixed that in 0.5

@aheissenberger
Copy link
Contributor

The problem here is gnu grep 2.5.x - there is a known bug with spaces:
http://stackoverflow.com/questions/4233159/grep-regex-whitespace-behavior

you should update your system or replace your grep with a newer version from Homebrew

@SvenDowideit
Copy link
Contributor

@hackdna

can you please confirm that

$ ./boot2docker info | grep "State:\s*+running"; echo $?

works (added a * as per the stackoverflow link) - then we can change our script to cope with that little buglette

@hackdna
Copy link
Author
hackdna commented Feb 9, 2014
$ ./boot2docker start
[2014-02-09 17:02:58] Starting boot2docker-vm...
[2014-02-09 17:03:32] Started.
$ ./boot2docker info | grep "State:\s*+running"; echo $?
1

on the other hand:

$ ./boot2docker info | grep "State:" | grep "running"; echo $?
State:           running (since 2014-02-09T22:02:58.907000000)
0
$ ./boot2docker info | grep -E 'State:[[:space:]]+running'; echo $?
State:           running (since 2014-02-09T22:02:58.907000000)
0
$ ./boot2docker info | grep "State: *running"; echo $?
State:           running (since 2014-02-09T22:42:05.352000000)
0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants