ESXi 4.1 problem (Essex)

Asked by Tomasz Kłosiński

Hello,

I have a problem with integration nova-compute with ESXi 4.1.

This is what I've got in nova.compute.log:

2012-08-31 12:06:58 DEBUG nova.virt.vmwareapi_conn [-] 'NoneType' object has no attribute 'Logout' from (pid=12808) __del__ /usr/lib/python2.7/dist-packages/nova/virt/vmwareapi_conn.py:289
2012-08-31 12:16:44 CRITICAL nova.virt.vmwareapi_conn [-] In vmwareapi:_create_session, got this exception: Exception in RetrieveServiceContent (400, u'Bad Request')
2012-08-31 12:16:44 CRITICAL nova [-] Exception in RetrieveServiceContent (400, u'Bad Request')
2012-08-31 12:16:44 TRACE nova Traceback (most recent call last):
2012-08-31 12:16:44 TRACE nova File "/usr/bin/nova-compute", line 47, in <module>
2012-08-31 12:16:44 TRACE nova server = service.Service.create(binary='nova-compute')
2012-08-31 12:16:44 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/service.py", line 241, in create
2012-08-31 12:16:44 TRACE nova report_interval, periodic_interval)
2012-08-31 12:16:44 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/service.py", line 150, in __init__
2012-08-31 12:16:44 TRACE nova self.manager = manager_class(host=self.host, *args, **kwargs)
2012-08-31 12:16:44 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 204, in __init__
2012-08-31 12:16:44 TRACE nova utils.import_object(compute_driver),
2012-08-31 12:16:44 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/utils.py", line 89, in import_object
2012-08-31 12:16:44 TRACE nova return cls()
2012-08-31 12:16:44 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/virt/connection.py", line 78, in get_connection
2012-08-31 12:16:44 TRACE nova conn = vmwareapi_conn.get_connection(read_only)
2012-08-31 12:16:44 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/virt/vmwareapi_conn.py", line 110, in get_connection
2012-08-31 12:16:44 TRACE nova api_retry_count)
2012-08-31 12:16:44 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/virt/vmwareapi_conn.py", line 120, in __init__
2012-08-31 12:16:44 TRACE nova api_retry_count, scheme=scheme)
2012-08-31 12:16:44 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/virt/vmwareapi_conn.py", line 241, in __init__
2012-08-31 12:16:44 TRACE nova self._create_session()
2012-08-31 12:16:44 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/virt/vmwareapi_conn.py", line 278, in _create_session
2012-08-31 12:16:44 TRACE nova raise exception.Error(excep)
2012-08-31 12:16:44 TRACE nova Error: Exception in RetrieveServiceContent (400, u'Bad Request')
2012-08-31 12:16:44 TRACE nova

This is my nova.conf on compute node:

#--dhcpbridge_flagfile=/etc/nova/nova.conf
#--dhcpbridge=/usr/bin/nova-dhcpbridge
#--logdir=/var/log/nova
#--state_path=/var/lib/nova
#--lock_path=/var/lock/nova
#--force_dhcp_release
#--iscsi_helper=tgtadm
#--libvirt_use_virtio_for_bridges
#--connection_type=libvirt
#--root_helper=sudo nova-rootwrap
#--verbose
#--ec2_private_dns_show_ip

# LOGS/STATE
--verbose=True
--debug
--logdir=/var/log/nova
--state_path=/var/lib/nova
--lock_path=/var/lock/nova

# AUTHENTICATION
--auth_strategy=keystone

# SCHEDULER
--compute_scheduler_driver=nova.scheduler.filter_scheduler.FilterScheduler

# VOLUMES
#volume_group=nova-volumes
#volume_name_template=volume-%08x
#iscsi_helper=tgtadm

# DATABASE
--sql_connection=mysql://nova:nova@10.9.4.251/nova

# COMPUTE
#--libvirt_type=qemu
#--compute_driver=libvirt.LibvirtDriver
--instance_name_template=instance-%08x
--api_paste_config=/etc/nova/api-paste.ini
--allow_resize_to_same_host=True

# APIS
--osapi_compute_extension=nova.api.openstack.compute.contrib.standard_extensions
--ec2_dmz_host=10.9.4.251
--s3_host=10.9.4.251

# RABBITMQ
--rabbit_host=10.9.4.251

# GLANCE
--image_service=nova.image.glance.GlanceImageService
--glance_api_servers=10.9.4.251:9292

# NETWORK
--network_manager=nova.network.manager.FlatDHCPManager
--force_dhcp_release=True
--dhcpbridge_flagfile=/etc/nova/nova.conf
--firewall_driver=nova.virt.libvirt.firewall.IptablesFirewallDriver
# Change my_ip to match each host
--my_ip=10.9.4.253
--public_interface=eth0
--vlan_interface=eth0
--flat_network_bridge=br100
--flat_interface=eth0
--fixed_range=192.168.100.0/24

