Commit Graph

3715 Commits

Author SHA1 Message Date
Chen Hanxiao a48f75078d virt-install: Add --memtune option
This patch provides the ability to
tune memroy tunable parameters for the domain.
Also add test cases for --memtune option
and update man page.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-02-24 21:02:31 -05:00
Chen Hanxiao 6722d2049e tests: update test suites output with the last libvirt
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-02-24 11:33:42 +01:00
Chen Hanxiao 0dceb24b3b virtinst: fix an issue of disk bus caculation
commit 466c2bcf9c
will generate the same index for
'hda' and 'hdaa'.
Also break test cases.

This patch will fix this.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-02-23 13:31:48 +08:00
Chen Hanxiao 2ace5317e0 addhardware: fix a little typo
s/paams/params

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-02-23 13:29:08 +08:00
Martin Kletzander 466c2bcf9c disk: calculate the disk bus properly
I forgot to amend this change when changing it the last time.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2014-02-19 10:12:53 +01:00
Martin Kletzander 7c437f6a6f addhardware: don't get duplicated disks
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2014-02-19 10:11:14 +01:00
Martin Kletzander 4aec369e44 addhardware: Don't clash with different buses using the same prefix
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2014-02-18 16:09:12 +01:00
Martin Kletzander bc5d84b040 addhardware: generate target only if not customizing
Commit 078e1a4d05 changed the fact that
disk target was generated only when adding new disk, not when current
disk is being customized, so fix that back.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2014-02-18 16:09:12 +01:00
Chen Hanxiao 155bd7da8f cli: unify tag style
Unify tag style, looks a little better.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-02-18 22:40:39 +08:00
Martin Kletzander 55d5b35e50 Fix generate_target once more
Passing a zero to the generate_target() function's as pref_ctrl
parameter makes the 'if pref_ctrl' conditions obviously false.  Also
the range created was starting from 0 and not from 1.  Apart from
fixing this, also fix tests so they actually test something this time.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2014-02-18 08:14:32 +01:00
Cole Robinson 7c516b382c create: Don't alter caps machine list 2014-02-17 11:56:54 -05:00
Cole Robinson 63b27ceae1 caps: Simplify guest lookup routines
Checking for acceleration should always be done, API users can opt out
by requesting a specific domain type.
2014-02-17 11:54:11 -05:00
Cole Robinson 96232ba2f0 details: Don't stretch machine dropdown 2014-02-17 10:28:02 -05:00
Cole Robinson a37b200f69 create: Fix non-x86 qemu/kvm guest creation 2014-02-17 10:24:59 -05:00
Cole Robinson 0169042c1e connect: Fix connecting to lxc:/// URI 2014-02-17 10:22:24 -05:00
Chen Hanxiao fa622273a0 delete: fix an improper comment
commit b2a7c396 introduce confirmation before deleting,
we should keep the comment consistent with it.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-02-17 21:11:49 +08:00
Cole Robinson b83ee891ab Prep for release 1.0.0 2014-02-14 18:45:01 -05:00
Cole Robinson 5d5be6df28 Remove some pylint 2014-02-14 11:37:47 -05:00
Cole Robinson 20b103d910 tests: test_inject: Minor fixups 2014-02-14 11:35:29 -05:00
Cole Robinson 63a575f631 network: Fix detecting when network is deleted through the UI 2014-02-14 11:35:00 -05:00
Cole Robinson f431efc9b7 tests: Don't overwrite mkstemp, just check environment
Since this can interfere with the initrdinject test
2014-02-14 11:02:35 -05:00
Cole Robinson d9d50db522 ui: Add margins to 'description' text fields 2014-02-14 10:21:21 -05:00
Cole Robinson e4711061c4 snapshots: Make sure 'current' icon is always visible (bz 1065074) 2014-02-14 10:20:37 -05:00
Cole Robinson 88538f916d connection: Actually fix domain event deregister 2014-02-14 10:00:45 -05:00
Cole Robinson 517fbe0b30 createinterface: Catch error when creating stub (bz 1065042) 2014-02-14 09:27:56 -05:00
Cole Robinson 4b98a471b9 manager: Handle multiple vm-added signals
Our conn.tick idle dispatcher can be racey, handle it in manager.py
2014-02-13 11:17:14 -05:00
Cole Robinson 3f27bc1bd1 connection: Fix race when updating conn.vms
We update the canonical conn.vms list in an idle callback, so any parts
of the main UI thread won't see the conn.vms change while they are
iterating over it.

