Re: [libvirt] VMware support and libcurl on rhel-u1

I'll try with 7.15 can I test with ESX4i? Shahar ________________________________ From: Matthias Bolte <matthias.bolte@googlemail.com> To: Shahar Klein <shaharklein@yahoo.com> Sent: Sunday, July 26, 2009 5:56:18 PM Subject: Re: [libvirt] VMware support and libcurl on rhel-u1 2009/7/26 Shahar Klein <shaharklein@yahoo.com>:
It doesn't because I built libcurl on a different path (/usr/local/lib) So I won't damage other stuff on this box. I thought that this is what the LIBCURL_LIBS and LIBCURL_CFLAGS env vars are for.
No, but installing in the /usr/local prefix should also work with pkg-config. The .pc for libcurl should be located at /usr/local/lib/pkgconfig/libcurl.pc and pkg-config should find it. Maybe you have to set PKG_CONFIG_PATH in order to have pkg-config pick it up. Check the output of: pkg-config libcurl --modversion It should output 7.18 or what ever your version is, if installed correctly.
btw - Do I really need libcurl 7.18? trying to install it pushing me into the depnendncy hell: [...]
Hm... I just looked at the changelist of libcurl and something older like version 7.15 may also work, but I haven't tested it. You could give it a try and edit the configure.in file and change 7.18 to 7.15 and see if that works out. Regards, Matthias

On 27/07/09 06:17, Shahar Klein wrote:
I'll try with 7.15
can I test with ESX4i?
ESX4i doesn't seem to work yet - the API version has changed: error: internal error Expecting VI API version '2.5.0' or '2.5u2' but found '4.0' Patching libvirt to allow the 4.0 API version allows me to connect and list guests, but trying to dumpxml a guest definition fails: virsh # dumpxml alvis error: memory conf:1: expecting a name Then again dumpxml fails for me with ESX3i as well, though with a different error: virsh # dumpxml bsa error: internal error Missing essential config entry 'scsi0.virtualDev' Tom -- Tom Hughes (tom@compton.nu) http://www.compton.nu/

2009/7/27 Tom Hughes <tom@compton.nu>:
On 27/07/09 06:17, Shahar Klein wrote:
I'll try with 7.15
can I test with ESX4i?
ESX4i doesn't seem to work yet - the API version has changed:
error: internal error Expecting VI API version '2.5.0' or '2.5u2' but found '4.0'
The driver development was done based on ESX 3.5, I haven't checked yet what changed between VI API version 2.5 and 4.0, but that's already on the todo list.
Patching libvirt to allow the 4.0 API version allows me to connect and list guests, but trying to dumpxml a guest definition fails:
virsh # dumpxml alvis error: memory conf:1: expecting a name
What's the content of line number 1 of the alvis.vmx file?
Then again dumpxml fails for me with ESX3i as well, though with a different error:
virsh # dumpxml bsa error: internal error Missing essential config entry 'scsi0.virtualDev'
Oh, that's a bug in the VMX parsing code, I'll fix that. The VMX parsing hasn't get much testing with in-the-wild VMX files yet. It would be useful if you could send my some of your VMX files to build up a pool as input for automatic testing and to make the VMX parser more robust. You could apply this quick fix for testing: diff --git a/src/esx/esx_vmx.c b/src/esx/esx_vmx.c index 635a483..dddb7c4 100644 --- a/src/esx/esx_vmx.c +++ b/src/esx/esx_vmx.c @@ -822,7 +822,7 @@ esxVMX_ParseSCSIController(virConnectPtr conn, virConfPtr conf, int controller, } if (esxUtil_GetConfigString(conn, conf, virtualDev_name, - virtualDev, 0) < 0) { + virtualDev, 1) < 0) { goto failure; } Regards, Matthias

On 27/07/09 09:19, Matthias Bolte wrote:
2009/7/27 Tom Hughes<tom@compton.nu>:
Patching libvirt to allow the 4.0 API version allows me to connect and list guests, but trying to dumpxml a guest definition fails:
virsh # dumpxml alvis error: memory conf:1: expecting a name
What's the content of line number 1 of the alvis.vmx file?
The first two lines are: .encoding = "UTF-8" config.version = "8" Looking at an ESX3i one I see the .encoding line is not there so I guess that is the problem.
Then again dumpxml fails for me with ESX3i as well, though with a different error:
virsh # dumpxml bsa error: internal error Missing essential config entry 'scsi0.virtualDev'
Oh, that's a bug in the VMX parsing code, I'll fix that. The VMX parsing hasn't get much testing with in-the-wild VMX files yet. It would be useful if you could send my some of your VMX files to build up a pool as input for automatic testing and to make the VMX parser more robust.
You could apply this quick fix for testing:
That works, yes. Tom -- Tom Hughes (tom@compton.nu) http://www.compton.nu/

