From 7b67891f42838dc81f71c81b9dea673d2c667c4c Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 10 Apr 2009 14:09:03 +0000 Subject: [PATCH] -Enable virt-viewer usage for KVM guests git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3168 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-client/share/xcat/rvid/rvid.xen | 7 +++++++ xCAT-server/lib/xcat/plugins/kvm.pm | 1 + 2 files changed, 8 insertions(+) diff --git a/xCAT-client/share/xcat/rvid/rvid.xen b/xCAT-client/share/xcat/rvid/rvid.xen index 8422e2976..82651a41c 100755 --- a/xCAT-client/share/xcat/rvid/rvid.xen +++ b/xCAT-client/share/xcat/rvid/rvid.xen @@ -1,5 +1,12 @@ #!/bin/bash # IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html +if [ ! -z $rvid_virturi -a ! -z $rvid_virtname ]; then + if [ -x /usr/bin/virt-viewer ]; then + exec /usr/bin/virt-viewer -c $rvid_virturi $rvid_virtname + else + echo "Installation of virt-viewer is recommended, falling back to vncviewer" + fi +fi myport=${rvid_vncdisplay#*:} let myport=myport-5900; export VNC_VIA_CMD='/usr/bin/ssh -o BatchMode=yes -f -L "$L":"$H":"$R" "$G" sleep 20' diff --git a/xCAT-server/lib/xcat/plugins/kvm.pm b/xCAT-server/lib/xcat/plugins/kvm.pm index e5dca72bf..4158d5252 100644 --- a/xCAT-server/lib/xcat/plugins/kvm.pm +++ b/xCAT-server/lib/xcat/plugins/kvm.pm @@ -335,6 +335,7 @@ sub getrvidparms { "server: $1", "vncdisplay: $2:$3", "virturi: ".$hypconn->get_uri(), + "virtname: $node", ); return 0,@output; } else {