Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Versioned interface doesn't detect version on Windows #37

Open
mitchellh opened this issue Jul 19, 2010 · 7 comments
Open

Versioned interface doesn't detect version on Windows #37

mitchellh opened this issue Jul 19, 2010 · 7 comments
Labels

Comments

@mitchellh
Copy link
Owner

Title.

@bdimcheff
Copy link

Does this cause Vagrant to be unusable on Windows? It looks like Vagrant just exits when it can't find the proper Virtualbox version.

@mitchellh
Copy link
Owner Author

bdimcheff,

What version of Windows are you on and is it 64-bit?

Mitchell

@mitchellh
Copy link
Owner Author

I should make myself more clear. virtualbox gem uses the win32ole library to talk to VirtualBox on Windows. This library works great but does not work at all on 64-bit versions of Windows, and this is where the source of this issue typically comes from.

I'm planning on adding a check in Vagrant for 64-bit windows and showing a more descriptive error message.

@bdimcheff
Copy link

ahhhhh that would do it. It is 64-bit win7. There's no way to make it work on 64-bit at all? This is what I get from the stack trace, which is kinda strange since it looks like the first win32ole call succeeds but the 2nd fails:

irb(main):004:0> VirtualBox::Lib.lib
WIN32OLERuntimeError: failed to create WIN32OLE object from `VirtualBox.Session'

    HRESULT error code:0x80040154
      Class not registered
        from C:/Ruby186/lib/ruby/gems/1.8/gems/virtualbox-0.7.5/lib/virtualbox/com/mscom_interface.rb:29:in `initialize'
        from C:/Ruby186/lib/ruby/gems/1.8/gems/virtualbox-0.7.5/lib/virtualbox/com/mscom_interface.rb:29:in `new'
        from C:/Ruby186/lib/ruby/gems/1.8/gems/virtualbox-0.7.5/lib/virtualbox/com/mscom_interface.rb:29:in `initialize_for_version'
        from C:/Ruby186/lib/ruby/gems/1.8/gems/virtualbox-0.7.5/lib/virtualbox/com/mscom_interface.rb:21:in `initialize_mscom'
        from C:/Ruby186/lib/ruby/gems/1.8/gems/virtualbox-0.7.5/lib/virtualbox/com/mscom_interface.rb:20:in `each'
        from C:/Ruby186/lib/ruby/gems/1.8/gems/virtualbox-0.7.5/lib/virtualbox/com/mscom_interface.rb:20:in `initialize_mscom'
        from C:/Ruby186/lib/ruby/gems/1.8/gems/virtualbox-0.7.5/lib/virtualbox/com/mscom_interface.rb:13:in `initialize'
        from C:/Ruby186/lib/ruby/gems/1.8/gems/virtualbox-0.7.5/lib/virtualbox/lib.rb:73:in `new'
        from C:/Ruby186/lib/ruby/gems/1.8/gems/virtualbox-0.7.5/lib/virtualbox/lib.rb:73:in `initialize'
        from C:/Ruby186/lib/ruby/gems/1.8/gems/virtualbox-0.7.5/lib/virtualbox/lib.rb:39:in `new'
        from C:/Ruby186/lib/ruby/gems/1.8/gems/virtualbox-0.7.5/lib/virtualbox/lib.rb:39:in `lib'
        from (irb):4
        from :0
irb(main):005:0>

Anyhow, yeah. I'm actually on OS X, but I'm using virtualbox to distribute demo VMs and somebody just upgraded from 32-bit XP to 64-bit win7 and ran into this problem.

@mitchellh
Copy link
Owner Author

Although we talked in IRC, I want to make note here for other googlers or people searching by other means:

The main issue is that win32ole isn't supported on 64-bit windows systems yet, and from what I know there is no way around it. I haven't looked into this issue in a few months and I have a few new ideas but that where I am right now. I'll keep this updated.

@hayeshaugen
Copy link

To add a bit more google sauce:

Currently vagrant does not work with x64 Windows 7

@stereobooster
Copy link

The main issue is that win32ole isn't supported on 64-bit windows systems yet

Maybe I get something wrong, but it seems it supported

require 'win32ole'
vb = WIN32OLE.new("VirtualBox.VirtualBox")
p vb.version

outputs 4.1.6, but

WIN32OLE.new("VirtualBox.Session")

outputs

vagrant.git/_/1.rb:6:in `initialize': failed to create WIN32OLE object from `VirtualBox.Session' (WIN32OLERuntimeError)
    HRESULT error code:0x80040154

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants