pallet / vmfest-playground

A playground to test VMFest
8 stars 4 forks source link

instance command throws a VBoxException with error type E_INVALIDARG #2

Open gertverhoog opened 11 years ago

gertverhoog commented 11 years ago

I cloned the repo and I'm following the steps, but the (instance ....) call on line 19 of play.clj returns with the following exception:

ExceptionInfo throw+: {:origin-component "", :text "", :error-code 2147942487,
:original-message "VirtualBox error:  (0x80070057)", :original-error-type :E_INVALIDARG,
:cause #<VBoxException org.virtualbox_4_1.VBoxException: VirtualBox error:  (0x80070057)>,
:type :vbox-runtime, :message "SATA device, SATA port, IDE port or IDE slot out of range, or file or UUID not found.",
:full-message "SATA device, SATA port, IDE port or IDE slot out of range, or file or UUID not found.: VirtualBox error:  (0x80070057)",
:origin-id "00000000-0000-0000-0000-000000000000"} 
vmfest.virtualbox.conditions/wrap-exception (conditions.clj:104)

Steps to reproduce:

$ lein -v
Leiningen 2.0.0-preview10 on Java 1.7.0_09 Java HotSpot(TM) 64-Bit Server VM
$ VBoxManage -v
4.2.1r80871
$ git clone https://github.com/pallet/vmfest-playground.git
Cloning into 'vmfest-playground'...
remote: Counting objects: 25, done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 25 (delta 3), reused 25 (delta 3)
Unpacking objects: 100% (25/25), done.
$ cd vmfest-playground
$ lein repl
[...]
user=>

From here on, copy and paste the commands from play.clj into the repl. Everything proceeds successfully, until line 19:

user=> (def my-machine (instance my-server "my-vmfest-vm" :debian-6.0.2.1-64bit-v0.3 :micro))
ExceptionInfo throw+: {:origin-component "", :text "", :error-code 2147942487,
:original-message "VirtualBox error:  (0x80070057)", :original-error-type :E_INVALIDARG,
:cause #<VBoxException org.virtualbox_4_1.VBoxException: VirtualBox error:  (0x80070057)>,
:type :vbox-runtime, :message "SATA device, SATA port, IDE port or IDE slot out of range, or file or UUID not found.",
:full-message "SATA device, SATA port, IDE port or IDE slot out of range, or file or UUID not found.: VirtualBox error:  (0x80070057)",
:origin-id "00000000-0000-0000-0000-000000000000"} 
vmfest.virtualbox.conditions/wrap-exception (conditions.clj:104)
gertverhoog commented 11 years ago

I should add that the logs show this:

