We could specify 'model' for scsi controllers,
that means we could see more than one controllers
with same icon and blank details.
That will confuse users.
This patch will show details of scsi controller device.
And also we could modify scsi controller model
between 'default' and 'virtio-scsi'.
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
There were multiple problems with the setting and usage of
hide_unsupported_rhel_options. Due to the fact that the option has
several diferent namings throughout the code, this patch is renaming
it to stable_defaults, which basically says what the option does and
makes it possible to use it without need for more than one negation
(where the old code had up to 4 of them in some places), which also
helps understanding it.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
We set virtio-scsi controller index according to
the number of scsi controller in VM.
This patch will set virtio-scsi controller index
via max index in scsi controller list.
How to reproduce:
a)
If we got an VM with two scsi controller:
<controller type='scsi' index='0'>
<controller type='scsi' index='2'>
#reason for index='2':
someone delete a scsi controller with index=1
by virsh
b)
add a virtio-scsi disk by virt-manager
c)
error threw by virt-manager:
libvirtError: XML error: Multiple 'scsi' controllers with index '2'
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
We should not encourage user use device type 'LUN'
if they selected virtio bus.
This patch will prevent user from doing this.
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
On first run, the remote URL install handling creates a storage pool
for /var/lib/libvirt/boot on the remote host. After this, it clears
the VirtualConnection's object cache, so the next time all pools are
fetched, it returns an accurate list.
However that clear_cache call wasn't propagated up to virt-manager's
cache. Add a new cb to fix it.
This makes new x86 kvm guests use the host's CPU model as reported by
libvirt capabilities output. This is a reasonable compromise for now
to increase performance while we wait for libvirt/qemu to fix host-model.
Add a preference for changing the default CPU mode/model. The options are:
- default (whatever virt-manager chooses as the default)
- hypervisor default (no <cpu> block, what we've always done)
- nearest host cpu model (just the 'model' from caps->host->cpu)
- copy host cpu (the entire <cpu> block from caps->host)
The setting only applies to KVM guests, not tested with anything else.
The default is left as is for now (hypervisor default).
copy host CPU will one day use mode='host-model', when it does what
we want. At that point we will probably make it the default
If we didn't set values for @type and @iobase in
XML, libvirt will use the default value.
Currently, virt-manager will display "-" if we don't
set any values.
This patch will use default value for display.
And update test case to cover this scenario.
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
Similar to how we allow disabling disk/net polling, not sure yet what
effect it might have on remote connections, so best to add this option
just to be safe.
Unlike disk/net stats, we enable this checking by default.
When refreshing the details window after it has been already
initialized, we don't change the value of the View->Toolbar item in
the menus on which then the toggle_toolbar() depends and due to the
menu keeping the old value, the toolbar might (not) be shown even if
it should not (or should) be.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1049145
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
libguestfs adds an atexit handler to clean up handles on exit. This
is convenient in single-threaded programs, but causes problems in
multithreaded programs, for example:
https://bugzilla.redhat.com/show_bug.cgi?id=1043520
Disable the atexit handler for all guestfs handles created by
virt-manager.
Note this change requires libguestfs >= 1.20. However the change to
config.py should ensure that if an earlier version of libguestfs is
installed it should silently fall back to not using inspection.
Normally, setting cache=none is required in order to ensure a consistent view
of storage between the source and destination migration hosts. However, some
configurations have that quality without resorting to the use of an O_DIRECT
open (which is what cache=none does), and hence cache=none wouldn't be
necessary.
Unfortunately, libvirt is not able to determine on it's own all the
configurations which require cache=none for migration but in the interest of
safety enforces it when it isn't otherwise able to determine migration safety.
For this reason the libvirt api has an 'unsafe' option which allows the user
to override the safety migration checks.
This patch adds a checkbox to allow unsafe migration to the 'Advanced options'
portion of the migration dialog.
Signed-off-by: Charles Arnold <carnold@suse.com>
We could copy host CPU config by
button 'Copy host CPU configuration'.
If we regret to do this or the host CPU config
caused VM starting failure, we need a button to
help us clear CPU feature.
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
If libguestfs fails to inspect the guest then show a warning.
Now the "Operating System" and "Applications" frames are visible
only when the guest inspection is available.
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=755869
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
LXC container could use in-memory filesystem,
which do not have source section.
Currently, virt-manager will complain if
dev.source is null.
This patch will fix this issue.
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>