
Dear Sir or Madam: I am engineer who want to connect hyper-v R2 via libvirt 0.9.3, but after create ceritificate file, and set the hyper-v winRM status to AllowUnencrypted="true" Then I connect the hyper-v by the command: virsh -c hyperv://192.168.58.26:5985 it always reply: Error: unable to complete TLS handshake: A TLS packet with unexpected length was received Error: failed to connect to the hypervisor Hope you can help me, thank you very much in advance. Thanks, Andy Li MFG Software Developer Department of Storage Products R&D, SCS Universal Scientific Industrial (Shanghai) Co., Ltd 421 Lishizhen Rd, Pudong New Area, Shanghai,P.R. China, 201203 Tel : +86 -21-5896 6996 ext. 81453 Fax : +86 -21-5080 4268

2011/12/9 Andy Li <andy_li@usish.com>:
Dear Sir or Madam:
I am engineer who want to connect hyper-v R2 via libvirt 0.9.3, but after create ceritificate file, and set the hyper-v winRM status to AllowUnencrypted="true"
Then I connect the hyper-v by the command: virsh –c hyperv://192.168.58.26:5985 it always reply:
Error: unable to complete TLS handshake: A TLS packet with unexpected length was received
Error: failed to connect to the hypervisor
Your problem is simple. Hyper-V support was added to libvirt in version 0.9.5, so your libvirt 0.9.3 is too old and doesn't know about Hyper-V. What's happening here is that libvirt doesn't know how to handle a URI with hyperv:// scheme and tries to connect to a non-existing libvirtd on 192.168.58.26. Because you override the default libvirtd TLS port libvirt tries to open a TLS session with the WinRM server on the unencrypted port 5985 on your Hyper-V host but fails with a TLS related error message. The solution is to upgrade your libvirt version to 0.9.5 or newer and try again with the same virsh command. Also make sure that Hyper-V support is enabled in your new libvirt build, it requires openwsman. -- Matthias Bolte http://photron.blogspot.com
participants (2)
-
Andy Li
-
Matthias Bolte