<div dir="auto">We use the migration facilities in virt-manager extensively.<div dir="auto"><br></div><div dir="auto">Peter </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 22 Jun 2019, 00:16 Cole Robinson, <<a href="mailto:crobinso@redhat.com">crobinso@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 6/19/19 6:34 PM, Cole Robinson wrote:<br>
> Hi all,<br>
> <br>
> I've drafted a wiki page about virt-manager UI philosophy, for lack of a<br>
> better term, suggestions welcome. The intention here is to provide some<br>
> guidance about what types of things we want to expose in the UI, both to<br>
> devs, potential contributors, and users requesting RFEs.<br>
> <br>
> <a href="https://github.com/virt-manager/virt-manager/wiki/WIP-UI-philosophy" rel="noreferrer noreferrer" target="_blank">https://github.com/virt-manager/virt-manager/wiki/WIP-UI-philosophy</a><br>
<br>
Following on from the UI philosophy document, here's a list of features<br>
in current virt-manager/virt-install features that I think are<br>
candidates for removal.<br>
<br>
* virt-convert: This is not strictly about the philosophy document but<br>
I'll mention it now: virt-convert takes an ovf/ova or vmx file and spits<br>
out libvirt XML. It started as a code drop a long time ago that could<br>
translate back and forth between vmx, ovf, and virt-image, a long dead<br>
appliance format. In 2014 I converted it to do vmx -> libvirt and ovf -><br>
libvirt which was a CLI breaking change, but I never heard a peep of a<br>
complaint. It doesn't seem to do a particularly thorough job at its<br>
intended goal, I've seen 2-3 bug reports in the past 5 years and<br>
generally it doesn't seem to have any users. Let's kill it. If anyone<br>
has the desire to keep it alive it could live as a separate project<br>
that's a wrapper around virt-install but there's no compelling reason to<br>
keep it in virt-manager.git IMO<br>
<br>
* the migration wizard: migration is IMO an advanced use case. It<br>
requires host config outside of virt-manager to have a chance of<br>
working. the only place migration is really critical for users is<br>
serious multihost production scenarios where virt-manager isn't really<br>
appropriate per the UI philosophy. And besides some UI friendliness<br>
virt-manager doesn't really add much over virsh IMO. Nearly every bug I<br>
can recall about its usage was from one person who happens to be a<br>
co-worker developing qemu migration, and redhat QE, which means it's<br>
either perfect or no one uses it :) I think it should go<br>
<br>
* virInterface listing entirely. v2.0.0 removed the UI for the<br>
virInterface management. We still ask libvirt for a list of interfaces<br>
to mainly populate domain <interface> source selection: for listing<br>
bridges, and for listing all host interfaces as macvtap targets. This<br>
is still an arguably useful thing to have. However there's some issues<br>
with the current implementation of this UI:<br>
  * Our macvtap filtering is poor: we exclude some valid devices like<br>
    bonds, but include invalid devices like wlan which don't work<br>
    with macvtap<br>
  * macvtap is kinda problematic in general because it doesn't provide<br>
    out of the box host<->guest communication, and it requires a<br>
    special XML option just to get working ipv6. Users that know they<br>
    want it usually know this distinction, but if someone chooses it<br>
    without understanding the implications it can cause confusion.<br>
    This puts it hovering the intermediate/advanced user line which<br>
    makes me want to not advertise it as prominently as we currently do,<br>
    with an explicit list of host interfaces<br>
  * The default source selection is not flexible enough. If the user<br>
    has a non-empty bridge on their host virt-manager will always use<br>
    it as the default. virt-install is different: if a bridge<br>
    devices is the default route it will use that, otherwise it<br>
    uses network=default<br>
