Binary package hint: virt-viewer
I'm on an up-to-date Intrepid x86_64 and have version 0.0.3-2ubuntu1 of virt-viewer installed.
I've set up a remote server (QEMU) with the following options:
vnc_listen = "0.0.0.0"
vnc_tls = 1
vnc_tls_x509_verify = 1
When I start a VM and try to connect using the following command:
$ virt-viewer -c qemu://example.com/system testimage
I get the following output:
libvir: Remote error : Cannot access client key '/etc/pki/libvirt/private/clientkey.pem': No such file or directory (2)
unable to connect to libvirt qemu://example.com/system
According to the docs I should be able to install a CA and client key/cert on a per-user basis in ~/.pki/ as ca-cert.pem, clientkey.pem and clientcert.pem respectively. The current version of virt-viewer doesn't seem to support that. I did an strace and it doesn't even look there for keys. In the following case I had a system-wide cacert installed and a user-specific key/cert installed in ~/.pki/
Here is a trace:
...
gettimeofday({1231460952, 240643}, NULL) = 0
getrusage(RUSAGE_SELF, {ru_utime={0, 8000}, ru_stime={0, 12000}, ...}) = 0
time(NULL) = 1231460952
times({tms_utime=0, tms_stime=1, tms_cutime=0, tms_cstime=0}) = 1910811171
stat64("/etc/pki/CA/cacert.pem", {st_mode=S_IFREG|0644, st_size=1716, ...}) = 0
stat64("/etc/pki/libvirt/private/clientkey.pem", 0xbf9b44dc) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libvirt.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/libvirt.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/libvirt.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/libvirt.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/libvirt.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/libvirt.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_US.UTF-8/LC_MESSAGES/libvirt.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_US.utf8/LC_MESSAGES/libvirt.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_US/LC_MESSAGES/libvirt.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en.UTF-8/LC_MESSAGES/libvirt.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en.utf8/LC_MESSAGES/libvirt.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en/LC_MESSAGES/libvirt.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "libvir: Remote error : Cannot ac"..., 120libvir: Remote error : Cannot access client key '/etc/pki/libvirt/private/clientkey.pem': No such file or directory (2)
) = 120
write(2, "unable to connect to libvirt qem"..., 61unable to connect to libvirt qemu://cloud.ucdavis.edu/system
) = 61
exit_group(2) = ?
Process 29228 detached