Commit Graph

1056 Commits

Author SHA1 Message Date
Cole Robinson
27916ad571 Use icon theme icons rather than gtk stock icons.
This allows us to get many more relevant icons (mouse, tablet, sound card).
Also, reorganize the virtual network and hardware lists to have icons appear
first in the row.
2009-07-20 15:09:32 -04:00
Cole Robinson
32561b2d89 cleanup: Use self.topwin in details. 2009-07-20 14:52:53 -04:00
Cole Robinson
5d02a09016 Add 'pretty string' routine that doesn't require the conn to be active. 2009-07-20 14:47:50 -04:00
Cole Robinson
6628d6ea48 Provide actual info about available 'Add Hardware' devices.
If we disable adding a device, don't just hide it: disable the list entry,
and show an error message in a warning label, so the user understands why.
2009-07-14 22:04:34 -04:00
Cole Robinson
3936943a63 Allow changing vcpu count in the persistent config.
Changes similar to what was done with memory: try cpu hotplug, and always
follow up with XML definition.
2009-07-14 21:22:18 -04:00
Cole Robinson
8c9bbe1d66 More dup_conn fixes. 2009-07-14 20:36:05 -04:00
Cole Robinson
69b6bea472 List all VM graphics devices (since libvirt supports more than 1 now) 2009-07-14 19:47:18 -04:00
Cole Robinson
b3746d9623 Teach serial console to deal with a changing pty path. 2009-07-14 19:42:16 -04:00
Cole Robinson
6658f4fe40 Don't list <console> tag in serial list if primary console is not PTY. 2009-07-14 19:25:17 -04:00
Cole Robinson
c5f9c7dbe8 Sigh, actually add UI for char and video devices. 2009-07-14 19:02:43 -04:00
Cole Robinson
b96811b736 Improve connection delete confirmation message. 2009-07-14 17:10:57 -04:00
Cole Robinson
93eca80e18 Fix error message typo. 2009-07-14 17:06:50 -04:00
Cole Robinson
0eef04170c Make sure we have updated XML when viewing VM details. 2009-07-14 17:06:37 -04:00
Cole Robinson
575ebc7077 Show correct connection state after open failure. 2009-07-14 16:09:03 -04:00
Cole Robinson
a2d49aee87 Fix several broken hacks in migration code.
Key of URI in the migration list, not the short hostname we show: we can
have multiple connections with the same hostname, and it confuses things. This
allows us to drop the migrate invocation differences for the xen driver,
so things work as they should.
2009-07-14 15:59:57 -04:00
Cole Robinson
51a1e0d329 Fix migration, disk creation after dup_conn changes. 2009-07-14 15:32:39 -04:00
Cole Robinson
74e01e22c5 Code cleanups in engine.py
Change some code to match the common style. Break apart the overloaded
'get_connection' function into _lookup_connection and add_connection.
2009-07-14 14:48:09 -04:00
Cole Robinson
f37612dfe5 Fix variable typo. 2009-07-14 09:45:23 -04:00
Cole Robinson
3c17265194 Support video devices in 'Add Hardware' wizard.
Pretty sparse at the moment: only allows setting video device model (which
is all that's really relevant for qemu/xen ATM).
2009-07-14 09:25:39 -04:00
Cole Robinson
b34fd724d3 Support adding serial and parallel devices via 'Add Hardware' 2009-07-14 09:25:39 -04:00
Cole Robinson
1224f90699 Run the main tick function in a thread.
Since libvirt has supported multithreaded client connections for a while now,
we can run all our libvirt polling in a thread. This will prevent the UI
from blocking and becoming sluggish if there are lots of VMs or connections
open.

We just need to be vigilant in ensuring that all UI updating done via any
tick function is scheduled with gobject.idle_add, to preserve the benefits.
2009-07-11 21:23:16 -04:00
Cole Robinson
2da5651b8c Don't update XML when polling disk and net stats.
We need to parse the XML doc when polling for disk and net stats. However,
it isn't that important for us to have up2date xml when doing so: having a
disk or net device added behind our back is likely a rare occurence, and
the xml will be updated via other means quite often.

So, don't update the xml.
2009-07-11 21:23:07 -04:00
Cole Robinson
b4b5a2b138 vmmDomain: cleanup xml handling functions.
Separate the public interfaces (get_xml and get_xml_to_define) from the
private interfaces. Clean up usage where we violated this.
2009-07-11 21:22:30 -04:00
Cole Robinson
49938ebbd7 Don't enforce the block vs. file split in Add Hardware -> Disk.
It can only cause annoyance, especially since the storage browser doesn't
distinguish.
2009-07-10 14:00:59 -04:00
Cole Robinson
10be2d2a45 Support viewing and removing VM 'video' devices. 2009-07-09 14:35:55 -04:00
Cole Robinson
79f3e9987e More 'details' code cleanup.
Don't duplicate the large 'refresh' lists between page_refresh and hw_selected.
2009-07-09 14:35:44 -04:00
Cole Robinson
84717a0b7f Some 'Details' UI cleanup.
The main change is removing the duplication of the 'Apply' and 'Remove'
buttons in the UI. This has no functional change, but from a dev perspective
this saves annoying duplication when new device support is added.

Also fix up some minor layout and spacing issues.
2009-07-09 14:35:36 -04:00
Cole Robinson
b4c45857e7 Don't retry VNC connection if VM isn't running. 2009-07-08 21:31:04 -04:00
Cole Robinson
240816a25b Large cleanup of 'Add Hardware' summary section.
Build the summary table on the fly: makes adding new options pretty
painless, and makes current code a lot clearer.
2009-07-08 21:17:48 -04:00
Cole Robinson
73224b0109 Cleanup some code in addhardware.
Only use page_changed for setting the summary. Reorder reset_state to
be much more clear.
2009-07-08 18:49:25 -04:00
Cole Robinson
836d4ecc14 Properly define migrated VM on remote connection. 2009-07-07 14:57:17 -04:00
Cole Robinson
08b38f62aa Add security/selinux info to VM->Overview, allow changing if supported.
Allows setting dynamic or static labelling.
2009-07-07 12:16:03 -04:00
Cole Robinson
b4a9322839 Re-use created disk if retrying a VM install (fixed _again_) 2009-07-06 16:49:47 -04:00
Cole Robinson
e0f0b9a930 Support pool building for logical pools (now allowed by virtinst). 2009-07-02 13:13:17 -04:00
Cole Robinson
a87933c66c Use proper XML editting when setting boot device.
The current method is ugly and not future proof if extra options are
ever added to the boot list (which is likely).
2009-07-02 12:11:28 -04:00
Cole Robinson
fb7a999a81 Ensure mem/maxmem changes affect persistent config.
Split the Domain API into two pieces: 'hotplug memory' and 'define memory'.
This allows us to catch hotplug errors and inform the user.
2009-07-02 10:49:06 -04:00
Cole Robinson
705b50419a Add internal 'redefine' API for domain class.
Wraps up all the common code that would be easy to get wrong for new
xml altering functions.
2009-07-02 12:46:39 -04:00
Cole Robinson
6d50cb807d Add an 'info popup' helper, similar to the validation error box. 2009-07-02 12:45:48 -04:00
Cole Robinson
02fc09e0a8 Don't show startup error for SystemExit (used by --help). 2009-06-26 14:05:27 -04:00
Cole Robinson
1bd9c50942 Make sure we force a tick update if the domain XML config changes. 2009-07-02 10:01:16 -04:00
Cole Robinson
b87d51cda5 Remove some useless debugging and noisy logging. 2009-07-02 12:44:53 -04:00
Cole Robinson
dc17b21b9a Don't duplicate connections for libvirt 0.6.0 and later.
Newer libvirt doesn't require it, and it only causes issue (filling up libvirt
connect queue, prompting for auth, flooding the debug log, etc.).
2009-07-01 14:59:29 -04:00
Cole Robinson
71401272f5 Enable host device attachment for xen (libvirt now supports it). 2009-07-02 12:43:41 -04:00
Cole Robinson
bbc65216db Refactor OpticalHelper functionality.
Add helper functions to properly set up the cdrom combo widgets. Separate
the dbus polling from UI editting: eventually we will get some of this info
from libvirt hostdev APIs, and this will help.
2009-07-02 12:43:08 -04:00
Cole Robinson
8d9ce45ffd Fix up some choose-cd UI irregularities. 2009-07-02 12:42:41 -04:00
Cole Robinson
40dd22b1f6 Don't duplicate connections for libvirt 0.6.0 and later.
Newer libvirt doesn't require it, and it only causes issue (filling up libvirt
connect queue, prompting for auth, flooding the debug log, etc.).
2009-07-01 14:59:29 -04:00
Cole Robinson
33bf8f6372 Separate local net device polling from connection initialization.
Currently we connect to dbus and poke sysfs to find local net devices and
bridges: unfortunately we do this everytime _any_ connection object is
initialized. This floods the debug logs, and is complete overkill, since
net devices are associated with the host and not a connection.