# NOVNC CONSOLE
#novncproxy_base_url=http://10.9.4.251:6080/vnc_auto.html
# Change vncserver_proxyclient_address and vncserver_listen to match each compute host
#vncserver_proxyclient_address=10.9.4.251
#vncserver_listen=10.9.4.251

--connection_type=vmwareapi
--vmwareapi_wsdl_loc=http://10.9.4.253:8080/wsdl/vim25/vimService.wsdl #(StrOpt) VIM Service WSDL Location e.g http://<server>/vimService.wsdl, due to a bug in vSphere ESX 4.1 default wsdl.
#--vmware_vif_driver=nova.virt.vmwareapi.vif.VMWareVlanBridgeDriver #(StrOpt) The VMWare VIF driver to configure the VIFs.
#--vmwareapi_api_retry_count=10.0 #(FloatOpt) The number of times we retry on failures, e.g., socket error, etc. Used only if connection_type is vmwareapi
--vmwareapi_host_ip=10.9.4.252 #(StrOpt) URL for connection to VMWare ESX host.Required if connection_type is vmwareapi.
--vmwareapi_host_password=password_here #(StrOpt) Password for connection to VMWare ESX host. Used only if connection_type is vmwareapi.
--vmwareapi_host_username=root #(StrOpt) Username for connection to VMWare ESX host. Used only if connection_type is vmwareapi.
#--vmwareapi_task_poll_interval=5.0 #(FloatOpt) The interval used for polling of remote tasks. Used only if connection_type is vmwareapi
#--vmwareapi_vlan_interface=vmnic0 #(StrOpt) Physical ethernet adapter name for vlan networking

This is the wsdl on tomcat:

root@compute:~# curl http://10.9.4.253:8080/wsdl/vim25/vimService.wsdl
<?xml version="1.0" encoding="UTF-8" ?>
<!--
   Copyright 2005-2010 VMware, Inc. All rights reserved.
-->
<definitions targetNamespace="urn:vim25Service"
   xmlns="http://schemas.xmlsoap.org/wsdl/"
   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
   xmlns:interface="urn:vim25"
>
   <import location="vim.wsdl" namespace="urn:vim25" />
   <service name="VimService">
      <port binding="interface:VimBinding" name="VimPort">
         <soap:address location="https://10.9.4.252/sdk/vimService" />
      </port>
   </service>
</definitions>

This is the vimService on ESXi:

root@compute:~# curl https://10.9.4.252/sdk/vimService.wsdl -k
<?xml version="1.0" encoding="UTF-8" ?>
<!--
   Copyright 2005-2010 VMware, Inc. All rights reserved.
-->
<definitions targetNamespace="urn:vim25Service"
   xmlns="http://schemas.xmlsoap.org/wsdl/"
   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
   xmlns:interface="urn:vim25"
>
   <import location="vim.wsdl" namespace="urn:vim25" />
   <service name="VimService">
      <port binding="interface:VimBinding" name="VimPort">
         <soap:address location="https://localhost/sdk/vimService" />
      </port>
   </service>
</definitions>

I have registered the license for ESXi.

Any help? I can't find any info on this topic in documentation.

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
Tomasz Kłosiński
Solved:
Last query:
Last reply:
Revision history for this message
Tomasz Kłosiński (tomasz-michal-klosinski) said :
#1

--connection_type=vmwareapi
--vmwareapi_wsdl_loc=http://10.9.4.253:8080/wsdl/vim25/vimService.wsdl
--vmwareapi_host_ip=10.9.4.252
--vmwareapi_host_password=password_here
--vmwareapi_host_username=root

Revision history for this message
Tomasz Kłosiński (tomasz-michal-klosinski) said :
#2

I found the solution.

http://docs.openstack.org/trunk/openstack-compute/admin/content/vmware.html

"copy the wsdl folder into /var/lib/tomcat6/webapps"

It's not enough to copy wsdl directory.. You have to copy all SDK directory!!

This is how it looks in nova.conf
--vmwareapi_wsdl_loc=http://172.18.177.132:8080/vmware/SDK/wsdl/vim25/vimService.wsdl
and this is how it looks in tomcat directory:
/var/lib/tomcat6/webapps/vmware/SDK/wsdl/vim25/vimService.wsdl

Otherwise, it will result in http error 400: bad request.

Revision history for this message
John Garbutt (johngarbutt) said :
#3

I think you need the wsdl file, and all its dependencies, rather than just the file.
But clearly copying everything should do that for you.

Revision history for this message
Tomasz Kłosiński (tomasz-michal-klosinski) said :
#4

Thanks John for your answer. I submited the bug to openstack-manuals:
https://bugs.launchpad.net/openstack-manuals/+bug/1044414

Maybe you may propose some better solution than mine for the fix. If it's better to copy the wsdl with dependencies instead of whole SDK directory, then it should be put in docs.openstack.org your way.