Compute VMWare ESXi 4.1 connection refused

Asked by Joel Eichelberger

Hello,

I am new to OpenStack and am having a little trouble getting it to work with ESXi 4.1.

I'm running nova 2011.2 on RHEL 5 (which I realize isn't supported). However, I have everything (more or less up and working) with qemu. This RHEL image is running all of the nova apps (api, scheduler, objectstore, volume, network, compute) glance, and rabbitmq.

I'm now switching over to a VMware ESXi 4.1.0 build-260247 machine (IP address 172.20.11.11) and having trouble getting nova-compute to create a connection to the ESXi host. I have followed the instructions at http://nova.openstack.org/vmwareapi_readme.html. I can say for sure that my ESXi host does not have the vmware-webAccess service on it at all (I thought I just needed to enable it). From what I gather web access is not supported on ESXi 4.1 (http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1023990). I looked at the url being used in vim.py and it returns "https://172.20.11.11/sdk". This url is not accessible on the ESXi host. I can only access https://172.20.11.11 and then that url + /mob and /folder?dcPath=ha-datacenter. I am hosting the wsdl on a separate machine as can be seen from the nova-compute.log output. I'm sure I'm just missing something. Any help identifying said missing config is much appreciated! Thanks in advance!

nova.conf file:
--daemonize=1
--dhcpbridge_flagfile=/etc/nova/nova.conf
--dhcpbridge=/opt/openStack/bin/nova-dhcpbridge
--lock_path=/tmp
--logdir=/var/log/nova
--state_path=/var/lib/nova
--verbose
--network_manager=nova.network.manager.FlatManager
--sql_connection=mysql://root:password@127.0.0.1/nova
--rabbit_host=127.0.0.1
--ec2_host=127.0.0.1
--image_service=nova.image.glance.GlanceImageService
--glance_api_servers=127.0.0.1:9292
--glance_host=127.0.0.1
--glance_port=9292
--use_s3=false
--connection_type=vmwareapi
--vmwareapi_host_ip=172.20.11.11
--vmwareapi_host_username=root
--vmwareapi_host_password=password
--vmwareapi_wsdl_loc=http://172.20.3.71:8080/vimService.wsdl
--console_manager=nova.console.vmrc_manager.ConsoleVMRCManager

nova-compute.log:

