Take opportunity of power reset to change virtual clock behavior if applicable
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10677 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
a30b5dcc34
commit
347b5878d2
@ -328,8 +328,25 @@ sub reconfigvm {
|
||||
my $xml = shift;
|
||||
my $domdesc = $parser->parse_string($xml);
|
||||
my @bootdevs = $domdesc->findnodes("/domain/os/boot");
|
||||
my @oldbootdevs;
|
||||
my $curroffset = $domdesc->findnodes("/domain/clock")->[0]->getAttribute("offset");
|
||||
my $newoffset;
|
||||
my $needfixin=0;
|
||||
if (defined ($confdata->{vm}->{$node}->[0]->{clockoffset})) {
|
||||
#If user requested a specific behavior, give it
|
||||
$newoffset = $confdata->{vm}->{$node}->[0]->{clockoffset};
|
||||
} else {
|
||||
#Otherwise, only do local time for things that look MS
|
||||
if (defined ($confdata->{nodetype}->{$node}->[0]->{os}) and $confdata->{nodetype}->{$node}->[0]->{os} =~ /win.*/) {
|
||||
$newoffset = 'localtime';
|
||||
} else { #For everyone else, utc is preferred generally
|
||||
$newoffset = 'utc';
|
||||
}
|
||||
}
|
||||
if ($curroffset ne $newoffset) {
|
||||
$needfixin=1;
|
||||
$domdesc->findnodes("/domain/clock")->[0]->setAttribute("offset",$newoffset);
|
||||
}
|
||||
my @oldbootdevs;
|
||||
if (defined $confdata->{vm}->{$node}->[0]->{memory}) {
|
||||
$needfixin=1;
|
||||
$domdesc->findnodes("/domain/memory/text()")->[0]->setData(getUnits($confdata->{vm}->{$node}->[0]->{memory},"M",1024));
|
||||
|
Loading…
Reference in New Issue
Block a user