Feature #2547

Support libvirt "localtime" parameter for Windows KVM guest template

Added by Vladislav Gorbunov over 7 years ago. Updated over 7 years ago.

Status:ClosedStart date:12/09/2013
Priority:NormalDue date:
Assignee:Javi Fontan% Done:

0%

Category:Core & System
Target version:Release 4.6
Resolution:fixed Pull request:

Description

The guest clock is typically initialized from the host clock. Most operating systems expect the hardware clock to be kept in UTC, and this is the default. Windows, however, expects it to be in so called 'local time'.
This path is add boolean options LOCALTIME to section FEATURES on KVM template like this:
FEATURES=[
...
LOCALTIME="yes",
...
]
In libvirt xml this parameter must be outside section <features>.
<featues>
...
<featues>
<clock offset='localtime'/>

http://libvirt.org/formatdomain.html#elementsTime

localtime.diff Magnifier (1.17 KB) Vladislav Gorbunov, 12/09/2013 08:13 AM

Associated revisions

Revision f9c6ac38
Added by Vladislav Gorbunov over 7 years ago

feature #2547: add localtime feature to kvm

Signed-off-by: Javi Fontan <>

Revision 859a8590
Added by Javi Fontan over 7 years ago

feature #2547: add localtime feature to Xen

Revision 2e1aba52
Added by Javi Fontan over 7 years ago

feature #2547: add localtime to the template wizard

History

#1 Updated by Rolandas Naujikas over 7 years ago

It could be solved with

RAW=[TYPE="kvm",DATA="<clock offset='localtime'/>"]

in VM template.

#2 Updated by Vladislav Gorbunov over 7 years ago

Raw parameters broken in Sunstone 4.4. How to reproduce:
Update VM Template, Open Advanced mode, enter
RAW=[TYPE="kvm",DATA="<clock offset='localtime'/>"]
Press Update
template update correctly. Now open template update again, open Wizard tab and go to Other row. It's show:
RAW Data, type KVM
DATA:
<clock offset='localtime'/>

Any updates on the Sunstone Wizard tab broke raw data. Localtime is very important for Windows guests and should be as a separate parameter. Localtime is separate parameter in proxmox and ganeti.

#3 Updated by Vladislav Gorbunov over 7 years ago

Sorry, lost some symbols in previous message.

Raw parameters broken in Sunstone 4.4. How to reproduce:
Update VM Template, Open Advanced mode, enter
RAW=[TYPE="kvm",DATA="<clock offset='localtime'/>"]
Press Update
template update correctly. Now open template update again, open Wizard tab and go to Other row. It's show:
RAW Data, type KVM
DATA:
&lt;clock offset='localtime'/&gt;

Any updates on the Sunstone Wizard tab broke raw data. Localtime is very important for Windows guests and should be as a separate parameter. Localtime is separate parameter in proxmox and ganeti.

#4 Updated by Rolandas Naujikas over 7 years ago

That is another bug. You can correct RAW data in advanced mode.

#5 Updated by Daniel Molina over 7 years ago

Hi Vladislav, this patch should fix the update problem:

diff --git a/src/sunstone/public/js/plugins/templates-tab.js b/src/sunstone/public/js/plugins/templates-tab.js
index bf57827..47f95b6 100644
--- a/src/sunstone/public/js/plugins/templates-tab.js
+++ b/src/sunstone/public/js/plugins/templates-tab.js
@@ -4922,8 +4922,8 @@ function fillTemplatePopUp(request, response){

         $('#raw_type', raw_section).val(raw['TYPE']);
         $('#raw_type', raw_section).change();
-        $('#raw_data', raw_section).val(raw['DATA']);
-        $('#raw_data_vmx', raw_section).val(raw['DATA_VMX']);
+        $('#raw_data', raw_section).val(htmlDecode(raw['DATA']));
+        $('#raw_data_vmx', raw_section).val(htmlDecode(raw['DATA_VMX']));

         delete template.RAW
     }

#6 Updated by Ruben S. Montero over 7 years ago

  • Target version changed from Release 4.4 to Release 4.6

#7 Updated by Ruben S. Montero over 7 years ago

  • Status changed from Pending to New

#8 Updated by Ruben S. Montero over 7 years ago

For Xen this is:

localtime
Is RTC set to localtime?
Localtime (Default=0; Value='no|yes')

Vmware - libvirt driver does not support this, so we need to use VIX API for this.

#9 Updated by Javi Fontan over 7 years ago

  • Status changed from New to Closed
  • Assignee set to Javi Fontan
  • Resolution set to fixed

Also available in: Atom PDF