Bug 838595 - Missing windows specific options in run once when VM type changed from Linux
Missing windows specific options in run once when VM type changed from Linux
Status: CLOSED WONTFIX
Product: oVirt
Classification: Community
Component: ovirt-engine-core (Show other bugs)
3.1 RC
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Michal Skrivanek
virt
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-09 10:44 EDT by Michal Skrivanek
Modified: 2013-01-13 02:13 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-13 02:13:03 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Michal Skrivanek 2012-07-09 10:44:06 EDT
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 09:14:27 EDT
Michal: By "floppy" you mean "the [sysprep] floppy"?
Comment 2 Michal Skrivanek 2012-07-10 09:17:20 EDT
yeah, sysprep floppy. correct
Comment 3 Einav Cohen 2012-07-16 04:33:12 EDT
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 02:13:03 EST
Closing old bugs. If this issue is still relevant/important in current version, please re-open the bug.

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