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

Fix for hard drive cloning #58

Closed ejfinneran closed 13 years ago

ejfinneran commented 13 years ago

I found that when trying to clone a hard drive using the 0.83 release of virtualbox with VirtualBox 4.x, it was erroring out trying to access an attribute 'default_hard_disk_folder'.

This includes a fix as well as a test for that attribute.

ruby-1.8.7-p302 > drive.clone('test.vdi')
NoMethodError: undefined method `default_hard_disk_folder' for #<VirtualBox::COM::Interface::Version_4_0_X::SystemProperties>
    from /Users/ej/.rvm/gems/ruby-1.8.7-p302/gems/virtualbox-0.8.3/lib/virtualbox/hard_drive.rb:161:in `create_hard_disk_medium'