Fernando Lozano
2013-Sep-04 18:53 UTC
[libvirt-users] Is virsh supposed to work on Windows?
Hi there, Sorry for the cross-post, but I seeked help on this issue before on those lists, but nobody answered. :-( I'm trying to use virsh and virt-viewer on Windows. I'm running the latest binaries from http://spice-space.org/download.html, that is, virt-viewer-x64-0.5.7.msi on a Windows 7 64-bits computer. So far I got remote-viewer.exe to work, after some pain. But have no sucess using virt-viewer.exe and virsh.exe. Are they supposed to work, or am I loosing my time? I know the kvm host setup (a CentOS 6.3 machine) is fine, because I can connect using virsh from other CentOS and RHEL machines. I'm using TLS to secure connenctions to libvirtd, without client certs. I had a litthe trouble finding where to put certificate files on the windows machine, but using Sysinternals ProcessMonitor I found they have to be on the obvious path: C:\usr\x86_64-w64-mingw32\sys-root\mingw\etc\pki{CA,libvirt} Even then virsh can't connect: virsh # connect qemu://kvmhost/system error: Failed to connect to the hypervisor error: Unable to set close-on-exec flag: Success ProcessMonitor "strace" doesn't help me find what went wrong. I'm sure I'm using the same *.pem files that works for Linux clients. It looks like virsh is opening and reading those files ok. ProccessMonitor shows a TCP connect and a TCP Disconnect events to the correct IP and port, both resulting SUCCESS. Any ideas? What can I do to debug virsh on Windows and find why it isn't connecting to libvirt on CentOS? I tried -d and -l on Windows and Linux but can't find where the debug logs are saved. If you want, I can send ProcessMonitor captured events. For Red Hat folks out there: I need this working so I can get approval to buy subscriptions, The idea is production hosts will be RHEL. :-) If not, my boss may end up buying XenServer ;-) []s, Fernando Lozano
Eric Blake
2013-Sep-04 19:04 UTC
Re: [libvirt-users] [virt-tools-list] Is virsh supposed to work on Windows?
On 09/04/2013 12:53 PM, Fernando Lozano wrote:> Hi there, > > Sorry for the cross-post, but I seeked help on this issue before on > those lists, but nobody answered. :-( > > I'm trying to use virsh and virt-viewer on Windows. I'm running the > latest binaries from http://spice-space.org/download.html, that is, > virt-viewer-x64-0.5.7.msi on a Windows 7 64-bits computer. > > So far I got remote-viewer.exe to work, after some pain. But have no > sucess using virt-viewer.exe and virsh.exe. Are they supposed to work, > or am I loosing my time?It will only work if someone interested enough submits patches.> > Even then virsh can't connect: > > virsh # connect qemu://kvmhost/system > error: Failed to connect to the hypervisor > error: Unable to set close-on-exec flag: SuccessHere, I wonder if we can't improve the situation; src/util/virutil.c:virSetInherit() does nothing, and its wrapper virSetCloseExec() should therefore always return 0, which makes it very suspicious - the message in src/rpc/virnetsocket.c about close-on-exec not working should never be reached. What version of virsh is included in that msi? Maybe it's just a case of a stale build, for something that has been fixed upstream? But I personally have not tried to build or debug on mingw, to know if this is the only issue, or if you are staring at a number of other portability issues to resolve first. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Marc-André Lureau
2013-Sep-04 19:23 UTC
Re: [libvirt-users] [Spice-devel] [virt-tools-list] Is virsh supposed to work on Windows?
----- Original Message -----> On 09/04/2013 12:53 PM, Fernando Lozano wrote: > > Hi there, > > > > Sorry for the cross-post, but I seeked help on this issue before on > > those lists, but nobody answered. :-( > > > > I'm trying to use virsh and virt-viewer on Windows. I'm running the > > latest binaries from http://spice-space.org/download.html, that is, > > virt-viewer-x64-0.5.7.msi on a Windows 7 64-bits computer. > > > > So far I got remote-viewer.exe to work, after some pain. But have no > > sucess using virt-viewer.exe and virsh.exe. Are they supposed to work, > > or am I loosing my time? > > It will only work if someone interested enough submits patches. > > > > > Even then virsh can't connect: > > > > virsh # connect qemu://kvmhost/system > > error: Failed to connect to the hypervisor > > error: Unable to set close-on-exec flag: Success > > Here, I wonder if we can't improve the situation; > src/util/virutil.c:virSetInherit() does nothing, and its wrapper > virSetCloseExec() should therefore always return 0, which makes it very > suspicious - the message in src/rpc/virnetsocket.c about close-on-exec > not working should never be reached. > > What version of virsh is included in that msi? Maybe it's just a case > of a stale build, for something that has been fixed upstream? > > But I personally have not tried to build or debug on mingw, to know if > this is the only issue, or if you are staring at a number of other > portability issues to resolve first.It used to work for the basics, long time go. Then only kept the build going To check the version, you can msiextract the msi, and lookup Program Files\VirtViewer\deps.txt: mingw32-libvirt-0.10.2-3.fc19.noarch mingw32-libvirt-static-0.10.2-3.fc19.noarch cheers
Fernando Lozano
2013-Sep-04 19:41 UTC
Re: [libvirt-users] [virt-tools-list] Is virsh supposed to work on Windows?
Hi,>> I'm trying to use virsh and virt-viewer on Windows. I'm running the >> latest binaries from http://spice-space.org/download.html, that is, >> virt-viewer-x64-0.5.7.msi on a Windows 7 64-bits computer. >> >> So far I got remote-viewer.exe to work, after some pain. But have no >> sucess using virt-viewer.exe and virsh.exe. Are they supposed to work, >> or am I loosing my time? > It will only work if someone interested enough submits patches.This means it isn't supposed to work, or this means you don't know about anyone trying to use those binaries besides me? :-) I am willing to help all I can to test, but I'm not a Gnome developer. I have not coded a single line in C for more than 10 yeas. :-(>> Even then virsh can't connect: >> >> virsh # connect qemu://kvmhost/system >> error: Failed to connect to the hypervisor >> error: Unable to set close-on-exec flag: Success > Here, I wonder if we can't improve the situation; > src/util/virutil.c:virSetInherit() does nothing, and its wrapper > virSetCloseExec() should therefore always return 0, which makes it very > suspicious - the message in src/rpc/virnetsocket.c about close-on-exec > not working should never be reached.If you (or someone else) sends me testing or debuging binaries, I'll be glad to test them. I'll even setup another virtualization host if some thinks a newer CentOS, RHEL or Fedora could help. But I won't be able to code myself. I hope someone at Red Hat gives attention to this, because most admins of a RHEL / RHEV host runs Windows desktops. My home computer runs only Fedora, but at work (most customers, anyway) I have to use Windows. :-(> What version of virsh is included in that msi? Maybe it's just a case > of a stale build, for something that has been fixed upstream?C:>virsh -V Virsh command line tool of libvirt 0.10.2> But I personally have not tried to build or debug on mingw, to know if > this is the only issue, or if you are staring at a number of other > portability issues to resolve first.Do you know who built the Windows port? I know someone is doing that, because the binaries are updates every few months. :-) Again, I'm willing to help any way I can, but I can be only a tester, and a documentation writer. I won't be able to help as a developer. :-( []s, Fernando Lozano
Reasonably Related Threads
- Re: [virt-tools-list] Is virsh supposed to work on Windows?
- Re: [virt-tools-list] Is virsh supposed to work on Windows?
- Re: [virt-tools-list] Is virsh supposed to work on Windows?
- Re: [virt-tools-list] Is virsh supposed to work on Windows?
- Re: [virt-tools-list] Is virsh supposed to work on Windows?