# Is there a way to run virt-manager on Windows?

We've been using KVM for almost a year strictly on CentOS 5.x as the KVM host, with Fedora and Ubuntu workstations accessing the KVM host and its guests using virt-manager, virt-viewer, and ssh.

Is anyone aware of a way to access the KVM host using virt-manager from a Windows workstation? We have one co-worker who would like to access the KVM host, from a Win7 system.

EDIT #1

I'm familiar with running a X11 server on windows such as Xming, and remote displaying virt-manager from the KVM host to a windows workstation, but what I'd really like here is to know of any solutions native to windows, i.e. is there a version of virt-manager that'll run on windows.

EDIT #2

Still no progress on this myself wrt. a native virt-manager client. I did come across a compiled version of libvirtd for windows along with a discussion on a mailing list about how to get libvirtd working on windows. I'm adding the links to this question in the hopes that someone will figure out how to get virt-manager working.

EDIT #3

Finally some progress. Came across this project on github called msys_setup which includes a windows port of virt-manager. It's partially functional, doesn't support qem+ssh:// connection type so it's still not usable for our needs, but it's a start.

Use putty and some X Server software on the Windows side (e.g. Xming) and use X11 tunneling with putty to display the remote virt-manager console.

• I am using the same approach currently. But the problem is any special keys (like winkey or other windows-wide keyboard shortcuts that I have configured) are grabbed by host windows, instead of the virt-manager window. – anishsane Dec 3 '12 at 9:34

I would use Cygwin. Then you can install virt-manager and openssh and place a shortcut on the Desktop. It is native.

Cygwin provides the linux tools and facilities around programs so that it feels like a linux environment. For instance, virt-manager can call ssh to make the connection to your KVM Server and would be able to run virsh and send comamnds to it. It also provides an X-Server. Which is all natively compiled.

If you have the time: You can easily customize the cygwin installation to exactly fit your needs. Just go through the folders, throw everything out you don't need. Write a script that starts the X Server and then virt-manager, zip it up and ey presto! there's your virt-manager for Windows.

• I've used cygwin in the past and though this would work is a little too heavy handed a solution for what I was looking for. AS I said in the question, I'm looking for a native client for windows to virt-manager. – slm Nov 23 '12 at 14:45
• Cygwin now includes a virt-manager package as well. – Yaakov Jun 27 '17 at 5:14

I would simply use ssh (putty) and virsh, and a VNC/Spice client (like virt-viewer for Windows), if I were confined to a Windows workstation

• I'm not that familiar with Spice. Can you explain what Spice is and is there a Spice client available for windows? I found this link, linux-kvm.org/page/SPICE, which shows how to set it up, but it doesn't really explain the benefits of Spice vs. VNC. – slm Dec 14 '11 at 18:40
• I also found this link to the Spice Project. Still don't quite entirely grasp exactly where it fits. I think that it provides a native graphics driver for the guests, but that's as far as I've gotten in my understanding. – slm Dec 14 '11 at 18:59
• Spice performs better and delivers a much better (actually, at the level of a normal, non-3D video card, meaning you can watch movies and youtube flicks, play non-3D games etc.) performance than VNC. Clients are available from several platforms. You have to start the VM with Spice support and install a Spice driver in the VM of course. At the moment, RHEL5 and higher and Fedora 14 and higher both have native support for Spice – dyasny Dec 14 '11 at 20:12
• Curious, can the Spice driver be used for the KVM host itself or is it limited to KVM guests only? – slm Dec 15 '11 at 5:37
• Spice is built into qemu, so currently it can only be used with KVM guests – dyasny Dec 15 '11 at 9:36

You could use Bash on Ubuntu on Windows ( https://msdn.microsoft.com/en-us/commandline/wsl/about ).

Then, you are able to install virt-manager as on Ubuntu:

$apt-get install virt-manager  Then you'll need a X server. You can install Xming. You'll need to add DISPLAY=:0.0 to your environment. To do that, add export DISPLAY=':0.0' to ~/.bashrc and restart your terminal. You may want to enable a ssh agent: eval ssh-agent ; ssh-add  After that, you should be able to run virt-manager as you'll do on Linux. There are some bugs but it works :-). edit by a z: d-bus error? Per: https://www.reddit.com/r/Windows10/comments/4rsmzp/bash_on_windows_getting_dbus_and_x_server_working/ Run: sudo sed -i 's$<listen>.*</listen>$<listen>tcp:host=localhost,port=0</listen>$' /etc/dbus-1/session.conf

Yes. There is virt-viewer for Windows

Update:

I see you were asking about virt-manager on windows and not virt-viewer.

• +1 I was trying to use virt-viewer as virt-manager lol, thanks for saving me the time! It isn't clear on the website that its not the manager. – FreeSoftwareServers Feb 7 '18 at 4:37

here is a snapshot of running SSH with X11 forwarding on Xming and virt-manager working on windows (X11 forwarded)

http://blog.allanglesit.com/2011/03/linux-kvm-managing-kvm-guests-using-virt-manager-on-windows/

http://www.freesoftwaremagazine.com/articles/run_any_gnu_linux_app_on_windows_without_any_virtualization

http://www.straightrunning.com/XmingNotes/

• This relies on running virt-manager on a remote host, which is not what is wanted here. – Michael Hampton Dec 27 '12 at 4:46
• hmmm in that case a straight answer to the question OP asks is a no because I have not encountered any solution which would run a virt-manager on a Windows 7 machine other than the X11 forwarding techniques available to us – Registered User Dec 27 '12 at 4:48
• Read my "EDITS" in the question. I mentioned a couple of leads that looked promising wrt. to running virt-manager on windows. It is working, just not for our scenario as of yet. – slm Dec 27 '12 at 4:52

Adding a "HowTo" on AndreasT Answer as it is the "best option" IMO ATM. Although using Bash + Windows Subsystem for Linux might be another option, it was unavailable on Windows 10 LTSB and I really hate how I can't backup Windows 10 Store Apps, so it would need to be re-configured/install each time Windows was deployed. That's a deal-breaker!

And I wrote up my own blog post, but I know better than to leave out the details in a URL so I will copy the short form here. (https://www.freesoftwareservers.com/wiki/running-virt-manager-inside-windows-10-using-cygwin-with-shortcut-on-desktop-28016650.html)

• Install CygWin w/ virt-manager, xinit and openssh
• Configure PWDless SSH via RSA Key to KVM Host
• Configure XWin to autostart Virt-Manager

cat << 'EOF' > ~/.startxwinrc
export DISPLAY=:0.0
virt-manager
sleep inf
EOF
chmod +x ~/.startxwinrc


Create Shortcut on Desktop: (This is the contents of my .cmd) Virt-Manager.cmd

tskill.exe xwin

C:\cygwin64\bin\run.exe /usr/bin/bash.exe -l -c /usr/bin/startxwix