builder/virtualbox: detect vboxdrv issues [GH-488]
This commit is contained in:
parent
c19fcafc01
commit
8821ef4def
|
@ -4,6 +4,7 @@ BUG FIXES:
|
|||
|
||||
* builder/all: timeout waiting for SSH connection is a failure. [GH-491]
|
||||
* builder/virtualbox: error if VirtualBox version cant be detected. [GH-488]
|
||||
* builder/virtualbox: detect if vboxdrv isn't properly setup. [GH-488]
|
||||
|
||||
## 0.3.9 (October 2, 2013)
|
||||
|
||||
|
|
|
@ -136,6 +136,13 @@ func (d *VBox42Driver) Version() (string, error) {
|
|||
versionOutput := strings.TrimSpace(stdout.String())
|
||||
log.Printf("VBoxManage --version output: %s", versionOutput)
|
||||
|
||||
// If the "--version" output contains vboxdrv, then this is indicative
|
||||
// of problems with the VirtualBox setup and we shouldn't really continue,
|
||||
// whether or not we can read the version.
|
||||
if strings.Contains(versionOutput, "vboxdrv") {
|
||||
return "", fmt.Errorf("VirtualBox is not properly setup: %s", versionOutput)
|
||||
}
|
||||
|
||||
versionRe := regexp.MustCompile("[^.0-9]")
|
||||
matches := versionRe.Split(versionOutput, 2)
|
||||
if len(matches) == 0 || matches[0] == "" {
|
||||
|
|
Loading…
Reference in New Issue