Run the initialization once (at app startup) and carry around only one
instance of the polling code.
2009-07-01 14:59:13 -04:00
Cole Robinson
c0c3cf0d1a Don't reinvent (poorly) gconf.escape_key and friends. (Mark McLoughlin)
Was causing errors with storing per-connection preferences for remote
URIs with '+' in them.
2009-07-01 14:51:41 -04:00
Cole Robinson
97f6cd8fdb Remove readonly connection fallback.
If opening a connection R/W fails, we currently fallback to readonly. This
isn't very transparent and is likely not what the user wants (full R/W or
a useful error message why not). This has caused a lot of confusion and
bug reports, so let's drop it.
2009-07-01 11:13:30 -04:00
Cole Robinson
ed26fe9bc7 util.browse_local: Fix bug when storing directory in gconf (Michal Novotny) 2009-06-25 22:12:09 -04:00
Michal Novotny
fd480885bc Make virt-manager remember last used paths
This patch makes virt-manager remember last used paths for disk images, saved
snapshots, restored snapshots, media paths and also screenshot paths not to
bother users with changing paths from the default location per HV technology.
Useful when installing multiple domains and having all the media/image files
in non-default locations.
2009-06-23 19:30:12 -04:00
Cole Robinson
f918e05d31 Document util.browse_local options, remove an unused one. 2009-06-22 14:24:09 -04:00
Cole Robinson
550db73928 Use storage broswer for CDROM insert and install media. 2009-06-18 10:40:37 -04:00
Cole Robinson
735f009169 Change storage browser to be a dialog, not a window.
It is essentially a glorified file chooser, so give it dialog behavior.
(like associating with a parent window, and being able to be the top window
above other dialogs like the CD chooser).
2009-06-18 10:39:55 -04:00
Cole Robinson
56b523e0f9 Update 'About' copyright date. 2009-06-18 10:39:20 -04:00
Cole Robinson
3d6e0c7121 Remove lots of XML parsing duplication.
Break out the common XML parsing idiom into a utility function, and
convert the domain class to use it.
2009-06-18 10:38:15 -04:00
Cole Robinson
7a773c9558 Fix add usermode network device via Add Hardware wizard. 2009-06-17 11:56:45 -04:00
Cole Robinson
e3d0ce2562 Fix current mem vs. max mem spin button interaction.
Switch max mem to abide current mem value, not the other way around: most
people are only interested in the current allocation.

