diff --git a/perl-xCAT/xCAT/Schema.pm b/perl-xCAT/xCAT/Schema.pm index 5809a5902..0dd16b482 100644 --- a/perl-xCAT/xCAT/Schema.pm +++ b/perl-xCAT/xCAT/Schema.pm @@ -39,7 +39,7 @@ use xCAT::ExtTab; #New format, not sql statements, but info enough to describe xcat tables %tabspec = ( vm => { - cols => [qw(node host migrationdest storage memory cpus nics bootorder virtflags vncport textconsole beacon comments disable)], + cols => [qw(node host migrationdest storage memory cpus nics bootorder clockoffset virtflags vncport textconsole beacon comments disable)], keys => [qw(node)], table_desc => 'Virtualization parameters', descriptions => { @@ -51,6 +51,7 @@ vm => { 'cpus' => 'Number of CPUs the node should see.', 'nics' => 'Network configuration parameters', 'bootorder' => 'Boot sequence (i.e. net,hd)', + 'clockoffset' => 'Whether to have guest RTC synced to "localtime" or "utc" If not populated, xCAT will guess based on the nodetype.os contents.', 'virtflags' => 'General flags used by the virtualization method. For example, in Xen it could, among other things, specify paravirtualized setup, or direct kernel boot. For a hypervisor/dom0 entry, it is the virtualization method (i.e. "xen")', 'vncport' => 'Tracks the current VNC display port (currently not meant to be set', 'textconsole' => 'Tracks the Psuedo-TTY that maps to the serial port or console of a VM', diff --git a/xCAT-server/lib/xcat/plugins/kvm.pm b/xCAT-server/lib/xcat/plugins/kvm.pm index 8a818c53a..d9f393d6f 100644 --- a/xCAT-server/lib/xcat/plugins/kvm.pm +++ b/xCAT-server/lib/xcat/plugins/kvm.pm @@ -246,10 +246,16 @@ sub build_xmldesc { } else { $xtree{vcpu}->{content}=1; } - if (defined ($nthash->{$node}->[0]->{os}) and $nthash->{$node}->[0]->{os} =~ /win.*/) { - $xtree{clock}->{offset}='localtime'; + if (defined ($vmhash->{$node}->[0]->{clockoffset})) { + #If user requested a specific behavior, give it + $xtree{clock}->{offset}=$vmhash->{$node}->[0]->{clockoffset}; } else { - $xtree{clock}->{offset}='utc'; + #Otherwise, only do local time for things that look MS + if (defined ($nthash->{$node}->[0]->{os}) and $nthash->{$node}->[0]->{os} =~ /win.*/) { + $xtree{clock}->{offset}='localtime'; + } else { #For everyone else, utc is preferred generally + $xtree{clock}->{offset}='utc'; + } } $xtree{features}->{pae}={};