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 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 commands to it. It also provides an X-Server. Which is all natively compiled.
Update: Thanks Yaakov's comment: There is now a directly installable package in cygwin for virt-manager. The actions below are not necessary anymore.
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 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
Here is a up-to-date instruction set performed by me today and saved here for my future reference:
sudo apt update && sudo apt upgrade
sudo apt install dbus-x11 virt-manager
sudo apt install ssh-askpass
andssh-keygen
ssh-copy-id user@server
virt-manager
The first error is not a problem, just add a new connection and remove the local connection and you are up and running. If your connections are not saved between starts of the virt-manager, you need to perform the dbus session.conf trick:
Edit the configuration file:
sudoedit /etc/dbus-1/session.conf
and edit the first line or add the line such that the file contains:Yes. There is virt-viewer for Windows
http://virt-manager.org/download/sources/virt-viewer/
Update:
I see you were asking about virt-manager on windows and not virt-viewer.
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: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, addexport DISPLAY=':0.0'
to~/.bashrc
and restart your terminal.You may want to enable a ssh agent:
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
close/open bash, try again, use virt-manager --debug for more info
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.
I posted a YouTube Video here >> https://www.youtube.com/watch?v=gDEAu3oPcR0
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)
virt-manager
,xinit
andopenssh
.Configure XWin to autostart Virt-Manager.
Create shortcut on Desktop: Virt-Manager.cmd
This is the contents of mine:
Please consider using XMing
here is a snapshot of running SSH with X11 forwarding on Xming and virt-manager working on windows (X11 forwarded)
References
virt-manager is now available natively on Windows: https://virt-manager.org/download/