It is currently Tue Oct 15, 2019 11:33 am


All times are UTC




Post new topic Reply to topic  [ 13 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Virtualbox VMs - How does one configure vboxwrapper?
PostPosted: Sat Jul 19, 2014 5:12 am 
Offline

Joined: Fri May 04, 2012 11:37 am
Posts: 57
Location: Point Cook, Australia
Hi.

I noticed that in 1.0b1.dev1 there is the "possibilty" of adding Virtualbox guests. Is it really possible and that my failure to configure it is due to my own ineptitude or is it that I'm just in too much of a hurry?

I cloned vboxwrapper from Github (git clone https://github.com/GNS3/vboxwrapper) and built it per the instructions in the README.md file. However, when I add the path to vboxwrapper (/usr/local/bin/vboxwrapper) and click apply, I get the following traceback:

This appears on the console I'm using to run gns3 via sudo:
Code:
[E 140719 14:57:47 base:277] uncaught exception <class 'gns3server.modules.virtualbox.virtualbox_error.VirtualBoxError'>
    Traceback (most recent call last):
      File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0b1.dev1-py3.4.egg/gns3server/modules/base.py", line 275, in _decode_request
        self.modules[self.name][destination](self, params)
      File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0b1.dev1-py3.4.egg/gns3server/modules/virtualbox/__init__.py", line 754, in vm_list
        vms = self._vboxwrapper.get_vm_list()
      File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0b1.dev1-py3.4.egg/gns3server/modules/virtualbox/vboxwrapper_client.py", line 325, in get_vm_list
        return self.send('vbox vm_list')
      File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0b1.dev1-py3.4.egg/gns3server/modules/virtualbox/vboxwrapper_client.py", line 350, in send
        raise VirtualBoxError("Not connected")
    gns3server.modules.virtualbox.virtualbox_error.VirtualBoxError: Not connected
[I 140719 14:57:47 base:218] ZeroMQ client (virtualbox) sending JSON-RPC custom error: uncaught exception <class 'gns3server.modules.virtualbox.virtualbox_error.VirtualBoxError'>: Not connected
    Traceback (most recent call last):
      File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0b1.dev1-py3.4.egg/gns3server/modules/base.py", line 275, in _decode_request
        self.modules[self.name][destination](self, params)
      File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0b1.dev1-py3.4.egg/gns3server/modules/virtualbox/__init__.py", line 754, in vm_list
        vms = self._vboxwrapper.get_vm_list()
      File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0b1.dev1-py3.4.egg/gns3server/modules/virtualbox/vboxwrapper_client.py", line 325, in get_vm_list
        return self.send('vbox vm_list')
      File "/usr/local/lib/python3.4/dist-packages/gns3_server-1.0b1.dev1-py3.4.egg/gns3server/modules/virtualbox/vboxwrapper_client.py", line 350, in send
        raise VirtualBoxError("Not connected")
    gns3server.modules.virtualbox.virtualbox_error.VirtualBoxError: Not connected
     for call id 51e95890-bb91-431b-a3d5-347abf0c34e3


And here is the GUI popup (presumably with the same error info):
Attachment:
File comment: vboxwrapper error
vboxwrapper-error.png
vboxwrapper-error.png [ 76.33 KiB | Viewed 13205 times ]



Cheers,
ak.




Top
 Profile  
 
 Post subject: Re: Virtualbox VMs - How does one configure vboxwrapper?
PostPosted: Sat Jul 19, 2014 8:03 am 
Offline

Joined: Thu Nov 17, 2011 5:50 am
Posts: 68
I receive a similar error with vboxwrapper. When I try to refresh the VM list it gives the below traceback:
Code:
Could not get the VM list from the server: uncaught exception <class 'gns3server.modules.virtualbox.virtualbox_error.VirtualBoxError'>: Couldn't connect to vboxwrapper on 127.0.0.1:11525 :[Errno 111] Connection refused
Traceback (most recent call last):
  File "/usr/lib/python3.4/site-packages/gns3_server-1.0beta1-py3.4.egg/gns3server/modules/base.py", line 275, in _decode_request
    self.modules[self.name][destination](self, params)
  File "/usr/lib/python3.4/site-packages/gns3_server-1.0beta1-py3.4.egg/gns3server/modules/virtualbox/__init__.py", line 751, in vm_list
    self._start_vbox_service()
  File "/usr/lib/python3.4/site-packages/gns3_server-1.0beta1-py3.4.egg/gns3server/modules/virtualbox/__init__.py", line 134, in _start_vbox_service
    self._vboxwrapper.start()
  File "/usr/lib/python3.4/site-packages/gns3_server-1.0beta1-py3.4.egg/gns3server/modules/virtualbox/vboxwrapper_client.py", line 149, in start
    self.wait_for_vboxwrapper(self._host, self._port)
  File "/usr/lib/python3.4/site-packages/gns3_server-1.0beta1-py3.4.egg/gns3server/modules/virtualbox/vboxwrapper_client.py", line 170, in wait_for_vboxwrapper
    last_exception))
