Bug 2074484

Summary: [RFE] Provide an API interface to change the display adapter of a VM (QXL/VGA)
Product: Red Hat Enterprise Virtualization Manager Reporter: Juan Orti <jortialc>
Component: ovirt-engineAssignee: Nobody <nobody>
Status: CLOSED DUPLICATE QA Contact: meital avital <mavital>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.4.10CC: ahadas, michal.skrivanek
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-23 12:01:15 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:

Description Juan Orti 2022-04-12 10:32:06 UTC
Currently it is not possible to change the display adapter of a VM from QXL to VGA using the REST API. I've seen that the adapter type is controlled by the database field 'vm_static.default_display_type' but there's no interface in the API to modify it.

This RFE is to request a way to configure the display adapter type from the REST API.

Comment 2 Arik 2022-04-19 15:54:38 UTC
This was discussed in the past and the conclusion was not to expose that field at the API layer because it may lead to, arguably, questionable behavior - for example, let's say that you have a vm with SPICE+VNC, and we get a request to change QXL to VGA - should we reject that request or not?

The alternative is to set the blank template with the right video device - if QXL cannot be used, change it to VGA+VNC.
Then, new VMs won't be set with QXL on the first place.
When picking operating system type with special constraints, we take those into consideration when setting the default display type.

Comment 3 Michal Skrivanek 2022-05-19 08:17:17 UTC
wouldn't it be easier (for everybody) to just add that field after all? Invalid combinations would be rejected of course, but for the valid ones it greatly simplifies the usage.

Comment 4 Arik 2022-05-19 08:36:35 UTC
(In reply to Michal Skrivanek from comment #3)
> wouldn't it be easier (for everybody) to just add that field after all?
> Invalid combinations would be rejected of course, but for the valid ones it
> greatly simplifies the usage.

And keep the blank template with spice and vnc?

Comment 5 Michal Skrivanek 2022-05-19 10:48:58 UTC
I wouldn't touch Blank, just offer a simple way of overriding "video" and ideally also "graphics". Worst case even just the "video" part would be helpful.

Comment 6 Arik 2022-05-23 12:01:15 UTC
We planned to drop QXL
Even if we don't get to do this, we still want to default to VGA/BOCHS instead of QXL - and that's tracked in bz 1976607
Once we do that, we will have no reason to support setting VNC+QXL (because QXL can be selected when specifying SPICE)

The problem with doing what is requested here is that it goes against the principle of REST-API

*** This bug has been marked as a duplicate of bug 1976607 ***