Bug 1123809 - [Admin Portal] Import Windows VM fails - Error while executing action: Cannot import VM. Invalid time zone for given OS type.
Summary: [Admin Portal] Import Windows VM fails - Error while executing action: Cannot...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-core
Version: 3.5
Hardware: Unspecified
OS: Unspecified
high
urgent
Target Milestone: ---
: 3.5.0
Assignee: Martin Betak
QA Contact: Pavel Novotny
URL:
Whiteboard: virt
: 1110807 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-28 10:06 UTC by Jiri Belka
Modified: 2016-02-10 19:51 UTC (History)
8 users (show)

Fixed In Version: ovirt-3.5.0_rc2
Clone Of:
Environment:
Last Closed: 2014-10-17 12:38:49 UTC
oVirt Team: Virt
Embargoed:


Attachments (Terms of Use)
engine.log, vdsm.log (816.20 KB, application/x-gzip)
2014-07-28 10:06 UTC, Jiri Belka
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 31632 0 master MERGED backend: Fix timezone on import of Windows VMs Never
oVirt gerrit 31972 0 ovirt-engine-3.5 MERGED backend: Fix timezone on import of Windows VMs Never

Description Jiri Belka 2014-07-28 10:06:15 UTC
Created attachment 921747 [details]
engine.log, vdsm.log

Description of problem:

Cannot import *any* Windows VM from export domain which were exported in older RHEVM. For the test itself I did clean 'ttttt' Windows 7 VM on RHEVM 3.4 env.

~~~
Operation Canceled
Error while executing action: Cannot import VM. Invalid time zone for given OS type.
~~~

When VDSM was scanning export domain I sees there is _NO_ value for TimeZone...

~~~
...snip...
tDate>2013/06/05 12:45:34</ExportDate><IsAutoSuspend>false</IsAutoSuspend><DeleteProtected>false</DeleteProtected><IsSmartcardEnabled>false</IsSmartcardEnabled><TimeZone></TimeZone><default_boot_sequence>0</default_boot_sequence><Generation>4</Generation><VmType>1</VmType><MinAllocatedMem>
...snip...
~~~

.ovf file itself does not have the value...

~~~
...snip...
<Content ovf:id="out" xsi:type="ovf:VirtualSystem_Type"><Description></Description><CreationDate>2014/07/28 09:25:30</CreationDate><ExportDate>2014/07/28 09:26:22</ExportDate><DeleteProtected>false</DeleteProtected><SsoMethod>guest_agent</SsoMethod><IsSmartcardEnabled>false</IsSmartcardEnabled><TimeZone></TimeZone><default_boot_sequence>0</default_boot_sequence><Generation>2</Generation><VmType>0</VmType><MinAllocatedMem>1024</MinAllocatedMem><IsStateless>false</IsStateless><IsRunAndPause>false</IsRunAndPause><AutoStartup>false</AutoStartup><Priority>1</Priority><CreatedByU
...snip...
~~~

Surprisingly I could export/import the VM in RHEVM 3.4. Thus handling of TimeZone changed in oVirt 3.5 and this prevents the import.

~~~
2014-07-28 11:32:17,845 WARN  [org.ovirt.engine.core.bll.ImportVmCommand] (ajp--127.0.0.1-8702-3) [378624b5] CanDoAction of action ImportVm failed. Reasons:VAR__ACTION__IMPORT,VAR__TYPE__VM,ACTION_TYPE_FAILED_INVALID_TIMEZONE
~~~

IMHO if TZ is empty by mistake/bug, it should be set to default of engine environment.

If I would able to edit ovf file (BZ1080901) I suppose I could work around this invalid TZ issue. But that's not the case thus I have just useless export domain with many VMs :/

Version-Release number of selected component (if applicable):
vdsm-4.16.0-42.git3bfad86.el6.x86_64

How reproducible:
100% (for me at least)

Steps to Reproduce:
1. create clean Win 7 VM and export it on rhevm-3.4.1-0.30.el6ev.noarch/vdsm-4.14.7-5.el6ev.x86_64
2. try to import the VM on oVirt 3.5 (see versions above)
3.

Actual results:
not possible because TZ issue

Expected results:
should work

Additional info:

Comment 1 Martin Betak 2014-08-20 12:46:25 UTC
*** Bug 1110807 has been marked as a duplicate of this bug. ***

Comment 2 Pavel Novotny 2014-10-03 14:50:05 UTC
Verified in downstream in rhevm-3.5.0-0.13.beta.el6ev.noarch (vt4).

Verification steps:
1. Have an exported VM from 3.4 with empty time zone:
- while VDSM scans the export domain, there is no value in the <TimeZone/> tag:
-~-
...<CreationDate>2013/10/08 13:16:24</CreationDate><ExportDate>2013/10/08 15:34:11</ExportDate><DeleteProtected>false</DeleteProtected><IsSmartcardEnabled>false</IsSmartcardEnabled><TimeZone></TimeZone><default_boot_sequence>0</default_boot_sequence>...
-~-

2. Import the VM.

Result:
VM is successfully imported. The VM time zone is set to engine-default (GMT+00:00 by default).

Comment 3 Sandro Bonazzola 2014-10-17 12:38:49 UTC
oVirt 3.5 has been released and should include the fix for this issue.


Note You need to log in before you can comment on or make changes to this bug.