Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1839398

Summary: Configuring HP type by Rest API doesn't set headless mode. In PPC arch such VM fails on start
Product: [oVirt] ovirt-engine Reporter: Polina <pagranat>
Component: BLL.VirtAssignee: Liran Rotenberg <lrotenbe>
Status: CLOSED CURRENTRELEASE QA Contact: Polina <pagranat>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.4.0CC: ahadas, bugs, michal.skrivanek, rbarry, sgratch
Target Milestone: ovirt-4.4.1Flags: pm-rhel: ovirt-4.4+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rhv-4.4.1-3 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-08 08:27:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
engine.log none

Description Polina 2020-05-23 20:52:54 UTC
Created attachment 1691378 [details]
engine.log

Description of problem: Configuring the VM with High-Performance type in UI sets automatically the 'Headless mode' in the Console tab.
If the same VM type is configured by Rest, the 'Headless mode' remains unset, i.e. VM does have the console while in the UI it will be without a console.
In PPC arch such VM could not start. 

Version-Release number of selected component (if applicable):
4.4.0-36

How reproducible:100%

Steps to Reproduce:
1.Send rest API 
PUT  url:/ovirt-engine/api/vms/d4140b58-0363-4393-afc1-ed67702b54e6
body:
<vm>
    <type>high_performance</type>
</vm>
2.Start VM 

Actual results: the VM is high-performance and with the console. In RHEL such VM could start. in PPC the attempt to start brings  "Exit message: unsupported configuration: USB is disabled for this domain, but USB devices are present in the domain XML."

Expected results: Rest API must set the high-performance VM without console (set headless mode) the same way as it is done by UI


Additional info:

Comment 2 Sharon Gratch 2020-05-27 10:33:40 UTC
(In reply to Michal Skrivanek from comment #1)
> https://github.com/oVirt/ovirt-engine/blob/master/backend/manager/modules/
> vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/builder/vminfo/
> LibvirtVmXmlBuilder.java#L999 
> 
> code should be checking for existence of the console instead of the VM type.

Not sure since headless mode doesn't necessarily always mean USB disabling. See https://github.com/oVirt/ovirt-engine/blob/30812adec04f2b4f765da87d72e2aa1dea4ef2bf/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/VmDeviceUtils.java#L773

Total USB disabling is done only for HP VMs with UsbPolicy set to DISABLED (which is auto set for HP VMs). For all other headless VMs that are not HP, USB is still enabled.

Comment 3 Polina 2020-06-25 14:57:46 UTC
verified on ovirt-engine-4.4.1.5-0.17.el8ev.noarch

Comment 4 Sandro Bonazzola 2020-07-08 08:27:27 UTC
This bugzilla is included in oVirt 4.4.1 release, published on July 8th 2020.

Since the problem described in this bug report should be resolved in oVirt 4.4.1 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.