Problem with this, is that if multiple ticks() are scheduled before
the first idle handler has a chance to run, we can overwrite the VM
list can fail to be correctly updated.

Fix this by only updating 'vms' if it actually changed.
2014-02-13 11:17:14 -05:00
Martin Kletzander 078e1a4d05 Rework disk target assignment
Using previous patches, this one makes the disk target generation a
bit more intelligent, so adding multiple disks with various
controllers is not a problem anymore.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1036716

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2014-02-12 21:55:32 +01:00
Martin Kletzander 6c4302b0a7 disk: generate target controller-wise
Add an optional parameter to generate_target() that controls what
controller the disk should reside in (using libvirt's rules to create
addresses).

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2014-02-12 21:55:32 +01:00
Martin Kletzander a9c791b5b8 Add target_to_num method
Opposite to num_to_target.  It will be used in future patch.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2014-02-12 21:55:32 +01:00
Martin Kletzander 55e85b1612 Unify prettification of VirtIO serial
Use the same case for occurrences of 'VirtIO' which start with
uppercase V.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2014-02-12 21:55:32 +01:00
Martin Kletzander 4196f4287b Use proper python version
since we work with python2 only, mentioning it in all shebangs make
the commands from git work even when python3 is set as default.

This also fixes one test where command being ran is 'virt-xml' through
subprocess.Popen().

While at that, add '-tt' where possible in order to make everyone use
same indentation characters.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2014-02-12 21:55:32 +01:00
Martin Kletzander ab4fd40e96 pylint: Don't use space after 'print'
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2014-02-12 21:55:32 +01:00
Cole Robinson a808bd6692 connection: Handle volume XMLDesc errors (bz 1064275)
This commonly happens when a file is deleted from a storage pool
behind libvirt's back.
2014-02-12 13:57:44 -05:00
Cole Robinson d680539b46 Add missing test file 2014-02-12 13:57:36 -05:00
Chen Hanxiao b53b3874a4 virt-xml: add "-c" as short option of "--connect"
Add "-c" as short option of "--connect" for virt-xml.

We could use either
virt-xml -c lxc:///
or
virt-xml --connect lxc:///

This will be more convenient if we operate
non-default hypervisor.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-02-12 22:57:40 +08:00
Giuseppe Scrivano cbec4b10ab ui: add support for gluster fs
Add a new field "pool-source-name" in the createpool UI that is used
only with gluster fs pools.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-02-12 15:46:26 +01:00
Giuseppe Scrivano 7a1ffff927 storage: add support for gluster fs pools.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-02-12 15:46:25 +01:00
Giuseppe Scrivano a2706e9258 storage: add new attribute "source_dir"
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-02-12 15:46:25 +01:00
Giuseppe Scrivano dd0af85d5a storage: make "target_path" optional
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-02-12 15:46:25 +01:00
Cole Robinson 1401cda924 domain: pmsuspended domains can be turned off 2014-02-11 16:40:37 -05:00
Cole Robinson 7aecd1a9b8 connection: Fix deregisterevent tracebacks on app close 2014-02-11 16:26:15 -05:00
Cole Robinson 875e3cdc7b domain: Remove old libvirt curvcpus back compat
It shouldn't matter much nowadays
2014-02-11 16:23:51 -05:00
Cole Robinson b1697056e4 prefs: Change the tick interval to 3 seconds
Most libvirt usage now shouldn't need a high tick interval, since
we are using async events. So raise it.
2014-02-11 15:45:05 -05:00
Cole Robinson d220cc5d52 preferences: Allow disabling VM CPU poll
With this, the only libvirt API call we hit on each tick is the
connection nodeinfo.
2014-02-11 15:45:05 -05:00
Cole Robinson a70b836b2d domain: Move get_title near similar get_description 2014-02-11 15:45:05 -05:00
Cole Robinson e42835b0ff details: Don't poll XML if using domain events 2014-02-11 15:45:04 -05:00
Cole Robinson e0381cc970 connection: Deregister event callbacks on close 2014-02-11 15:45:04 -05:00
Cole Robinson 4442f1f9be Use network lifecycle events if available
This just allows us to be more reactive to network lifecycle changes.
2014-02-11 15:45:04 -05:00
Cole Robinson c7cd6ca2d3 Use libvirt events for domain lifecycle tracking (bz 836703)
When events were successfully registered, we skip the VM listing on
every tick, and instead trigger a manual refresh whenever a VM event
is received. Not as efficient as it should be, but saves us a lot of
API calls.
2014-02-11 15:45:04 -05:00