Also, tweak the spin button climb rate and step size to be a bit more useful.
2009-06-16 18:04:29 -04:00
Michal Novotny
9e46f8bdb5 Make Processor tab item in VM details show correctly
The Processor tab in VM details was not showing at all because of exception.
The exception occured everytime the tab was selected because of call to non
existing function get_type() that has been renamed to get_hv_type() in the
newest version of virt-manager's code by revision 1135.
2009-06-16 15:36:10 -04:00
Cole Robinson
050677047e Correctly handle non sparse request in VM wizard. (Mark McLoughlin)
We currently have it backwards, so a sparse request actually asks for
nonsparse. We didn't see this much, since until recently virtinst wasn't
allowing nonsparse volume allocation.
2009-06-16 15:31:18 -04:00
Cole Robinson
01ec2efdfc Fix Add Hardware summary for VNC keymap value (Guido Gunther) 2009-06-04 14:45:42 -04:00
Cole Robinson
6c8302a436 Don't set paravirt disk defaults in create wizard: virtinst now handles it. 2009-06-04 14:42:33 -04:00
Cole Robinson
54c7719c92 List HV, Arch, Emulator in VM->Details->Overview 2009-05-12 13:09:08 -04:00
Cole Robinson
1bcd79d46b Rename VM domain get_type to get_hv_type. 2009-05-12 11:43:07 -04:00
Cole Robinson
653a23d79d Log capabilities XML at connection startup. 2009-05-12 11:12:37 -04:00
Cole Robinson
5ff3d7aa01 Make --debug imply --no-fork 2009-05-12 10:34:02 -04:00
Cole Robinson
d954dcc918 Fix changing 'arch' in VM create wizard.
Previously it never did anything :(
2009-05-11 13:18:14 -04:00
Cole Robinson
92ea5be08d Mark some strings as translatable (Emmanuel Lacour) 2009-05-11 12:24:15 -04:00
Cole Robinson
58bc9af45d Force gettext init for glade files (Emmanuel Lacour) 2009-05-11 12:19:24 -04:00
Cole Robinson
62de590fbb Clean up old VM gconf entries on connection startup.
If a VM has disappeared from a connection since the last time we connected,
remove it's old gconf preferences so we don't slowly pollute the db.
2009-05-11 12:05:46 -04:00
Cole Robinson
3ad177128c Keep a list of used install ISO paths.
Store these in gconf on a per hostname basis, since a local path likely
isn't relevant for a connection on another host.
2009-05-11 11:00:03 -04:00
Cole Robinson
b619961f29 Remember VNC scaling setting for each VM.
Uses the newly added per-VM preference infrastructure
2009-05-11 10:45:25 -04:00
Cole Robinson
d9860d4a61 Add Per VM/Conn/Hostname preference tracking infrastructure.
We add a new gconf level for per connection and per VM preferences, at

/apps/virt-manager/connection_prefs/{URI}/vms/{UUID}

Hostname specific prefs are stored at:

/apps/virt-manager/connection_prefs/hosts/{HOSTNAME}

The URI does a simple s|/|-|g to simplify things a bit. If a VM specific
preference hasn't been set, we use the global preference.
2009-05-11 12:37:47 -04:00
Cole Robinson
02c62a572f Fix UI screwiness with named text entries in ComboBoxEntrys
Worked at some point, but now everytime the vmm-create file is saved in
a new glade version (as on rawhide), the naming gets wiped out and the
wizard won't even launch.
2009-05-11 10:17:52 -04:00
Cole Robinson
1e603974bd Clean up some pylint warnings on rawhide. 2009-05-11 10:13:32 -04:00
Daniel P. Berrange
0b2184279a Extend VNC auth handling to cope with fetching a username too & record username in gconf 2009-05-07 19:22:33 +01:00
Daniel P. Berrange
c2e336c0bc Fix check for local pixmap path 2009-05-06 16:47:10 +01:00
Daniel P. Berrange
402111e851 Fix console window resize 2009-05-06 16:46:55 +01:00
Cole Robinson
d05e004240 Revert 1108: not all nc versions have -q option (including Fedora). 2009-04-23 11:29:41 -04:00
Cole Robinson
ea17df3c59 Remove some pylint. 2009-04-22 16:12:26 -04:00
Cole Robinson
ae1f7b2560 Don't try to libvirt/images if we don't have access to it. 2009-04-22 15:44:07 -04:00
Cole Robinson
ec8e76b870 Remove 'path' field from storage volume list: it's mostly redundant. 2009-04-22 16:06:34 -04:00
Cole Robinson
35d25f9db7 Define migrated VM on destination connection 2009-04-21 14:46:46 -04:00
Cole Robinson
123d2f8db6 Remove debugging code from migrate routine, and actually call 'migrate' 2009-04-21 14:46:26 -04:00
Cole Robinson
69b292dadf Fix 'operating' typo in create wizard. 2009-04-21 13:03:24 -04:00
Cole Robinson
baf1cb0efe Close connection if 'tick' hits an error (e.g. libvirt crashes). (Dan Walsh) 2009-04-20 12:56:07 -04:00
Cole Robinson
e40410d944 Let netcat quit on EOF (Guido Gunther) 2009-04-20 12:20:36 -04:00
Cole Robinson
e4cecfda22 Fix a comment typo. 2009-04-20 11:47:02 -04:00
Cole Robinson
0f608da66c Use MB instead of GB for pretty memory < 10GB. (Gerrit Slomma) 2009-04-20 11:46:37 -04:00
Cole Robinson
d85358067c Fix incorrect vcpu capping in create wizard.
Cap was always 10 less than we intended. Apparently spinbutton page_size != 0
is deprecated, yet is the default set by glade3? Schweet.
2009-04-06 12:22:44 -04:00
Cole Robinson
368dcfe05a Have migration use typical progress dialog. 2009-04-03 16:06:46 -04:00
Cole Robinson
3b6c2ffe1f Change 'choose cd' button ordering. 2009-04-03 15:38:41 -04:00
Cole Robinson
3f26e4a516 Reorder buttons in the delete dialog. 2009-04-03 15:35:21 -04:00
Cole Robinson
b9760f3aa5 Improve uri connection error message formatting. 2009-04-03 14:58:51 -04:00
Cole Robinson
1d58e66450 Populate details migrate menu on demand. 2009-04-03 14:18:40 -04:00
Cole Robinson
65f1f52a79 Fork off connection when 'restoring' domain. 2009-04-03 14:15:25 -04:00
Cole Robinson
dd50d5e141 Check 'defined outside init' w/ pylint script, fix errors. 2009-04-03 14:15:23 -04:00
Cole Robinson
329113afe3 Use dup_conn in delete dialog. 2009-04-03 14:15:22 -04:00
Cole Robinson
f9680aa8e0 Store errors in asyncjob instances.
This allows us to remove all the hackish global error reporting variables
whenever we run an async job.
2009-04-03 14:15:15 -04:00
Cole Robinson
7b24154f19 Don't leave app hanging around if user closes it while an async job is in
progress.
2009-04-03 14:15:14 -04:00