2011-09-22 12:35:45,074 DEBUG suds.wsdl [-] reading wsdl at: http://172.20.3.71:8080/vimService.wsdl ... from (pid=30281) __init__ build/bdist.linux-x86_64/egg/suds/wsdl.py:134
2011-09-22 12:35:45,074 DEBUG suds.transport.http [-] opening (http://172.20.3.71:8080/vimService.wsdl) from (pid=30281) open build/bdist.linux-x86_64/egg/suds/transport/http.py:59
2011-09-22 12:35:45,077 CRITICAL nova.virt.vmwareapi_conn [-] In vmwareapi:_create_session, got this exception: <urlopen error [Errno 111] ECONNREFUSED>
2011-09-22 12:35:45,078 ERROR nova [-] in Service.create()
(nova): TRACE: Traceback (most recent call last):
(nova): TRACE: File "/opt/openStack/lib/python2.6/site-packages/nova/service.py", line 270, in serve
(nova): TRACE: services = [Service.create()]
(nova): TRACE: File "/opt/openStack/lib/python2.6/site-packages/nova/service.py", line 173, in create
(nova): TRACE: report_interval, periodic_interval)
(nova): TRACE: File "/opt/openStack/lib/python2.6/site-packages/nova/service.py", line 73, in __init__
(nova): TRACE: self.manager = manager_class(host=self.host, *args, **kwargs)
(nova): TRACE: File "/opt/openStack/lib/python2.6/site-packages/nova/compute/manager.py", line 127, in __init__
(nova): TRACE: utils.import_object(compute_driver),
(nova): TRACE: File "/opt/openStack/lib/python2.6/site-packages/nova/utils.py", line 76, in import_object
(nova): TRACE: return cls()
(nova): TRACE: File "/opt/openStack/lib/python2.6/site-packages/nova/virt/connection.py", line 73, in get_connection
(nova): TRACE: conn = vmwareapi_conn.get_connection(read_only)
(nova): TRACE: File "/opt/openStack/lib/python2.6/site-packages/nova/virt/vmwareapi_conn.py", line 105, in get_connection
(nova): TRACE: api_retry_count)
(nova): TRACE: File "/opt/openStack/lib/python2.6/site-packages/nova/virt/vmwareapi_conn.py", line 115, in __init__
(nova): TRACE: api_retry_count, scheme=scheme)
(nova): TRACE: File "/opt/openStack/lib/python2.6/site-packages/nova/virt/vmwareapi_conn.py", line 209, in __init__
(nova): TRACE: self._create_session()
(nova): TRACE: File "/opt/openStack/lib/python2.6/site-packages/nova/virt/vmwareapi_conn.py", line 246, in _create_session
(nova): TRACE: raise exception.Error(excep)
(nova): TRACE: Error: <urlopen error [Errno 111] ECONNREFUSED>
(nova): TRACE:
2011-09-22 12:35:45,085 CRITICAL nova [-] <urlopen error [Errno 111] ECONNREFUSED>
(nova): TRACE: Traceback (most recent call last):
(nova): TRACE: File "/opt/openStack/bin/nova-compute", line 48, in <module>
(nova): TRACE: service.serve()
(nova): TRACE: File "/opt/openStack/lib/python2.6/site-packages/nova/service.py", line 270, in serve
(nova): TRACE: services = [Service.create()]
(nova): TRACE: File "/opt/openStack/lib/python2.6/site-packages/nova/service.py", line 173, in create
(nova): TRACE: report_interval, periodic_interval)
(nova): TRACE: File "/opt/openStack/lib/python2.6/site-packages/nova/service.py", line 73, in __init__
(nova): TRACE: self.manager = manager_class(host=self.host, *args, **kwargs)
(nova): TRACE: File "/opt/openStack/lib/python2.6/site-packages/nova/compute/manager.py", line 127, in __init__
(nova): TRACE: utils.import_object(compute_driver),
(nova): TRACE: File "/opt/openStack/lib/python2.6/site-packages/nova/utils.py", line 76, in import_object
(nova): TRACE: return cls()
(nova): TRACE: File "/opt/openStack/lib/python2.6/site-packages/nova/virt/connection.py", line 73, in get_connection
(nova): TRACE: conn = vmwareapi_conn.get_connection(read_only)
(nova): TRACE: File "/opt/openStack/lib/python2.6/site-packages/nova/virt/vmwareapi_conn.py", line 105, in get_connection
(nova): TRACE: api_retry_count)
(nova): TRACE: File "/opt/openStack/lib/python2.6/site-packages/nova/virt/vmwareapi_conn.py", line 115, in __init__
(nova): TRACE: api_retry_count, scheme=scheme)
(nova): TRACE: File "/opt/openStack/lib/python2.6/site-packages/nova/virt/vmwareapi_conn.py", line 209, in __init__
(nova): TRACE: self._create_session()
(nova): TRACE: File "/opt/openStack/lib/python2.6/site-packages/nova/virt/vmwareapi_conn.py", line 246, in _create_session
(nova): TRACE: raise exception.Error(excep)
(nova): TRACE: Error: <urlopen error [Errno 111] ECONNREFUSED>
(nova): TRACE:
2011-09-22 12:35:45,110 DEBUG nova.virt.vmwareapi_conn [-] 'NoneType' object has no attribute 'Logout' from (pid=30281) __del__ /opt/openStack/lib/python2.6/site-packages/nova/virt/vmwareapi_conn.py:257

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
Sateesh
Solved:
Last query:
Last reply:
Revision history for this message
Joel Eichelberger (joel-eichelberger) said :
#1

