From 9053ee24c79b38e757652484197678ee76117de7 Mon Sep 17 00:00:00 2001 From: Nathan LeClaire Date: Tue, 7 Jul 2015 14:36:21 -0700 Subject: [PATCH] Fix choke when starting from Saved state Signed-off-by: Nathan LeClaire --- drivers/virtualbox/virtualbox.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/virtualbox/virtualbox.go b/drivers/virtualbox/virtualbox.go index 0b12303c1a..bd8baaa864 100644 --- a/drivers/virtualbox/virtualbox.go +++ b/drivers/virtualbox/virtualbox.go @@ -388,9 +388,11 @@ func (d *Driver) Start() error { return err } - // check network to re-create if needed - if err := d.setupHostOnlyNetwork(d.MachineName); err != nil { - return err + if s == state.Stopped { + // check network to re-create if needed + if err := d.setupHostOnlyNetwork(d.MachineName); err != nil { + return fmt.Errorf("Error setting up host only network on machine start: %s", err) + } } switch s {