From 9b44d29b504d2471b00f74737d5fad0f7df2e227 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Tue, 3 May 2011 13:21:18 +0000 Subject: [PATCH] Copy in existing graphics device info as much as possible to avoid config mismatch on temporary password change git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9471 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/kvm.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/kvm.pm b/xCAT-server/lib/xcat/plugins/kvm.pm index c305ad605..b9838555e 100644 --- a/xCAT-server/lib/xcat/plugins/kvm.pm +++ b/xCAT-server/lib/xcat/plugins/kvm.pm @@ -673,9 +673,16 @@ sub getcons { $sconsparms->{node}->[0]->{baudrate}=[$serialspeed]; return (0,$sconsparms); } elsif ($type eq "vid") { + my $domxml = $dom->get_xml_description(); + my $parseddom = $parser->parse_string($domxml); + my ($graphicsnode) = $parseddom->findnodes("//graphics"); + my $tpasswd=genpassword(16); my $validto=POSIX::strftime("%Y-%m-%dT%H:%M:%S",gmtime(time()+300)); - $dom->update_device(""); + $graphicsnode->setAttribute("passwd",$tpasswd); + $graphicsnode->setAttribute("passwdValidTo",$validto); + $dom->update_device($graphicsnode->toString()); + #$dom->update_device(""); $consdata->{password}=$tpasswd; $consdata->{server}=$hyper; return $consdata;