<br>
Ideally what I would change it to: drop interface listing. Make the<br>
drop down have 'Specify bridge device...' and 'Specify macvtap<br>
device...' which the user has to manually type their device into to use<br>
it. Change the default choice to match virt-install but with one key<br>
difference: if net=default does not appear to be the libvirt standard<br>
'default' net (so, NAT with an IP of 192.168.12X), then we always use<br>
'default', otherwise use the current virt-install logic. This gives<br>
users a way to override the virt-manager default. And since <network><br>
objects can support bridge, macvtap, etc, this should cover any usage<br>
someone wants for default networking. It let's us drop code, simplify<br>
the UI, make the default network choice more predictable and easier to<br>
override. It drops any potential weird behavior differences between<br>
distros due to different interface API backends. It makes it less<br>
tempting for basic/intermediate users from choosing macvtap without<br>
understanding the implications. Downsides are it becomes more work to<br>
select a bridge (in some cases) and macvtap (in all cases). I'm willing<br>
to roll the dice and see what the reaction is.<br>
<br>
* all code trying to handle libvirt lacking object events APIs. I<br>
haven't quite done the research on this one but I'm just floating it for<br>
discussion. I believe all hypervisors virt-manager supports have domain<br>
events and have had them for a long time. We still have some code paths<br>
in the app to try and handle the case when object events are not<br>
available, and if so, do regular polling intervals, and calls at various<br>
places in the code to trigger a polling refresh on demand. I think these<br>
old code paths are reasonably robust for the domain objects but still I<br>
think they are possibly never exercised.<br>
<br>
Non-domains are different. Event support has been around in libvirt<br>
since 2016 for storage and nodedevs. In the local case it<br>
doesn't matter because no one is realistically running virt-manager<br>
locally against a libvirt instance older than that. Remote case might be<br>
a bit different, someone could be managing a host with older libvirt.<br>
They could still probably get by without the event support, the app just<br>
might not be reactive to newly created objects. The place it might bite<br>
them is trying to create a new VM, the app might not notice the storage<br>
volume it just created. But I'm not sure if we really need to care about<br>
it or not...<br>
<br>
The main crux of it is that the non-event code paths are essentially<br>
untested and I don't think it's worth it to explicitly invest time in<br>
adding testing, so I'd rather be explicit and rip it out.<br>
<br>
* console scaling options (always, never, fullscreen): we've had this in<br>
the UI forever, but I don't think it has much usage. virt-viewer doesn't<br>
even expose it how we do, instead it just has a zoom option which I<br>
don't think we need to implement either. just today there was a bug<br>
reported saying that scale->always is fairly obviously broken and has<br>
been for a few releases, which makes me think no one is using it.<br>
dropping this could be part of a larger think of how console sizing<br>
works, if we should default to spice auto-resize, or if there's some<br>
more modern config we should be taking care of.<br>
<a href="https://bugzilla.redhat.com/show_bug.cgi?id=1722088" rel="noreferrer noreferrer" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=1722088</a><br>
<br>
* UI maxmem and maxcpu notions, and related memballoon and cpu hotplug<br>
operations. These have been in the UI forever but I'm not sure people<br>
actually use them. cpu hotplug has always been a mess, and unless the<br>
user plans ahead by setting a high maxmem value ballooning is only good<br>
for reducing memory. These all sound like advanced usage to me that<br>
just confuses the typical usecase of adding more mem or vcpus to an<br>
offline VM. And the hotplug operations with virsh are simple to invoke.<br>
So I'd like to drop this from the UI<br>
<br>
* graphics keymap stuff. in virtinst/hostkeymap.py we have some logic<br>
to parse host keymap from various locations like /etc/vconsole.conf and<br>
try to map it to a qemu keymap name. You can trigger this via the UI in<br>
the keymap dropdown 'Copy local keymap' and via virt-install --graphics<br>
keymap=local, though the latter isn't even documented. This all was<br>
the default behavior we used and essentially needed years ago, but<br>
qemu and spice-gtk/gtk-vnc have for a decade been able to route<br>
around the need by sending raw scancodes back and forth. This code<br>
could in theory still be valuable for someone to set the keymap to<br>
work with a vncviewer for example which doesn't have the scancode<br>
support IIRC, but I think at that point we can just ask them to specify<br>
the keymap themselves. So I propose killing hostkeymap entirely, making<br>
keymap=local print a cli warning, and drop the keymap dropdown from the<br>
UI. Users can set it in the XML editor if they need it<br>
<br>
* graphics spice tlsport UI: configuring spice tls is definitely an<br>
advanced usecase that requires external host config. tlsport is only<br>
interesting in that case. I think the XML editor is sufficient<br>
<br>
* network virtualport configuration: this is some really obscure<br>
stuff for configuring VEPA for macvtap devices. I don't think it gets<br>
any usage in practice. I think a smaller subset of this UI is shared<br>
with openswitch config but I believe it's just a single field, we<br>
could keep that even though I don't think many people use it either<br>
<br>
* disk: storage format: this was from before the days when we<br>
storage-ified everything and we could get the disk format wrong, telling<br>
qemu it has a raw image when it's qcow2. shouldn't be needed anymore for<br>
normal virt usage<br>
<br>
* disk: bus editing: maybe keep this for the customize wizard, but<br>
it should go away for existing disks, changing it for an existing VM is<br>
definitely a 'shoot yourself in the foot' type of thing for most users<br>
<br>
* disk: serial: I know this is useful in some cases but seems quite<br>
obscure. I think the XML editor is fine unless there's some common<br>
usecase I'm missing<br>
<br>
* disk: performance options: cache setting seems to be common enough<br>
that we should keep it. io threads vs native is rarely changed in<br>
my experience, our default seems good enough, so it's fine to drop.<br>
discard mode and detect zeroes I'm unsure about. they are fairly new<br>
to the UI. discard mode is definitely something people inquire about<br>
setting, I feel like we should have a discussion about whether setting<br>
this by default makes sense. detect zeroes I don't hear much<br>
about but I wonder as well if it's possible to set as a default<br>
<br>
* adding parallel devices. in practice I don't think many people even<br>
use it at the qemu level, and if they do the use case is obscure enough<br>
that they can set the XML themselves. also it's disabled in RHEL8.<br>
dropping it from the addhw UI won't actually save us much code though<br>
so I don't have strong feelings about it, but I think in practice it's<br>
just so obscure that no one is going to miss it when it's gone. And I'd<br>
like to make the UI more consistent when it comes to such things<br>
<br>
<br>
Thanks,<br>
Cole<br>
<br>
<br>
- Cole<br>
<br>
_______________________________________________<br>
virt-tools-list mailing list<br>
<a href="mailto:virt-tools-list@redhat.com" target="_blank" rel="noreferrer">virt-tools-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/virt-tools-list" rel="noreferrer noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/virt-tools-list</a><br>
</blockquote></div>