Bug 1088440

Summary: Cannot sysprep Windows VM with different time zone than the one set in VM dialog / System side-tab
Product: Red Hat Enterprise Virtualization Manager Reporter: Pavel Novotny <pnovotny>
Component: ovirt-engineAssignee: Shahar Havivi <shavivi>
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Novotny <pnovotny>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 3.4.0CC: dfediuck, gklein, iheim, lpeer, mavital, michal.skrivanek, rbalakri, Rhev-m-bugs, sherold, yeylon
Target Milestone: ---Keywords: ZStream
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: virt
Fixed In Version: org.ovirt.engine-root-3.4.0-17 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1099504 (view as bug list) Environment:
Last Closed: 2015-02-17 08:26:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1099504, 1142923, 1156165    

Description Pavel Novotny 2014-04-16 15:55:18 UTC
Description of problem:
When running a sealed Windows VM with sysprep floppy attached, the sysprep.inf file always contains the general time zone defined on the VM / System side-tab, even if different TZ is set on VM / Initial Run side-tab or overriden in Run Once dialog.

Version-Release number of selected component (if applicable):
rhevm-3.4.0-0.13.beta3.el6ev.noarch (av6)

How reproducible:
100%

Steps to Reproduce:
1. Have a clean "sysprep-ed" Windows VM (I used Win 7 x64 and Win 2008 R2 x64).
2. In GUI edit the VM:
   On the System side-tab set Time Zone to "Alaskan Standard Time".
   On Initial Run side-tab check "Use Cloud-Init/Sysprep" & "Configure Time Zone" and set it to "Hawaiian Standard Time".
   Save changes.
3. Open Run Once dialog and under Initial Run section override the Time Zone to "Samoa Standard Time". Submit dialog (run once the VM).
4. Log into the VM once is up and open the sysprep.inf file on floppy drive A:. Search for value in <TimeZone> tag.


Actual results:
The TZ is always set to the general one (defined on VM / System side-tab):
<TimeZone>Alaskan Standard Time</TimeZone>

Expected results:
The TZ from Run Once dialog should be used:
<TimeZone>Samoa Standard Time</TimeZone>

Additional info:

The priorities which TZ should be put in the sysprep file is (from highest):
- TZ from Run Once dialog (if doing run once)
- TZ defined on VM / Initial Run side-tab (if "Use Cloud-Init/Sysprep" is enabled)
- TZ set on VM / System side-tab
Issue described here completely ignores the first two places.

Comment 2 Pavel Novotny 2014-05-23 09:24:10 UTC
Verified in rhevm-3.4.0-0.18.el6ev.noarch (av9).

Verification steps were the same as reproducer in comment 0:
1. Have a clean "sysprep-ed" Windows VM (I used Win 7 x64 and Win 2008 R2 x64).
2. In GUI edit the VM:
   On the System side-tab set Time Zone to "Alaskan Standard Time".
   On Initial Run side-tab check "Use Cloud-Init/Sysprep" & "Configure Time Zone" and set it to "Hawaiian Standard Time".
   Save changes.
3. Open Run Once dialog and under Initial Run section override the Time Zone to "Samoa Standard Time". Submit dialog (run once the VM).
4. Log into the VM once is up and open the sysprep.inf file on floppy drive A:. Search for value in <TimeZone> tag.

Results:
Windows guest has Samoa Standard Time zone, as is set in A:\sysprep.inf file.

Second approach was to leave the pre-defined time zone in the Run Once Dialog (Hawaiian Standard Time). This also succeeded.

Comment 3 Omer Frenkel 2015-02-17 08:26:39 UTC
RHEV-M 3.5.0 has been released