2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 09:13:08 +00:00

fix missing graphics label (#3892)

This commit is contained in:
Yuan Bai 2017-09-11 17:33:02 +08:00 committed by yangsong
parent c3fc0a5a26
commit 7fdffddf9b

View File

@ -1397,12 +1397,14 @@ sub makedom {
}
my $parseddom = $parser->parse_string($xml);
my ($graphics) = $parseddom->findnodes("//graphics");
if ($confdata->{vm}->{$node}->[0]->{vidpassword}) {
$graphics->setAttribute("passwd", $confdata->{vm}->{$node}->[0]->{vidpassword});
} else {
$graphics->setAttribute("passwd", genpassword(20));
if (defined($graphics)) {
if ($confdata->{vm}->{$node}->[0]->{vidpassword}) {
$graphics->setAttribute("passwd", $confdata->{vm}->{$node}->[0]->{vidpassword});
} else {
$graphics->setAttribute("passwd", genpassword(20));
}
$graphics->setAttribute("listen", '0.0.0.0');
}
$graphics->setAttribute("listen", '0.0.0.0');
$xml = $parseddom->toString();
eval {
if ($::XCATSITEVALS{persistkvmguests}) {