gns3server.modules.virtualbox.virtualbox_error.VirtualBoxError: Couldn't connect to vboxwrapper on 127.0.0.1:11525 :[Errno 111] Connection refused
If I try to start vboxwrapper manually it says:
Code:
Traceback (most recent call last):
  File "/usr/bin/vboxwrapper", line 9, in <module>
    load_entry_point('vboxwrapper==0.9', 'console_scripts', 'vboxwrapper')()
  File "/usr/lib/python3.4/site-packages/pkg_resources.py", line 356, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3.4/site-packages/pkg_resources.py", line 2476, in load_entry_point
    return ep.load()
  File "/usr/lib/python3.4/site-packages/pkg_resources.py", line 2190, in load
    ['__name__'])
ImportError: No module named 'vboxwrapper'
Running pip freeze shows the module is installed:
apache-libcloud==0.14.1
gns3-gui==1.0beta1
gns3-server==1.0beta1
jsonschema==2.3.0
livestreamer==1.8.2
netifaces==0.8
pyxdg==0.25
pyzmq==14.2.0
requests==2.3.0
tornado==3.2
vboxwrapper==0.9
ws4py==0.3.4


Top
 Profile  
 
 Post subject: Re: Virtualbox VMs - How does one configure vboxwrapper?
PostPosted: Sat Jul 19, 2014 3:39 pm 
Offline
Site Admin

Joined: Sat Oct 11, 2008 1:41 pm
Posts: 2668
Location: Canada
Hi,

vboxwrapper is python2 only. That is the whole point of using it is that the VirtualBox API doesn't work on Windows (the XPCOM module actually). This is not needed on Windows because the API uses COM directly. However, the whole VirtualBox support is still considered alpha even if the software itself is going to beta now.

Cheers,

_________________
Jeremy, GNS3 Programmer & Benevolent Dictator for Life.


Top
 Profile  
 
 Post subject: Re: Virtualbox VMs - How does one configure vboxwrapper?
PostPosted: Sat Jul 19, 2014 5:38 pm 
Offline

Joined: Thu Nov 17, 2011 5:50 am
Posts: 68
The error still appears after running setup using python2.
I have uninstalled vboxwrapper and cloned latest version from git and reinstalled it but it seems the vboxwrapper.py, tcp_pipe_proxy.py and vboxcontroller_4_3.py modules are not copied to the /usr/lib/python2.7/site-packages folder.
After copying all 3 files manually and the starting GNS3 gui everything worked fine.


Top
 Profile  
 
 Post subject: Re: Virtualbox VMs - How does one configure vboxwrapper?
PostPosted: Sat Jul 19, 2014 10:16 pm 
Offline

Joined: Wed Apr 02, 2014 7:34 am
Posts: 10
cioby23 wrote:
The error still appears after running setup using python2.
I have uninstalled vboxwrapper and cloned latest version from git and reinstalled it but it seems the vboxwrapper.py, tcp_pipe_proxy.py and vboxcontroller_4_3.py modules are not copied to the /usr/lib/python2.7/site-packages folder.
After copying all 3 files manually and the starting GNS3 gui everything worked fine.


Hey Cioby23,

Can you do a quick write up on the steps you took to get it working?

thanks!


Top
 Profile  
 
 Post subject: Re: Virtualbox VMs - How does one configure vboxwrapper?
PostPosted: Sun Jul 20, 2014 9:24 am 
Offline

Joined: Fri May 04, 2012 11:37 am
Posts: 57
Location: Point Cook, Australia
astroboy589 wrote:
...
Can you do a quick write up on the steps you took to get it working?

thanks!


This is what it took to get it sorted on my system:

1. Clone vboxwrapper:
Code:
git clone https://github.com/GNS3/vboxwrapper
cd vboxwrapper

2. Install the module:
Code:
sudo python2 setup.py install

NOTE:
Take note of where the vboxwrapper egg was placed as you'll need to copy 3 other files into the same location
- on my system it was put into /usr/local/lib/python2.7/dist-packages
Also, during installation, an executable (vboxwrapper) was installed into /usr/local/bin - you'll need this for the Vbox configuration in GNS3 below.

3. Copy the 3 files:
Code:
sudo cp vboxwrapper.py tcp_pipe_proxy.py vboxcontroller_4_3.py /usr/local/lib/python2.7/dist-packages/


Launch GNS3, and configure Virtualbox preferences as indicated below:
Attachment:
File comment: Virtualbox Preferences dialog
virtualbox-preferences.png
virtualbox-preferences.png [ 44.69 KiB | Viewed 13138 times ]


In the Virtualbox VMs preferences dialog, you'll now see your VM's listed:
Attachment:
File comment: Virtualbox VMs preferences dialog
virtualbox-vms-preferences.png
virtualbox-vms-preferences.png [ 49.48 KiB | Viewed 13138 times ]


