diff --git a/lib/vagrant/actions/vm/export.rb b/lib/vagrant/actions/vm/export.rb index 6dafbecd1..dac743db0 100644 --- a/lib/vagrant/actions/vm/export.rb +++ b/lib/vagrant/actions/vm/export.rb @@ -24,7 +24,7 @@ module Vagrant def export logger.info "Exporting VM to #{ovf_path} ..." - @runner.export(ovf_path) + @runner.vm.export(ovf_path, {}, true) end end end diff --git a/lib/vagrant/actions/vm/move_hard_drive.rb b/lib/vagrant/actions/vm/move_hard_drive.rb index 0d5b967d5..1a1d6738e 100644 --- a/lib/vagrant/actions/vm/move_hard_drive.rb +++ b/lib/vagrant/actions/vm/move_hard_drive.rb @@ -19,7 +19,7 @@ error # TODO won't work if the first disk is not the boot disk or even if there are multiple disks def find_hard_drive - @runner.storage_controllers.each do |sc| + @runner.vm.storage_controllers.each do |sc| sc.devices.each do |d| return d if d.image.is_a?(VirtualBox::HardDrive) end diff --git a/lib/vagrant/vm.rb b/lib/vagrant/vm.rb index 709cd4f0c..68645e232 100644 --- a/lib/vagrant/vm.rb +++ b/lib/vagrant/vm.rb @@ -42,9 +42,5 @@ module Vagrant end def powered_off?; @vm.powered_off? end - - def export(filename); @vm.export(filename, {}, true) end - - def storage_controllers; @vm.storage_controllers end end end diff --git a/test/vagrant/actions/vm/export_test.rb b/test/vagrant/actions/vm/export_test.rb index 2bbc12b83..99fa5751e 100644 --- a/test/vagrant/actions/vm/export_test.rb +++ b/test/vagrant/actions/vm/export_test.rb @@ -60,7 +60,7 @@ class ExportActionTest < Test::Unit::TestCase end should "call export on the runner with the ovf path" do - @runner.expects(:export).with(@ovf_path).once + @vm.expects(:export).with(@ovf_path, {}, true).once @action.export end end diff --git a/test/vagrant/actions/vm/move_hard_drive_test.rb b/test/vagrant/actions/vm/move_hard_drive_test.rb index 72b558bc9..71e33eeae 100644 --- a/test/vagrant/actions/vm/move_hard_drive_test.rb +++ b/test/vagrant/actions/vm/move_hard_drive_test.rb @@ -21,7 +21,7 @@ class MoveHardDriveActionTest < Test::Unit::TestCase controller = mock('controller') controller.expects(:devices).returns([hd, dvd]) - @mock_vm.expects(:storage_controllers).once.returns([controller]) + @vm.expects(:storage_controllers).once.returns([controller]) assert_equal @action.find_hard_drive, hd end