diff --git a/lib/vagrant-lxc/driver/cli.rb b/lib/vagrant-lxc/driver/cli.rb index c7fd882..7860a75 100644 --- a/lib/vagrant-lxc/driver/cli.rb +++ b/lib/vagrant-lxc/driver/cli.rb @@ -38,7 +38,7 @@ module Vagrant end def state - if @name && run(:info, '--name', @name, retryable: true) =~ /^state:[^A-Z]+([A-Z]+)$/ + if @name && run(:info, '--name', @name, retryable: true) =~ /^[Ss]tate: *[^A-Z]+([A-Z]+)$/ $1.downcase.to_sym elsif @name :unknown @@ -75,6 +75,7 @@ module Vagrant end def stop + attach '/sbin/halt' run :stop, '--name', @name end