Red Hat Bugzilla – Bug 838595
Missing windows specific options in run once when VM type changed from Linux
Last modified: 2013-01-13 02:13:03 EST
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
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
no sysprep option in run once dialog, floppy is not attached hence guest agent not get installed
Michal: By "floppy" you mean "the [sysprep] floppy"?
yeah, sysprep floppy. correct
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.
Closing old bugs. If this issue is still relevant/important in current version, please re-open the bug.