[PVE-User] KVM server: connect to VNC console without Java applet?
Daniel Pittman
daniel at rimspace.net
Mon Jun 28 14:33:10 CEST 2010
Flavio Stanchina <flavio.stanchina at ies.it> writes:
> Daniel Pittman wrote:
>
>> Honestly, if you want to solve the problem it would be better to write a
>> tiny little bit of Perl code that configures a dynamic VNC listener between
>> the KVM or OpenVZ socket and the guest.
>>
>> Then you can use the existing, fully functional VNC clients out there to
>> talk to the server without needing to do anything special.
>
> +1. I was going to ask the same thing. And it would be great if one could
> also put a password on it, so I could give console access to a VM to some
> users without giving them the root password.
FWIW, I found that the 'ssvncviewer' tool supports most of what I needed to
make this work for me:
password=$(/usr/bin/apg -Mncl -n1 -q)
remote="/usr/bin/ssh -T '$1' '/usr/bin/sudo -- /usr/sbin/qm vncproxy $2 $password'"
echo "$password" | /usr/bin/ssvncviewer -autopass -x11cursor exec="${remote}"
You need to make sure, obviously, that you can run /usr/sbin/qm without a
password prompt from sudo; I use the hack of running /bin/true first, but a
friendlier sysadmin[1] might let you have that with the 'vncproxy' argument
without a password...
Daniel
Footnotes:
[1] ...technically, since I run the infrastructure stuff, this is my own
fault. :)
--
✣ Daniel Pittman ✉ daniel at rimspace.net ☎ +61 401 155 707
♽ made with 100 percent post-consumer electrons
More information about the pve-user
mailing list