I downloaded the SDK for 4.1, and following their examples, am able to connect to the machine (https://172.20.11.11/sdk/) and execute commands. I used the java examples as templates. I Compute still returns a connection refused error. Is there a way that I can turn off the certificate check in compute?

Revision history for this message
Sateesh (sateesh-chodapuneedi) said :
#2

Hi Joe,

Did you try to enable “vSphere Web Access” in “vSphere client” UI at Configuration->Security Profile->Firewall

Also make sure vim.wsdl is also hosted at the location as that of vimService.wsdl.

Which version/revision of nova are you using?

Revision history for this message
Joel Eichelberger (joel-eichelberger) said :
#3

Sateesh, hello. Thank you for the response.

The option to enable vSphere Web Access does not exist in the vSphere client Configuration tab, --> Security Profile --> Firewall. Also, when logging directly onto the machine the application vmware-webAccess does not exist on the machine itself. Both wsdl files are hosted at the same location. I am using the nova version 2011.2; more specifically tarmac-20110415024701.

However, I think that I gotten past the above error, which seems to have been a wsdl hosting error on my part. I had the path to the wsdl typed incorrectly, but the looking at trace, it looked like it was actually trying to connect to the ESXi host.

The error I now have is when trying to start a vmdk image. The image start fails with the following error in the nova-compute.log:

2011-09-26 12:48:14,194 ERROR nova.compute.manager [WJG2DNMVWYJJ-383O9E7 root aProject] Instance '68' failed to spawn. Is virtualization enabled in the BIOS?
(nova.compute.manager): TRACE: Traceback (most recent call last):
(nova.compute.manager): TRACE: File "/opt/openStack/lib/python2.6/site-packages/nova/compute/manager.py", line 234, in run_instance
(nova.compute.manager): TRACE: self.driver.spawn(instance_ref)
(nova.compute.manager): TRACE: File "/opt/openStack/lib/python2.6/site-packages/nova/virt/vmwareapi_conn.py", line 129, in spawn
(nova.compute.manager): TRACE: self._vmops.spawn(instance)
(nova.compute.manager): TRACE: File "/opt/openStack/lib/python2.6/site-packages/nova/virt/vmwareapi/vmops.py", line 122, in spawn
(nova.compute.manager): TRACE: _check_if_network_bridge_exists()
(nova.compute.manager): TRACE: File "/opt/openStack/lib/python2.6/site-packages/nova/virt/vmwareapi/vmops.py", line 120, in _check_if_network_bridge_exists
(nova.compute.manager): TRACE: " exist on the ESX host") % net_name)
(nova.compute.manager): TRACE: NotFound: Network with the name 'br100' doesn't exist on the ESX host
(nova.compute.manager): TRACE:
2011-09-26 12:48:14,278 DEBUG suds.resolver [-] searching schema for (ns0:SelectionSpec) from (pid=13385) root build/bdist.linux-x86_64/egg/suds/resolver.py:128
2011-09-26 12:48:14,278 DEBUG suds.xsd.query [-] ('SelectionSpec', urn:vim25), found as: <Complex:0x249b8990 name="SelectionSpec" /> from (pid=13385) result build/bdist.linux-x86_64/egg/suds/xsd/query.py:85
2011-09-26 12:48:14,279 DEBUG suds.resolver [-] found (ns0:SelectionSpec) as (<Complex:0x249b8990 name="SelectionSpec" />) from (pid=13385) root build/bdist.linux-x86_64/egg/suds/resolver.py:136
2011-09-26 12:48:14,279 DEBUG suds.metrics [-] ns0:SelectionSpec created: 0 (ms) from (pid=13385) create build/bdist.linux-x86_64/egg/suds/client.py:246

Thanks again!

Revision history for this message
Best Sateesh (sateesh-chodapuneedi) said :
#4

While creating instance, the instance will be connected to the specified bridge (as you are using FlatManager for networking) using the flag "--flat_network_bridge". If no bridge specified then br100 will be used. Here the error says br100 network (port group name) doesn't exist in ESX host. You can either try to create a port group with name 'br100' or specify the name of existing port group against this flag.

Option description:-
--flat_network_bridge=<ESX Virtual Machine Port Group> [Optional, only for Flat Networking]

Hope that helps!

Revision history for this message
Joel Eichelberger (joel-eichelberger) said :
#5

Thanks Sateesh, that solved my question.

Revision history for this message
Lucky T (tejeshmk) said :
#6

hi joel, i'm getting the same error as above

" CRITICAL nova.virt.vmwareapi_conn [-] In vmwareapi:_create_session, got this exception: <urlopen error [Errno 111] ECONNREFUSED>"