That's it! Enjoy Jeremy's creation!


Cheers,
ak.

Edit:
I normally save the output of any packages I install manually for later perusal. For the record, I use the following command to install all GNS3 updates:
Code:
ts=$(date '+%Y%m%d-%H%M%S'); sudo python3 setup.py install 2>&1 | tee install-${ts}.log


For the one in this post, I simply changed python3 to python2. I can then check in 'install-<timestamp>.log' for anything that could have gone amiss.


Top
 Profile  
 
 Post subject: Re: Virtualbox VMs - How does one configure vboxwrapper?
PostPosted: Sun Jul 20, 2014 10:51 am 
Offline

Joined: Fri May 04, 2012 11:37 am
Posts: 57
Location: Point Cook, Australia
I now understand what that 'alpha' part in Jeremy's response above means - bugs are within!

I have a bug to report. I have a topology that needs at least 2 Linux VMs. However, I cannot add a second VM. Let me explain with a picture other than a 1000 words:

The image below shows the configuration of the the first VM (centos1):
Attachment:
File comment: First VM added
first-vm.png
first-vm.png [ 95.64 KiB | Viewed 13131 times ]


When I place the second VM, the red box on the VM icon doesn't go off and I cannot interact with it. However, when I now look at the properties of the first VM (centos1), I see that it has adopted the configuratioin of the second VM (centos2):
Attachment:
File comment: Second VM added
second-vm.png
second-vm.png [ 99.43 KiB | Viewed 13131 times ]


If it will help, the following also appears in the terminal window from which I launch gns3-gui via sudo:
Code:
[I 140720 20:46:29 __init__:306] creating node <class 'gns3.modules.virtualbox.virtualbox_vm.VirtualBoxVM'>
[I 140720 20:46:29 virtualbox_vm:41] VirtualBox VM instance is being created
[I 140720 20:46:29 __init__:329] configuring node VirtualBox VM
[I 140720 20:46:31 virtualbox_vm:248] VirtualBox VM centos2 [id=2]: working directory changed to /tmp/gns3-yzi_2_js-files/vbox/vm-2
[I 140720 20:46:31 virtualbox_vm:413] VirtualBox VM centos2 [id=2]: number of Ethernet adapters changed to 2
[I 140720 20:46:31 virtualbox_vm:157] VirtualBox VM centos2 [id=2] has been created
[I 140720 20:46:31 virtualbox_vm:128] VirtualBox VM instance setting up and updating console from '3501' to '3502'
[I 140720 20:46:31 virtualbox_vm:128] VirtualBox VM instance setting up and updating name from 'centos1' to 'centos2'
[I 140720 20:46:31 virtualbox_vm:128] VirtualBox VM instance setting up and updating adapters from '1' to '2'
[I 140720 20:46:31 virtualbox_vm:128] VirtualBox VM instance setting up and updating vmname from 'centos1' to 'centos2'
[I 140720 20:46:31 virtualbox_vm:413] VirtualBox VM centos2 [id=2]: number of Ethernet adapters changed to 1
[I 140720 20:46:31 virtualbox_vm:207] centos2: updating adapters from '2' to '1'
[I 140720 20:46:31 virtualbox_vm:224] VirtualBox VM centos2 has been created



Cheers,
ak.


Top
 Profile  
 
 Post subject: Re: Virtualbox VMs - How does one configure vboxwrapper?
PostPosted: Tue Jul 22, 2014 6:59 pm 
Offline

Joined: Mon Nov 10, 2008 10:31 am
Posts: 555
Location: Slovakia
aka2766 thank you for the workaround, it's working for me.

_________________
Brezular

All my tutorials can be found here:
http://brezular.com


Top
 Profile  
 
 Post subject: Re: Virtualbox VMs - How does one configure vboxwrapper?
PostPosted: Sun Aug 10, 2014 9:19 pm 
Offline

Joined: Wed Dec 11, 2013 9:58 pm
Posts: 27
The above worked for me as well.


Top
 Profile  
 
 Post subject: Re: Virtualbox VMs - How does one configure vboxwrapper?
PostPosted: Sat Aug 16, 2014 3:46 pm 
Offline

Joined: Thu Jul 03, 2014 4:09 am
Posts: 4
i am having an similar issue with Mac OSX mavericks, i followed the instructions above the only difference was that the path my egg files installed to was "/Library/Python/2.7/site-packages/"
, i also changed my path of the vboxwrapper within GNS3 to the "usr/local/bin/vboxwrapper" i am then able to run the vboxwrapper manually via terminal, but when i refresh the VM list i get the error in the attach image below, any ideas on how to get this resolved on Mac OSX?




Attachments:
error2.png
error2.png [ 69.3 KiB | Viewed 12602 times ]
error.png
error.png [ 68.59 KiB | Viewed 12603 times ]
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO