The new format is too long and wordy IMO. It was added to handle
qemu-vdagent ambiguity, since without it we would print the same string
for spicevmc and qemu-vgagent channel. Let's just special case
qemu-vdagent to solve that problem
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This provides the UI support for the qemu-vdagent channel which allows
clipboard sharing with VNC graphics (see previous commit for more
information).
The channel name in the device list was changed slightly in order to
avoid confusion. Due to the fact that both the spice-vdagent and the
qemu-vdagent specify the same virtio name (com.redhat.spice.0), both of
these channels were showing up in the device list as "Channel spice",
which is a bit confusing.
In order to disambiguate these, channels now show up in the device list
as "Channel {type} ({name})" instead of "Channel {name}". So for
example, a qemu-vdagent channel would show up as:
Channel Qemu vdagent (spice)
Whereas a spice-vdagent channel would show up as:
Channel Spice agent (spice)
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
This is the only one that we get notified when the XML changes,
so it's the only one we can be certain is up to date. Users have
gotten confused about out of date spice info here:
https://bugzilla.redhat.com/show_bug.cgi?id=2027867
Signed-off-by: Cole Robinson <crobinso@redhat.com>
- Remove most use of deprecated stock icons. Without it the UI will
be a lot more ugly in Fedora 36
- Remove deprecated ImageMenuItem usage, convert to regular MenuItem
- Remove most embedded button images
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Split out tpmdetails.py, following the pattern of fsdetails.py. This
adds more UI editing fields for an already attached TPM.
Move the model and version under an 'Advanced options' expander,
since we should be getting this correct by default.
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Adjust the UI to leave the box checked for both host-model and
host-passthrough, but host-passthrough is now what it means when
the user selects it. host-model can still be selected via the
CPU model drop down list
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Let users choose libvirt's os.firmware=efi setting in the UI, putting
it about the firmware path list, since it's the preferred default
these days.
Signed-off-by: Cole Robinson <crobinso@redhat.com>
<os firmware='efi'> is the libvirt official way to do what we
historically implement with `--boot uefi`, and UEFI setup in
virt-manager.
Let's prefer libvirt's official method if the support is advertised
in domcapabilities.
Signed-off-by: Cole Robinson <crobinso@redhat.com>
I removed Portgroup UI in 4c3c53f773 release 3.0.0, but there's been
a steady stream of requests to bring it back. It seems it's commonly
used with some certain openvswitch config.
Maint burden isn't too bad. Let's bring it back
Fixes: https://github.com/virt-manager/virt-manager/issues/169
Signed-off-by: Cole Robinson <crobinso@redhat.com>
The virtiofs in domcapabilities is used as a proxy to tell us whether
libvirt is new enough to allow bare memory access mode=shared', So We
enable/disable this checkbox according to it.
When we configure shared memory access, If the 'memfd' is available in
domcaps, We configure VM to use it as memory backend because it doesn't
need addtional host setup for vhost-user devices, Otherwise use 'file'
as backend.
If all of numa nodes explicitly defined memAccess=shared, We mark this
checkbox as checked even if virtiofs isn't exposed in domcapabilities.
In this case:
- It doesn't matter what the value of access mode of memoryBacking is
because access mode of memoryBacking will be overridden per numa node
by memAccess attribute.
- Although the checkbox is disabled, the checked checkbox presents actual
status about shared memory access to users.
Signed-off-by: Lin Ma <lma@suse.com>
This pops up randomly sometimes for reasons I can't determine yet.
logging this will help narrow it down when it does crop up
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Make it work more like gfxdetails. The problem with the current
approach is that it requires effectively rebuilding the whole device
to match the original device when we want to edit a single field,
which is error prone.
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This makes it more clear that 'path' is really a special designation
with a bunch of complicated logic behind it. It's also easier to
grep for
Signed-off-by: Cole Robinson <crobinso@redhat.com>
And absord device building from addhardware. This moves all the
knowledge to gfxdetails, which saves sprinkling it around in other
places
Signed-off-by: Cole Robinson <crobinso@redhat.com>
* Don't process events when the window isn't showing
* Only update console/details if that tab is actually selected.
Otherwise in some corner cases we can connect to the VM console
while on the details page
Signed-off-by: Cole Robinson <crobinso@redhat.com>
In weird corner cases this can trigger tracebacks, if the boot
page is refreshed while the hardware list changed underneath us.
This is a step in the direction of unwinding it.
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Historically we have not advertised host-passthrough because it was
not recommended for general usage. That stance is softening,
tools like gnome-boxes already set it as the default, and users
continue to ask about it.
We may change the default in virt-manager but it will take more
discussion. This is a tiny move in the direction of hiding it less
than we already do.
Drop the label for host-model and call it by its libvirt XML name,
since otherwise it's hard to tell which combo choice is for each
value
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This uncovered some areas in details.py we weren't handling that
the search view unselects the current selection
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Share the UI for changing all these disk properties:
- shareable
- readonly
- removable
- cache
- discard
- detect zeroes
Move them all under the 'Advanced options' expander in details, and
add the checkbox options to the addhardware wizard.
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Refactor the internals to cleanly separate the pieces that fill in
the UI, and the pieces that react to UI state to dynamically show/hide
fields.
Improve spice GL warnings while he are here, and several other minor
fixes
Signed-off-by: Cole Robinson <crobinso@redhat.com>
RAM is rarely changed from the default
heads does not have any explicit virt-manager support
and both are viewable from the XML editor.
So remove the explicit fields for them
Signed-off-by: Cole Robinson <crobinso@redhat.com>
* Privatize a lot of stuff
* Separate out many callbacks as thin wrappers around the real code
* Simplify registering EDIT_ handlers
* Organize things better
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This is pretty obscure, and if it's problematic then libvirt
or qemu should be throwing an error or otherwise reporting it
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Don't have the caller call a validate function, they all catch
errors anyways. Let the build step raise error if there's a problem
Drop some validation checks that libvirt should be performing for us
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Commit <15a9502b7b7a263c4d66ff2b3f31c209f58fe0b4> fixed firmware
detection but incorrectly. It will always show only "UEFI" even if
the firmware auto-selection is not used because the function is_uefi()
checks both the old style and the new auto-selection.
We have to check only for the auto-selection option.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
It seems that the index is optional, so use a proper string for this
case.
Fixes commit 00fa636682 in this file.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
Use whole strings for the labels of disks, including the bus (if
available), and the index.
There are still generic fallbacks for the disk types not explicitly
handled.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
Shortcut all the checks, and directly return the whole string (index
included) to show for floppies.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
Use a single string with a placeholder for the path to avoid a string
puzzle.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
Use placeholders for the bus name, and the index; the latter is part of
the string, to avoid a string puzzle.
Also use vmmAddHardware.disk_pretty_bus() to get the proper translated
string of a bus.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
Use a proper string with placeholders for the controller name and index,
to avoid string puzzles.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
Use separate strings for the path case, and for the generic case (i.e.
the version), to avoid string puzzles.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>