2009/7/27 Tom Hughes <tom@compton.nu>:
On 27/07/09 09:19, Matthias Bolte wrote:
2009/7/27 Tom Hughes<tom@compton.nu>:
Patching libvirt to allow the 4.0 API version allows me to connect and list guests, but trying to dumpxml a guest definition fails:
virsh # dumpxml alvis error: memory conf:1: expecting a name
What's the content of line number 1 of the alvis.vmx file?
The first two lines are:
.encoding = "UTF-8" config.version = "8"
Looking at an ESX3i one I see the .encoding line is not there so I guess that is the problem.
Yes, the leading dot is the problem. I'll have to tweak the config parser to allow for leading dots. Regards, Matthias

How do you connect to the esxi? Should I open an ssh in my ESXi server? [root@rain8 libvirt]# virsh -c esx+ssh://rain3/system error: cannot recv data: Connection reset by peer error: failed to connect to the hypervisor ________________________________ From: Tom Hughes <tom@compton.nu> To: Shahar Klein <shaharklein@yahoo.com> Cc: Matthias Bolte <matthias.bolte@googlemail.com>; libvir-list@redhat.com Sent: Monday, July 27, 2009 10:36:33 AM Subject: Re: [libvirt] VMware support and libcurl on rhel-u1 On 27/07/09 06:17, Shahar Klein wrote:
I'll try with 7.15
can I test with ESX4i?
ESX4i doesn't seem to work yet - the API version has changed: error: internal error Expecting VI API version '2.5.0' or '2.5u2' but found '4.0' Patching libvirt to allow the 4.0 API version allows me to connect and list guests, but trying to dumpxml a guest definition fails: virsh # dumpxml alvis error: memory conf:1: expecting a name Then again dumpxml fails for me with ESX3i as well, though with a different error: virsh # dumpxml bsa error: internal error Missing essential config entry 'scsi0.virtualDev' Tom -- Tom Hughes (tom@compton.nu) http://www.compton.nu/

On 27/07/09 09:38, Shahar Klein wrote:
How do you connect to the esxi?
Over https.
Should I open an ssh in my ESXi server?
[root@rain8 libvirt]# virsh -c esx+ssh://rain3/system error: cannot recv data: Connection reset by peer error: failed to connect to the hypervisor
I just use "virsh -c esx://root@server" and it connects over https by default. I did have to hack the code to stop curl trying to validate the self signed cert on the server. Tom -- Tom Hughes (tom@compton.nu) http://www.compton.nu/

2009/7/27 Tom Hughes <tom@compton.nu>:
On 27/07/09 09:38, Shahar Klein wrote:
How do you connect to the esxi?
Over https.
Should I open an ssh in my ESXi server?
[root@rain8 libvirt]# virsh -c esx+ssh://rain3/system error: cannot recv data: Connection reset by peer error: failed to connect to the hypervisor
I just use "virsh -c esx://root@server" and it connects over https by default.
I did have to hack the code to stop curl trying to validate the self signed cert on the server.
Tom
I assume you set CURLOPT_SSL_VERIFYPEER to 0. Good idea I'll add that in they way the no_verify query parameter work for libvirtd based transports. Regards, Matthias

On 27/07/09 11:00, Matthias Bolte wrote:
I assume you set CURLOPT_SSL_VERIFYPEER to 0. Good idea I'll add that in they way the no_verify query parameter work for libvirtd based transports.
That's the one, yes. Tom -- Tom Hughes (tom@compton.nu) http://www.compton.nu/

Tom Can you please attache this patch + the API version hack? Thanks ahead Shahar ________________________________ From: Tom Hughes <tom@compton.nu> To: Matthias Bolte <matthias.bolte@googlemail.com> Cc: Shahar Klein <shaharklein@yahoo.com>; libvir-list@redhat.com Sent: Monday, July 27, 2009 1:01:50 PM Subject: Re: [libvirt] VMware support and libcurl on rhel-u1 On 27/07/09 11:00, Matthias Bolte wrote:
I assume you set CURLOPT_SSL_VERIFYPEER to 0. Good idea I'll add that in they way the no_verify query parameter work for libvirtd based transports.
That's the one, yes. Tom -- Tom Hughes (tom@compton.nu) http://www.compton.nu/

2009/7/27 Shahar Klein <shaharklein@yahoo.com>:
How do you connect to the esxi? Should I open an ssh in my ESXi server?
[root@rain8 libvirt]# virsh -c esx+ssh://rain3/system error: cannot recv data: Connection reset by peer error: failed to connect to the hypervisor
The ESX driver works with an out-of-the-box installation of ESX/ESXi, just use: virsh -c esx://rain3 The ESX driver doesn't use libvirtd or any remote transport mechanisms of libvirt, it uses the remote VI API, that is based on https. So you'll have to setup the certificates for https correctly, or configure the driver to use http instead (virsh -c esx://rain3?transport=http), if you have your ESXi configured to allow http connections. Regards, Matthias
participants (3)
-
Matthias Bolte
-
Shahar Klein
-
Tom Hughes