Commit Graph

446 Commits

Author SHA1 Message Date
Chen Hanxiao 4c53debd8a add support for showing and modifying scsi controller model
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>
2014-01-22 09:07:40 -05:00
Martin Kletzander dc0b9bbaaf Rename hide_unsupported_rhel_options to stable_defaults and clean-up its usage
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>
2014-01-21 17:13:18 +01:00
Cédric Bosdonnat d2f625cb22 Use vmmFSDetails in details dialog to allow editing filesystem devices 2014-01-21 09:49:09 -05:00
Cédric Bosdonnat 40422e13f2 Create a separate class vmmFSDetails to share filesystem addhardware UI
This class will be reused in the virtManager/details.py code soon to
provide the same UI to modify filesystem devices than to create them.
2014-01-21 09:29:13 -05:00
Cédric Bosdonnat d888ff2394 Add lxc filesystem drivers: loop and nbd
These file systems drivers have been added in virtinst, but also in the
addhardware UI.
2014-01-21 09:29:13 -05:00
Cédric Bosdonnat 2f505822a1 Add Hardware: added the missing filesystem types for LXC guests.
This means tweaking the UI to input a memory usage for the 'ram'
filesystem type.
2014-01-21 09:29:12 -05:00
Chen Hanxiao dc439b2c1c addhw: set virtio-scsi controller index via max index in scsi controller list
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>
2014-01-21 09:00:39 -05:00
Chen Hanxiao 6d5acfab52 disable virtio disk with device type 'LUN'
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>
2014-01-21 08:49:18 -05:00
Cole Robinson a0c2fdf429 virt-manager: Make --show-domain-creator show the manager as well
Otherwise we don't have any way to close the app.
2014-01-19 12:03:17 -05:00
Cole Robinson 7f66926721 Fix first time remote URL installs from virt-manager (bz 1049852)
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.
2014-01-18 14:57:39 -05:00
Cole Robinson a82b60dcff capabilities: Remove some public API back compat 2014-01-18 13:23:30 -05:00
Cole Robinson 077eac8c1d createinterface: Fix creating bridge with unconfigured interface (bz 1048351) 2014-01-17 20:25:08 -05:00
Cole Robinson 62cfac18dc host: Fix looking up interfaces on repopulate signal 2014-01-17 20:23:29 -05:00
Cole Robinson 958dea6c5f createnet: Use typical name validation pattern 2014-01-17 18:40:30 -05:00
Cole Robinson 594e26d772 Change the kvm default cpu to 'nearest host cpu model'
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.
2014-01-17 17:41:26 -05:00
Cole Robinson 7003a3a528 prefs: Allow changing the default VM CPU mode/model config
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
2014-01-17 17:41:26 -05:00
Cole Robinson 849141552d details: Fix stdout spew on hw_update error
Not sure what caused this, but its easy enough to avoid
2014-01-17 14:22:49 -05:00
Cole Robinson 330bcd9c8b delete: Track kernel/initrd/dtb as well 2014-01-14 17:26:29 -05:00
Cole Robinson 79ce0dcdc5 details: Fix changing media for two different cdroms
We weren't updating the target device of the choosecd dialog, so only
the first targetted device was ever updated.
2014-01-14 17:18:02 -05:00
Cole Robinson 66096a7eeb choosecd: Check path-in-use collision (bz 1028197) 2014-01-14 17:11:51 -05:00
Cole Robinson 6dd41e6944 create: Disable 'fully allocate' if qcow2 is the default
Since it doesn't support full allocation
2014-01-14 16:03:58 -05:00
Chen Hanxiao 2bee4a128d panic notifier: display default value if not set
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>
2014-01-14 09:58:09 -05:00
Cole Robinson 6db30432a5 domain: Use support infra to check if memory stats supported 2014-01-12 17:53:53 -05:00
Cole Robinson 55d6b7f377 prefs: Allow disabling all memorystats polling
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.
2014-01-12 17:39:21 -05:00
Cole Robinson 2dffdff328 addhw: disk: Split bus and device into two combo boxes
Prior to this we had them in the same combo box, which had grown quite
large.
2014-01-12 16:52:26 -05:00
Cole Robinson bd111d411c addhw: Only allow panic device if libvirt supports it 2014-01-12 15:16:06 -05:00
Cole Robinson cad64c0dc1 nodedev: Remove subdev for pretty_name, it's pointless 2014-01-12 14:52:15 -05:00
Cole Robinson dd57f2f221 create: Don't reset method choice when arch changes if it's still valid 2014-01-12 14:41:25 -05:00
Cole Robinson d12c986b98 Use BUTTON size for all status icons 2014-01-12 14:36:03 -05:00
Cole Robinson 02d07996b0 addhw: Fix a pep8 error 2014-01-11 16:08:42 -05:00
Cole Robinson f055b07a61 details: Couple mini 'panic' UI cleanups 2014-01-11 15:08:00 -05:00
Chen Hanxiao c7a374b51d virt-manager: add support for adding panic notifier device
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-01-11 14:53:20 -05:00
Chen Hanxiao a90a375bda virt-manager: add support for showing panic notifier device
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-01-11 14:53:19 -05:00
Martin Kletzander 7906b1cc41 Fix toolbar toggling in details window
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>
2014-01-11 13:20:48 -05:00
Thorsten Behrens b5da599aef Base mem statistics on virDomainMemoryStats if available.
Attempt to query domain memory stats via virDomainMemoryStats.

