Bug 838595

Summary: Missing windows specific options in run once when VM type changed from Linux
Product: [Retired] oVirt Reporter: Michal Skrivanek <michal.skrivanek>
Component: ovirt-engine-coreAssignee: Michal Skrivanek <michal.skrivanek>
Status: CLOSED WONTFIX QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.1 RCCC: acathrow, dyasny, ecohen, iheim, mgoldboi, ykaul
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: virt
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-13 07:13:03 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:

Description Michal Skrivanek 2012-07-09 14:44:06 UTC
Description of problem:
create VM as linux type and later change to windows, will not display windows specific options during run once

Version-Release number of selected component (if applicable):
3.1 as of 1.7.2012

How reproducible:
always

Steps to Reproduce:
- create a VM as Linux/Other/Unspecified type
- run it (floppy is not attached)
- it fails or you shut it down, whatever, when it's stopped just change the type to windows
- now the default is floppy not attached which is wrong in case of windows. You can override in run once, but you cannot actually store it permanently
  
Actual results:
no sysprep option in run once dialog, floppy is not attached hence guest agent not get installed

Comment 1 Einav Cohen 2012-07-10 13:14:27 UTC
Michal: By "floppy" you mean "the [sysprep] floppy"?

Comment 2 Michal Skrivanek 2012-07-10 13:17:20 UTC
yeah, sysprep floppy. correct

Comment 3 Einav Cohen 2012-07-16 08:33:12 UTC
The VM entity holds a property called "is_initialized"; once the VM is created, its "is_initialized" value is "false". 
When we run a Windows VM that has "is_initialized=false" with the regular "Run" button, we automatically run it with sysprep.
When we open the Run Once dialog in the GUI for such a VM, we automatically check the "Attach Floppy" check-box and select the "[sysprep]" item, which ensures that the sysprep process will run for this VM, as long as the user won't touch this field within the dialog.

After running the vm for the first time (any VM, with any OS, either via a regular Run or Run Once), its "is_initialized" property is automatically changed to "true", regardless of succeeding in the sysprep process: RHEV-M does't monitor the guest to see whether the sysprep process has succeeded or failed (and AFAIK, it currently doesn't even have a way to do so).

So once the user will try to run the VM for the *second* time, it will run *without* sysprep; in case the user will open the "Run Once" dialog for this VM, the "attach floppy" check-box wouldn't be checked. The user *will* be able to check it and select "[sysprep]" (assuming the "OS type" field of this VM is windows) in order to forcibly run the VM with sysprep, but he has to do it explicitly - the GUI won't do this for him automatically.

So the problem isn't really in the web-admin: The problem is that the "is_initialized" property is not reliable enough (at least regarding the sysprep process). In order to make this property reliable, we need a change in the engine-core, probably in vdsm/guest/etc. as well, in order to monitor the sysprep process -> moving component to engine-core for now.

probably not 3.1 material.

Comment 4 Itamar Heim 2013-01-13 07:13:03 UTC
Closing old bugs. If this issue is still relevant/important in current version, please re-open the bug.