[virt-tools-list] [PATCH virt-manager 04/14] support: Add SUPPORT_CONN_DEVICE_BOOT_ORDER
Marc Hartmayer
mhartmay at linux.ibm.com
Thu Mar 7 07:50:49 UTC 2019
On Wed, Mar 06, 2019 at 07:55 PM +0100, Cole Robinson <crobinso at redhat.com> wrote:
> On 2/26/19 5:10 AM, Marc Hartmayer wrote:
>> On Tue, Feb 26, 2019 at 10:56 AM +0100, Marc Hartmayer <mhartmay at linux.ibm.com> wrote:
>>> ...and use it in domain.py.
>>>
>>> Signed-off-by: Marc Hartmayer <mhartmay at linux.ibm.com>
>>> Reviewed-by: Boris Fiuczynski <fiuczy at linux.ibm.com>
>>> ---
>>> virtManager/domain.py | 3 ++-
>>> virtinst/support.py | 3 +++
>>> 2 files changed, 5 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/virtManager/domain.py b/virtManager/domain.py
>>> index 324621de9fa4..eef1661b841a 100644
>>> --- a/virtManager/domain.py
>>> +++ b/virtManager/domain.py
>>> @@ -17,6 +17,7 @@ from virtinst import Guest
>>> from virtinst import util
>>> from virtinst import DeviceController
>>> from virtinst import DeviceDisk
>>> +from virtinst import support
>>>
>>> from .libvirtobject import vmmLibvirtObject
>>> from .libvirtenummap import LibvirtEnumMap
>>> @@ -1230,7 +1231,7 @@ class vmmDomain(vmmLibvirtObject):
>>>
>>> def can_use_device_boot_order(self):
>>> # Return 'True' if guest can use new style boot device ordering
>>> - return self.conn.is_qemu() or self.conn.is_test()
>>> + return self.conn.check_support(support.SUPPORT_CONN_DEVICE_BOOT_ORDER)
>>>
>>> def get_bootable_devices(self):
>>> # redirdev can also be marked bootable, but it should be rarely
>>> diff --git a/virtinst/support.py b/virtinst/support.py
>>> index 0f0f6104b32d..a6aabc1f5d2d 100644
>>> --- a/virtinst/support.py
>>> +++ b/virtinst/support.py
>>> @@ -266,6 +266,9 @@ SUPPORT_CONN_USB3_PORTS = _make(version="1.3.5")
>>> SUPPORT_CONN_MACHVIRT_PCI_DEFAULT = _make(version="3.0.0")
>>> SUPPORT_CONN_QEMU_XHCI = _make(version="3.3.0", hv_version={"qemu": "2.9.0"})
>>> SUPPORT_CONN_VNC_NONE_AUTH = _make(hv_version={"qemu": "2.9.0"})
>>> +# since 0.4.6... but 0.7.9 is the allowed minimum
>>> +SUPPORT_CONN_DEVICE_BOOT_ORDER = _make(version="0.7.9",
>>> + hv_version={"qemu": 0, "test":
>>> 0})
>>
>> Here are probably many other hypervisors missing… Which hypervisors are
>> supported by virt-manager? The same as for libvirt?
>>
>
> In theory the same as for libvirt, VM listing and lifecycle operations
> should work for every driver. XML editing/building is a different story.
> qemu, xen, lxc, test driver should be in good shape. bhyve and vz too
> but I don't have a setup to test those. Anything else is suspect
>
> From looking at libvirt code, seems like bhyve and vz do have references
> to bootIndex, but nothing for xen or lxc.
>
> That said this check is used to determine what boot options we show in
> the UI and what boot XML we use if the user edits the boot order. If we
> are wrong about this check, it can completely prevent users from
> changing boot order for their VMs or even completely screwing up their
> config in a way that requires manual intervention. So until someone
> shows up with a complaint about bhyve or vz and an offer to test, I
> don't want to change this based on libvirt code inspection. End result
> is that check is accurate
>
> That reference to libvirt 0.7.9 is bogus though but I see you were lead
> to that from a code check... git blame digging tells me that I fudged
> the version number and it should be warning about 0.7.3. I added a
> pre-patch to fix that, and then edited this patch to drop the comment
> and the version entirely, I'll be bumping the minimum libvirt version
> before the next release so it will go eventually anyways.
>
> I added a follow on patch to remove the support check from cli.py too,
> since the libvirt inspection suggests other drivers support boot_order I
> don't want to block them on virt-install and virt-xml, just protect
> the UI.
I’m fine with the changes =)
>
> I pushed your series with those changes. Nice work, especially thanks
> for all the tests!
Thanks!
>
> - Cole
>
--
Kind regards / Beste Grüße
Marc Hartmayer
IBM Deutschland Research & Development GmbH
Vorsitzende des Aufsichtsrats: Matthias Hartmann
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294
More information about the virt-tools-list
mailing list