Mitchell Hashimoto 44b4b9dfef Move drivers to the VirtualBox plugin. Use Machine class.
This starts the transition of replacing VM with Machine. Machine still
isn't ready to fully replace VM but by moving it now, I'm able to find
the spots that need to be fixed. At this point `vagrant status` works
with the new provider interface.
2012-07-24 21:32:38 -07:00

20 lines
487 B
Ruby

module VagrantPlugins
module ProviderVirtualBox
class Provider < Vagrant.plugin("1", :provider)
def initialize(machine)
@machine = machine
@driver = Driver::Meta.new(@machine.id)
end
# Return the state of VirtualBox virtual machine by actually
# querying VBoxManage.
def state
return :not_created if !@driver.uuid
state = @driver.read_state
return :unknown if !state
state
end
end
end
end