qemu-init

A virtual machine manager to make life with qemu more comfortable

User Tools

Site Tools


/** qemu-init tools / —- metatag-robots:() metatag-keywords:(qemu,qemu-init,virsh,libvirt) metatag-description:qemu-adm ====== QEMU VNC connect Windows client ====== qemu-vnc connect for Windows gives an easy access to all qemu-init guests with vnc activated. Usually - and especially with multiple virtual machines - the name of a virtual machine is known, but the related port of the listening VNC server is not. qemu-vnc connect offers a selection through by name determining the related port automatically. Most commonly it is required for a new guest to install an operating system.

Version: qemu-vnc connect 0.34
Download: qemu-vnc connect installer
Checksum: qemu-vnc connect installer (sha256)

===== Requirements: ===== * PuTTY - a complete installation is highly recommended (using the msi installer) * appropriate rights at the qemu-init host ===== Installation ===== Install qemu-vnc bei running qemu-vnc connect installer and follow the instructions. A  vncviewer  (TightVNC) for Windows is bundled with the package. ===== Configuration ===== The following describes the initial configuration with Windows 10. Perhaps it doesn't work exactly this way with other versions of Windows. ==== key pair authentication ==== The communication between client and host will be done through  ssh  with key authentication. This have to configured manual for each Windows user, required files will be stored in the  %USERPROFILE% . For the first installation it is highly recommended to stay with locations and name like used below! Open puttygen and generate a key pair. Save the private key in  %USERPROFILE%\qemu-vnc.priv.ppk . /** Copy the public key to the clipboard. / Keep puttygen open for the moment - the next have to be done for each qemu-init host.

Open a terminal connection to the qemu-init host. Copy and paste the public key from puttygen into  .ssh/authorized_keys  of the qemu-init user (default: qemud) and save it. Verify that the permissions of  .ssh/authorized_keys  are correct (should be read/write for the qemu-init user only).

Check if the key authentication works. Open a command prompt at the Windows side and do (<hostname> is the qemu-init host and qemud is the user):

c:> plink -i "%USERPROFILE%\qemu-vnc.priv.ppk" -l qemud -x <hostname> ls -la

To hardening put the following in front of the public key in  authorized_keys  (beware of the comma):

command="cat /tmp/.qemu/qemu-vnc.reg 2>/dev/null", <... the public key ...>

Now, the user authorized by this key can execute this single command only. The part  2>/dev/null  is optional and prevents to load error messages into the drop down list. The test with  plink … ls -la  from above will fail, but without it a simple

c:> plink -i "%USERPROFILE%\qemu-vnc.priv.ppk" -l qemud -x <hostname>

will show a list of qemu's vnc servers (if there are any). Hint: The  /tmp/.qemu/qemu-vnc.reg  was configured at build time of qemu-init.

Additional sshd options

It is recommended to add this at the bottom of the sshd config file at the qemu-init host(s):

Match User qemud
PasswordAuthentication no

Remember: A  match  statement ends with the next  match  or  host  statement! See sshd_config(5) for details.

Client configuration

The Windows client uses  %USERPROFILE%\qemu-vnc.ini  for configuration settings. If it doesn't exists it will be created from the default one in the install directory. It is save to copy it manually and edit it now, but not necessary 1). With a automatic new created config the client will claim “No servers found” and opens the config file in editor. If the default settings are used, then qemu-init host(s) have to be added to the  [Servers]  section only. The parameters are documented in the comments. Servers could be a short hostname, FQDN or IP address.

If done save and close the config file. The client have to be closed and restarted. If something went wrong the behavior will be the same like with a new config file.

Usage

At start qemu-vnc connect retrieves data from all servers. Depending on the number of servers this could take a while. The data will be saved in  %TEMP%\qemu-vncports . If this file exists and it is not older than the  Refresh  value (in minutes), than it will be re-read at start of the qemu-vnc client. The “Refresh List” button could be used to retrieve fresh data from the qemu-init host(s) immediately.

Using an existing file  qemu-vncports  speeds up the start of qemu-vnc connect highly. Depends on how often the remote qemu-init vnc server list(s) changes.

Troubleshooting

If something went wrong, most commonly the connection fails. Check it out with  plink -v …  in a command prompt.

Windows stores .ppk files in its VirtualStore, thus the key is not visible in the Explorer. The VirtualStore is relative under  %USERPROFILE%\AppData\Local\VirtualStore .

Start qemu-vnc connect through a shortcut. It have run/start in the folder where it resides, thus set the shortcuts “start in location” accordingly.

/** Installation from zip file: Start  qemu-vnc connect  through the shortcut.

**/

1)
In case the config file couldn't be created automatically, it have to be created manually