Bug 834254 - [rhevm-webadmin] - Failed to Create new Pool of RHEL VMs on the case of USB support on "Legacy" and this cannot be changed
Summary: [rhevm-webadmin] - Failed to Create new Pool of RHEL VMs on the case of USB s...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Asaf Shakarchi
QA Contact: David Botzer
URL:
Whiteboard: virt
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-21 10:58 UTC by David Botzer
Modified: 2014-01-14 00:03 UTC (History)
12 users (show)

Fixed In Version: si16
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-04 20:04:35 UTC
oVirt Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
USB-legacy-by-default (48.91 KB, image/png)
2012-06-21 10:58 UTC, David Botzer
no flags Details
engine-log (702.74 KB, application/octet-stream)
2012-06-21 11:00 UTC, David Botzer
no flags Details

Description David Botzer 2012-06-21 10:58:44 UTC
Created attachment 593416 [details]
USB-legacy-by-default

Description of problem:
Failed to Create new Pool of RHEL VMs on the case of --> Protocal "Spice", USB support on "Legacy" and this cannot be changed = Disbaled

Version-Release number of selected component (if applicable):
rhem 3.1 /si6

How reproducible:
always

Steps to Reproduce:
1.Create new DC30
2.Add RHEL Template
3.Create new Pool of VMs from this template
  
Actual results:
Fail to create pool, and cannot change the USB support (Its greyed out)

Expected results:
Should set the correct value in order to create the pool correctly

Additional info:
2012-06-21 13:53:15,999 WARN  [org.ovirt.engine.core.bll.AddVmAndAttachToPoolCommand] (pool-3-thread-49) [5e2f011e] CanDoAction of action AddVmAndAttachToPool failed. Reasons:VAR__ACTION__ADD,VAR__TYPE__VM,USB_LEGACY_NOT_SUPPORTED_ON_LINUX_VMS

Comment 1 David Botzer 2012-06-21 11:00:04 UTC
Created attachment 593417 [details]
engine-log

Comment 2 David Botzer 2012-06-21 11:02:13 UTC
workaround - 
Change Spice to VNC than return to spice = disabled

Comment 3 Einav Cohen 2012-07-05 13:03:50 UTC
David, it seems that you somehow managed to create a RHEL template with "Legacy" USB support. This isn't possible via rhevm 3.1 AFAIK.
We are going to need exact steps to reproduce, specifically for step 2 ("Add RHEL Template"). Can you please provide them?

Comment 4 Asaf Shakarchi 2012-07-05 15:06:39 UTC
This situation may occur if you have a VM or Template with Linux OS type and Legacy USB support,

This is not a supported configuration but we allowed it in previous versions,

The correct fix for this problem is to change USB Policy of Linux VMs/Templates with 'Legacy' support to 'disabled' in the upgrade script.


Andrew, can you ack this solution ?

Comment 5 Asaf Shakarchi 2012-07-08 11:20:44 UTC
Patch submitted:

http://gerrit.ovirt.org/#/c/6037/

Comment 6 Einav Cohen 2012-07-08 16:08:53 UTC
David: see my question from comment #3: If you got to a situation in which you have a VM/Template with Linux OS-Type and "Legacy" usb-support, we need to know the exact steps to reproduce it, just to make sure that we are not missing anything.

Comment 7 David Botzer 2012-07-09 06:07:33 UTC
1. I imported shared_iso Domain (NFS/ISO)
tiger:/.../shared_iso_domain

2. I created new Server and "run-once" to install RHEL6 VM
This Server had Console=spice/USB disabled !!

3. I created template from this server with its default parameters (seems to me that Console=Spice/USB Legacy Enabled)
4. I created template out of this VM/Server

Moving on -->

Using the RHEL Templates created on the 3.1 SI build / 
1. I exported these templates to an NFS Export Domain.
2. For any new 3.1 setup I import this NFS Domain 10.16.x.x:/home/ISO/botzer3_1
   And use the templates found on it (RHEL6 & WinXP)

* Could it be that this template (with USB Support) was created on one of the builds of 3.1 that allowed this to happen ?

Comment 8 David Botzer 2012-07-09 06:09:03 UTC
Could be SI4

