Handling this is a bit different from other bits, because:
1) the <device> editing paradigm is unique. We need to replace the
device in line in the XML which is a new operation
2) the New VM customize pattern is tricky and needs lots of
special handling
Re-use CharSource, just like libvirt does internally. Adjust all
callers to match. Rename type -> backend_model while we are here,
because type is ambiguous
Move all ./source handling into CharSource, which will be reused by
other device classes as well. This requires us to add ../ handling
into our xmlapi xpath engine
Whether we show something in the UI should be more dependent on
whether it's actually set in the XML, not some internal hardcoded
list which can go out of date.
Right now we overload the DEVICE column for non-device pages
like overview or memory. Add a separate column for KEY, and have
DEVICE==None for non-device pages
vmmVMWindow handles all the menuing, and coordinating between the
console, snapshots, and details panel. Simplifies the details
code a bit which will help when we add xmlediting
The current code already prefers the "display name" over the "name" of
each application; hence, use "name" only if the "display name" is not
available.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Instead of passing around the raw results of
g.inspect_list_applications(), create an helper vmmInspectionApplication
object with the data of an inspected application that we use. This is
done for different reasons:
- when using the data, it is easier to use member variables instead of
looking up values in a dictionary
- we keep only the data needed, slightly lowering the memory/objects
used for the inspected applications
- it will be easier to switch from g.inspect_list_applications() to
g.inspect_list_applications2() without changing code outside the
inspection code
Reviewed-by: Cole Robinson <crobinso@redhat.com>
By default we copy CPU security features to the guest if specific CPU
model is selected. However, this may break migration and will affect
performance of the guest. This adds an option to disable this default
behavior.
The checkbox is clickable only on x86 and only on host where we can
detect any CPU security features, otherwise a tooltip is set to notify
users that there is nothing to copy.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Currently we just call libvirt API which will return all CPU models for
specific architecture known to libvirt and we offer all of them to users
in GUI. Let's switch to domain capabilities where we have more details
about these CPUs such as whether each model is usable with current QEMU
binary. If libvirt can detect the usability we will offer only CPU
models that QEMU can actually run.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Add support for vsock devices to Hardware Details UI so that vsock devices can
be configured or removed.
Signed-off-by: Slavomir Kaslev <kaslevs@vmware.com>
It's a common requirement for VMs to send SCSI PR commands in VM cluster
environment. This patch adds the managed mode support of scsi persistent
reservation in details page.
Signed-off-by: Lin Ma <lma@suse.com>
The new UI is handled in mediacombo. It's a combobox+entry. The
combobox is prepopulated with host cdrom/floppy devices, and
previously used media paths from gsettings
The new VM wizard no longer has separate UI for cdrom device vs
ISO media. The choosecd dialog is gone all together, and media
is changed with the 'apply' button like all other details changes
This is just a big nasty commit.
Turn the OS inspection page into an always available page that
shows the libosinfo name from the domain metadata XML. Use oslist.py
and have it absorb more of the common behavior needed by create.py
and details.py. Add UI tests for it all
* Tweak the UI
* Add accelerator for the refresh button
* Make the IP labels selectable
* Drop the IP prefix from the UI, it's not the important bit
* Call DHCPLeases on the network instead to support this for more
drivers, like LXC
* Cache the IP results in the domain/network object wrappers
* Catch and log errors
* Poll for IP address when first visiting the interface page
If the interface's type is 'network', then code uses lease as one of
parameters of interface_addresses to get ipv4 and ipv6 address.
If the result is negative, then uses agent to try again, If the result
is still negative, uses arp for final try.
Signed-off-by: Lin Ma <lma@suse.com>
- Remove anything for less than qemu 0.12 or libvirt 0.10, basically
rhel6 vintage stuff
- Open code some simple checks
- Remove some that are only used for unnecessary error reporting
Hardware Details -> NIC of every VM should now contain checkbox for
interface's link state. This checkbox edits domain's XML by changing
<link state='up/down'/>. If XML doesn't contain this tag, virt manager
assumes state "up".
https://bugzilla.redhat.com/show_bug.cgi?id=1614532
Signed-off-by: Simon Kobyda <skobyda@redhat.com>
Reflect controllers <-> disks mapping relationship for not only scsi,
But other storage controllers.
As a bonus, These controllers are not allowed to be removed if there are
disks attached to them.
Signed-off-by: Lin Ma <lma@suse.com>