can you share me how you resolved ?
and
is anything to do with --flat_network_bridge=<ESX Virtual Machine Port Group> [Optional, only for Flat Networking]?
if yes, what value i should provide for this flag.

 thanks in advance.

Revision history for this message
Joel Eichelberger (joel-eichelberger) said :
#7

Lucky,

1st, make sure your ESXi host is running a licensed version (you would have had to pay to get a licensed version).

Then you need to look add a port group on the ESXi host with a name that matches the port group listed in the --flat_network_bridge flag. Basically, to add a port group on the EXSi host using vSphere client, click on the server, click on the configuration tab, click on "Networking" in the hardware list on the left, then click on "Properties..". There you will be able to add a virtual network.

Hope this helps

Revision history for this message
Nitz (nitshree) said :
#8

Hi,

I have installed Grizzly on Ubuntu server 12.04. Trying to configure nova-compute to use vmwareapi drivers. The nova-compute service fails to start with either ESX or VC driver. I am having ESXi 5.1.0 (799733) and VC 5.1.0a (880472). Both ESXi & VC have valid license and web access enabled. The sdk is copied on to the compute host in /var/var/lib/tomcat6/webapps/vmware/SDK. I am able to access the wsdl location from any host on the network.
Portgroup with bridge interface br100 is created.

nova.config parameters

compute_driver=vmwareapi.VMwareVCDriver
instance_name_template=instance-%08x
api_paste_config=/etc/nova/api-paste.ini
vmwareapi_host_ip=10.115.200.155
vmwareapi_host_username=root
vmwareapi_host_password=vmware
vmwareapi_cluster_name=osdeploy
vmwareapi_wsdl_loc=http://10.115.200.178:8080/vmware/SDK/vsphere-ws/wsdl/vim25/vimService.wsdl

nova-compute.log

INFO nova.virt.driver [-] Loading compute driver 'vmwareapi.VMwareVCDriver'
INFO nova.manager [-] Skipping periodic task _periodic_update_dns because its interval is negative
CRITICAL nova.virt.vmwareapi.driver [-] In vmwareapi:_create_session, got this exception: <urlopen error [Errno 111] ECONNREFUSED>
CRITICAL nova [-] <urlopen error [Errno 111] ECONNREFUSED>
TRACE nova Traceback (most recent call last):
TRACE nova File "/usr/bin/nova-compute", line 83, in <module>
TRACE nova db_allowed=False)
TRACE nova File "/usr/lib/python2.7/dist-packages/nova/service.py", line 534, in create
TRACE nova db_allowed=db_allowed)
TRACE nova File "/usr/lib/python2.7/dist-packages/nova/service.py", line 413, in __init__
TRACE nova self.manager = manager_class(host=self.host, *args, **kwargs)
TRACE nova File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 353, in __init__
TRACE nova self.driver = driver.load_compute_driver(self.virtapi, compute_driver)
TRACE nova File "/usr/lib/python2.7/dist-packages/nova/virt/driver.py", line 930, in load_compute_driver
TRACE nova virtapi)
TRACE nova File "/usr/lib/python2.7/dist-packages/nova/openstack/common/importutils.py", line 51, in import_object_ns
TRACE nova return import_class(import_value)(*args, **kwargs)
TRACE nova File "/usr/lib/python2.7/dist-packages/nova/virt/vmwareapi/driver.py", line 348, in __init__
TRACE nova super(VMwareVCDriver, self).__init__(virtapi)
TRACE nova File "/usr/lib/python2.7/dist-packages/nova/virt/vmwareapi/driver.py", line 145, in __init__
TRACE nova api_retry_count, scheme=scheme)
TRACE nova File "/usr/lib/python2.7/dist-packages/nova/virt/vmwareapi/driver.py", line 417, in __init__
TRACE nova self._create_session()
TRACE nova File "/usr/lib/python2.7/dist-packages/nova/virt/vmwareapi/driver.py", line 454, in _create_session
TRACE nova raise exception.NovaException(excep)
TRACE nova NovaException: <urlopen error [Errno 111] ECONNREFUSED>

The same happens for 'vmwareapi.VMwareESXDriver'.
Any guess what could be wrong? Am I missing something?