mitchellh / virtualbox

[ABANDONED] Create and modify virtual machines in VirtualBox using pure ruby.
http://mitchellh.github.com/virtualbox/
MIT License
245 stars 45 forks source link

0.9.0 breaks bridged networking configuration #61

Closed willglynn closed 13 years ago

willglynn commented 13 years ago

This worked in 0.8.3:

vm = VirtualBox::VM.all.first
adapter = vm.network_adapters.find { |a| !a.enabled }
adapter.enabled = true
adapter.attachment_type = :bridged
adapter.host_interface = "en0: Ethernet"
adapter.save

#host_interface was removed in 0.9.0. Changing it to #host_only_interface= allows the code to execute, but VirtualBox fails, saying:

Failed to open/create the internal network 'HostInterfaceNetworking-' (VERR_INVALID_PARAMETER). Failed to attach the network LUN (VERR_INVALID_PARAMETER).

willglynn commented 13 years ago

Closing in favor of #62, which addresses this issue.