(crobinso: remove the broken fallback, since it's confusing)
2014-01-06 12:08:55 -05:00
Thorsten Behrens 77b1143965 Add memory stats widget also to manager tree view.
(crobinso: Fix an initialization issue)
2014-01-06 12:08:55 -05:00
Cole Robinson 5c1ed03b89 Fix some pylint 2013-12-18 16:34:10 -05:00
Cole Robinson febd8bf4e5 Disable accelerators when serial console has focus (bz 1018822) 2013-12-18 16:31:48 -05:00
Cole Robinson 9ce582c364 packageutils: Let packagekit front end show the error for us (bz 1034728) 2013-12-18 15:45:02 -05:00
Cole Robinson 3ac0cb06ac error: Make sure labels aren't overly large 2013-12-18 15:42:02 -05:00
Richard W.M. Jones 006fcd3856 guestfs: As virt-manager is multithreaded, don't use an atexit handler.
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.
2013-12-16 12:55:33 -05:00
Charles Arnold 1124043151 Allow unsafe migrations in virt-manager
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>
2013-12-14 12:23:37 -05:00
Cole Robinson 2a25c8d37d host: Print iscsi volume key as well in volume list
Suggested here: http://www.redhat.com/archives/virt-tools-list/2013-December/msg00014.html
2013-12-05 09:17:29 -05:00
Cole Robinson c351c8963a storage: Merge duplicate vol list populating 2013-12-04 19:01:52 -05:00
Chen Hanxiao 10d5eb8375 add button to remove cpu feature
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>
2013-12-04 18:34:53 -05:00
Giuseppe Scrivano 0abbb6d122 details: show warning when guest inspection fails
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>
2013-12-03 11:39:27 +01:00
Giuseppe Scrivano b3131e828e inspection: report guest inspection errors
Add an `error' flag to the inspection data for a guest and set it when
the inspection failed.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-12-03 11:39:23 +01:00
Chen Hanxiao 8f661290e3 add RAM filesystems browse support for lxc container
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>
2013-12-02 13:44:17 -05:00
Giuseppe Scrivano 7f3c4cf2f9 virt-manager: correctly initialize the create pool wizard page number
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1034933

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-12-02 10:45:12 +01:00
Chen Hanxiao 7b9a040249 show read-only check button when add fs for lxc container
Show read-only check button when add fs for lxc container.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2013-11-26 10:08:56 -05:00