Comment 9 Einav Cohen 2012-07-16 07:52:33 UTC
(In reply to comment #7)
> 1. I imported shared_iso Domain (NFS/ISO)
> tiger:/.../shared_iso_domain
> 
> 2. I created new Server and "run-once" to install RHEL6 VM
> This Server had Console=spice/USB disabled !!
> 
> 3. I created template from this server with its default parameters (seems to
> me that Console=Spice/USB Legacy Enabled)

This is the part that I don't understand:
- The Virtual Server had Console=spice, USB *disabled*.
- When you created a new template from this virtual server, it had Console=spice and USB *Legacy (enabled)*, which seems like a bug to me. 
Is this really what happens?
Can you reproduce it on one of the latest SI builds?

> 4. I created template out of this VM/Server
> 
> Moving on -->
> 
> Using the RHEL Templates created on the 3.1 SI build / 

- Which SI?
- I didn't quite understand the differentiation between the part above "Moving on -->" and the part below "Moving on -->"...

> 1. I exported these templates to an NFS Export Domain.
> 2. For any new 3.1 setup I import this NFS Domain
> 10.16.x.x:/home/ISO/botzer3_1
>    And use the templates found on it (RHEL6 & WinXP)
> 
> * Could it be that this template (with USB Support) was created on one of
> the builds of 3.1 that allowed this to happen ?

Yes, this could be. It seems that we need to take care of import VMs/Templates as well (not only upgrade).

Comment 10 David Botzer 2012-07-16 08:12:42 UTC
This is the part that I don't understand:
- The Virtual Server had Console=spice, USB *disabled*.
- When you created a new template from this virtual server, it had Console=spice and USB *Legacy (enabled)*, which seems like a bug to me. 
Is this really what happens?
Can you reproduce it on one of the latest SI builds?
----
will try to reproduce on si10
---------------------------------------
- Which SI? - I think its si4 (ISO was created 23/5)
- I didn't quite understand the differentiation between the part above "Moving on -->" and the part below "Moving on -->"...
just means continue to next part...
1. Creating the template procedure && using it
--------------------------------------------------------------

Comment 11 Einav Cohen 2012-07-16 08:54:12 UTC
(In reply to comment #10)
> This is the part that I don't understand:
> - The Virtual Server had Console=spice, USB *disabled*.
> - When you created a new template from this virtual server, it had
> Console=spice and USB *Legacy (enabled)*, which seems like a bug to me. 
> Is this really what happens?
> Can you reproduce it on one of the latest SI builds?
> ----
> will try to reproduce on si10
> ---------------------------------------

Please cancel the "needinfo" once you have an answer. Thanks.

Comment 12 David Botzer 2012-07-16 08:58:45 UTC
I used SI10,
------------
first of all - The RHEL6 Template I have consist of USB-Policy=Enabled - not sure when it was created
And
!! Currently at SI10, I cannot create a RHEL6 VM with SPICE/Legacy - so i cannot test to see how the template turns out
--------
Cannot reproduce the below request:
===
- The Virtual Server had Console=spice, USB*disabled*.
- When you created a new template from this virtual server, it had
Console=spice and USB *Legacy (enabled)*, which seems like a bug to me.
Is this really what happens?
===
1. I created RH6 VM with USB=disabled -> Exported it to template (which kept the USB=disabled)
    Than i create a vm out of this template and USB=disabled OK 
============

Comment 13 Einav Cohen 2012-07-16 13:06:06 UTC
(In reply to comment #12)
> I used SI10,
> ------------
> first of all - The RHEL6 Template I have consist of USB-Policy=Enabled - not
> sure when it was created
> And
> !! Currently at SI10, I cannot create a RHEL6 VM with SPICE/Legacy - so i
> cannot test to see how the template turns out

- The fact that you cannot create a Linux VM with SPICE/Legacy is good; indeed, the system should prevent you from doing this.

- VMs/Templates such as your RHEL 6 Templates (i.e. Linux VMs/Templates with usb_policy != disabled) shouldn't exist in the system: 

   - You cannot create such VMs/Templates within the system (you said so yourself)

   - upgrade from 3.0: already taken care of by http://gerrit.ovirt.org/#/c/6037/

   - Import: should be taken care of (see the last part of my comment #9).

----

* Note: When verifying this bug (once it moves to ON_QA), you should actually verify that Linux VMs and/or Templates with usb_policy != disabled don't exist in the system and cannot be created within the system; new/edit/import/upgrade *from 3.0 only* should be checked in order to verify that.

Comment 21 Asaf Shakarchi 2012-07-25 11:24:20 UTC
Patch submitted: http://gerrit.ovirt.org/#/c/6612/

Comment 22 Asaf Shakarchi 2012-07-30 11:45:59 UTC
Committed: [a237d0af1586490c2] [7c841a2fa79ede8e]

Comment 23 David Botzer 2012-08-06 12:14:45 UTC
Fixed 3.1;si13.1
===========================================
I created a new pool using the template I imported (Linux) from my nfs EXP domain,
- template previously created with : Protocol Spice, USB Support=legacy 

- The Console Option properties are changeable (Enabled), but I left them as they are = console USB support=Legacy
-selected 1 VM to be created, and pressed OK

An empty pool is created and the VM creation is failed.

When I edit the pool I cannot revert the Console properties, I can only add VMs

Comment 24 David Botzer 2012-08-06 12:25:29 UTC
sorry
Not Fixed 3.1;si13.1

Comment 25 David Botzer 2012-08-07 10:30:25 UTC
tested with Asaf, SI13.1
we Should fix the Import Template command, in order not to have  USB Support=legacy in it.

Comment 26 Asaf Shakarchi 2012-08-14 12:17:20 UTC
Patch submitted:
http://gerrit.ovirt.org/#/c/7138/

Comment 28 David Botzer 2012-09-02 12:15:07 UTC
Fixed, 3.1/si16
Creating a RHEL VM pool shows correct info for console ->
                                     USB support=Disabled
And pool is created successfully
Fixed, 3.1/si16


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