2012-10-25 11:59:22,951 INFO v.manager Instantiating VM with image: {:os-type-id "Debian_64", :sudo-password "vmfest", :no-sudo false, :username "vmfest", :os-family :debian, :os-version "6.0.2.1", :uuid "/Users/gert/.vmfest/models/vmfest-debian-6.0.2.1-64bit-v0.3.vdi", :os-64-bit true, :password "vmfest", :description "Debian 6.0.2.1 (64bit) v0.3"} hardware: {:cpu-count 1, :network [{:host-only-interface "vboxnet0", :attachment-type :host-only} {:attachment-type :nat}], :storage [{:devices [nil nil {:device-type :dvd} nil], :name "IDE Controller", :bus :ide}], :boot-mount-point ["IDE Controller" 0], :memory-size 512}
2012-10-25 11:59:23,007 INFO v.v.virtualbox create-machine: Creating machine my-vmfest-vm in /Users/gert/.vmfest/nodes/my-vmfest-vm/my-vmfest-vm.vbox,  overwriting previous contents
2012-10-25 11:59:23,023 DEBUG v.v.machine-config Configuring network for machine my-vmfest-vm with [{:host-only-interface "vboxnet0", :attachment-type :host-only} {:attachment-type :nat}]
2012-10-25 11:59:23,034 DEBUG v.v.machine-config Configuring adapter 0 with {:host-only-interface "vboxnet0", :attachment-type :host-only}
2012-10-25 11:59:23,036 DEBUG v.v.machine-config configure-adapter: Configuring network adapter for machine 'my-vmfest-vm' slot 0 with {:host-only-interface "vboxnet0", :attachment-type :host-only}
2012-10-25 11:59:23,101 DEBUG v.v.machine-config Configuring adapter 1 with {:attachment-type :nat}
2012-10-25 11:59:23,103 DEBUG v.v.machine-config configure-adapter: Configuring network adapter for machine 'my-vmfest-vm' slot 1 with {:attachment-type :nat}
2012-10-25 11:59:23,154 DEBUG v.manager Configuring storage for {:cpu-count 1, :network [{:host-only-interface "vboxnet0", :attachment-type :host-only} {:attachment-type :nat}], :storage ({:devices [{:device-type :hard-disk, :location "/Users/gert/.vmfest/models/vmfest-debian-6.0.2.1-64bit-v0.3.vdi", :attachment-type :multi-attach} nil {:device-type :dvd} nil], :name "IDE Controller", :bus :ide}), :boot-mount-point ["IDE Controller" 0], :memory-size 512}
2012-10-25 11:59:23,230 WARN v.v.virtualbox find-medium: location /Users/gert/.vmfest/models/vmfest-debian-6.0.2.1-64bit-v0.3.vdi not found
2012-10-25 11:59:23,230 DEBUG v.manager ensure-image-is-registered: /Users/gert/.vmfest/models/vmfest-debian-6.0.2.1-64bit-v0.3.vdi not registered. Will attempt at registering if it is a hard drive
2012-10-25 11:59:23,237 DEBUG v.manager ensure-image-is-registered: hard disk /Users/gert/.vmfest/models/vmfest-debian-6.0.2.1-64bit-v0.3.vdi successfully registered.
2012-10-25 11:59:23,240 DEBUG v.v.machine-config Configuring storage for machine my-vmfest-vm: clojure.lang.LazySeq@378d3823
2012-10-25 11:59:23,240 DEBUG v.v.machine-config Configuring controller for {:devices [{:device-type :hard-disk, :location "/Users/gert/.vmfest/models/vmfest-debian-6.0.2.1-64bit-v0.3.vdi", :attachment-type :multi-attach} nil {:device-type :dvd} nil], :name "IDE Controller", :bus :ide}
2012-10-25 11:59:23,247 DEBUG v.v.machine-config configure-controller: Configuring controller for machine 'my-vmfest-vm': {:devices [{:device-type :hard-disk, :location "/Users/gert/.vmfest/models/vmfest-debian-6.0.2.1-64bit-v0.3.vdi", :attachment-type :multi-attach} nil {:device-type :dvd} nil], :name "IDE Controller", :bus :ide}
2012-10-25 11:59:23,248 DEBUG v.v.machine-config add-storage-controller: m=org.virtualbox_4_1.IMachine@60520a66 name='IDE Controller' storage-bus IDE
2012-10-25 11:59:23,255 DEBUG v.v.machine-config attach-devices: Attaching devices to my-vmfest-vm in controller IDE Controller: [{:device-type :hard-disk, :location "/Users/gert/.vmfest/models/vmfest-debian-6.0.2.1-64bit-v0.3.vdi", :attachment-type :multi-attach} nil {:device-type :dvd} nil]
2012-10-25 11:59:23,258 DEBUG v.v.machine-config attach-device: Attaching {:device-type :hard-disk, :location "/Users/gert/.vmfest/models/vmfest-debian-6.0.2.1-64bit-v0.3.vdi", :attachment-type :multi-attach} in controller IDE Controller slot 0 port 0 for machine my-vmfest-vm
2012-10-25 11:59:23,262 WARN v.v.virtualbox find-medium: location /Users/gert/.vmfest/models/vmfest-debian-6.0.2.1-64bit-v0.3.vdi not found
2012-10-25 11:59:23,304 DEBUG v.v.conditions formatting wrapped exception {:type :vbox-runtime, :original-message "VirtualBox error: Machine settings file '/Users/gert/.vmfest/nodes/my-vmfest-vm/my-vmfest-vm.vbox' already exists (0x80BB0004)", :origin-id "22781af3-1c96-4126-9edf-67a020e0e858", :origin-component "Machine", :error-code 2159738884, :original-error-type :VBOX_E_FILE_ERROR, :text "Machine settings file '/Users/gert/.vmfest/nodes/my-vmfest-vm/my-vmfest-vm.vbox' already exists"}
2012-10-25 11:59:23,306 DEBUG v.v.conditions formatting wrapped exception {:type :vbox-runtime, :original-message "VirtualBox error: Machine settings file '/Users/gert/.vmfest/nodes/my-vmfest-vm/my-vmfest-vm.vbox' already exists (0x80BB0004)", :origin-id "22781af3-1c96-4126-9edf-67a020e0e858", :origin-component "Machine", :error-code 2159738884, :original-error-type :VBOX_E_FILE_ERROR, :text "Machine settings file '/Users/gert/.vmfest/nodes/my-vmfest-vm/my-vmfest-vm.vbox' already exists"}
skelter commented 11 years ago

Ran into this as well. I'm not sure yet, but this could be because of different version of vmfest and virtualbox.

peterbollen commented 11 years ago

I'm experiencing this as well.

virtualbox 4.2.6 r82870

martinchooooooo commented 11 years ago

Came across the same thing. A little annoying to figure out, but update the vmfest dependency in project.clj from 0.2.5-beta.5 to 0.2.8. and all should be fine =]

I put the change a pull request if that makes it easier.

cprice404 commented 11 years ago

I had this problem as well, and eventually realized that in addition to updating the vmfest dependency in project.clj I needed to blow away my ~/.vmfest directory, because there was something in there that was still referencing 4.1.