Commit Graph

168 Commits

Author SHA1 Message Date
Cole Robinson
776c1d97c6 domain: Fix changing USB device model
Broken before v1.2.0
2015-05-19 18:29:45 -04:00
Cole Robinson
2168f33799 details: Unify controller model handling with addhardware 2015-05-19 18:29:45 -04:00
Cole Robinson
32d998b216 domain: Properly prime stat lists at object creation
Fixes graph spikes when initially connecting to a running VM
2015-05-04 18:42:26 -04:00
Cole Robinson
cb0eaf23d8 conn/domain: Privatize stats list 2015-05-04 18:42:17 -04:00
Cole Robinson
fbf841151d conn/domain: Condense the internal stats APIs 2015-05-04 18:05:54 -04:00
Cole Robinson
848123e6c8 domain: Fix memory stats for shutoff VM (bz 1215453)
memory doesn't have a separate input/output stats, so we shouldn't use
the in_out_vector_helper. This resulted in shutoff VMs appearing to still
use memory in the manager window.
2015-05-04 15:50:01 -04:00
Cole Robinson
a8d3afbcd9 domain: Log initial XML for virtinst/customize object 2015-05-03 17:01:16 -04:00
Cole Robinson
18a6d8b444 migrate: Add 'temporary' option
This doesn't undefine the VM source, and leaves it temporary on the
destination. Basically the default migration action
2015-04-21 17:39:44 -04:00
Cole Robinson
fb26349546 domain: Make the tick() logic easier to follow 2015-04-21 17:15:58 -04:00
Cole Robinson
62ad0e91ee migrate: Big reworking of the dialog
It's largely the same, but now

- The code is better organized
- The UI is much more streamlined, only showing relevant fields when
  required.
- We warn about the hostname/URI cases that we know libvirt will error on
- Drop some of the attempts at being smart, and just mimic what libvirt
  will do.
2015-04-21 17:15:58 -04:00
Cole Robinson
692604e0a3 domain: migrate: Use UNDEFINE_SOURCE
Leaving a VM defined on the source is dangerous: if they are sharing
storage, and aren't using virtlockd, then they might be inadvertently
started in two places at once and trash a disk image.

Some people might still need the option to turn this off, so maybe we
will revive it. Not sure though
2015-04-21 16:33:41 -04:00
Cole Robinson
26c729887d domain: migrate: use PERSIST_DEST flag
Don't do it manually, it's been supported by libvirt for 5 years
2015-04-21 16:33:41 -04:00
Cole Robinson
be86785fdd migrate: Drop unused 'live' parameter. We always pass LIVE 2015-04-21 16:33:41 -04:00
Cole Robinson
2b877cf337 migrate: Remove 'max downtime' support
This is only needed when people have very specific downtime constraints
on public facing services. I don't think that covers many virt-manager
users. So suggest they just use the command line for this.
2015-04-21 16:33:41 -04:00
Cole Robinson
39dc0c7b94 migrate: Drop 'bandwidth' UI
A bit too enterprisy for my tastes. If people need this they should use
the command line.
2015-04-21 16:33:41 -04:00
Cole Robinson
e4e4c8c6f7 domain: Some 'customize before install' fixes after XML rework 2015-04-13 17:25:40 -04:00
Cole Robinson
c3fc4ee5a2 console: Drop timeout retry logic
This was needed in the days of old xen + libvirt, but I don't think
it's required nowadays, and if it is it's busted with our XML caching
I think.
2015-04-12 10:24:35 -04:00
Cole Robinson
839ce682b1 Drop support for non-managed save/restore
All major drivers either support it, or don't support save at all,
so I think we can safely drop it. If people still need it they can
get by with virsh.
2015-04-11 13:52:48 -04:00
Cole Robinson
20cd7f86ca domain: Remove manual_reboot
qemu has provided this feature for a long time, and every other driver
we care about provides a reboot implementation as well, so drop our
handling of it.
2015-04-11 11:13:05 -04:00
Cole Robinson
42648f45f0 libvirtobject: Clean up XML invalidation
Make sure we aren't invalidating things when we are using events. Don't
overload APIs so much.
2015-04-10 17:50:06 -04:00
Cole Robinson
a7a19b2abc libvirtobject: Drop redefine_cached
There's no external callers anymore, and the prospect of keeping this
stuff cached but potentially having a thread invalidate it makes me nervous,
so simplify things by making callers explicitly request the object they
want to redefine.
2015-04-10 17:23:11 -04:00
Cole Robinson
1552cb257e domain: Make device XML editing similar to guest XML editing 2015-04-10 17:15:07 -04:00
Cole Robinson
d0ffd954cd connection: Unify initial object refresh handling
Have libvirtobjects advertise a routine specifically for initial setup,
and emit a signal when it's complete. Then dispatch the associated conn
signal on demand as the objects are initialized. This should avoid a
whole class of ordering issues, and is easier to follow IMO.
2015-04-10 15:00:42 -04:00
Cole Robinson
838baf6946 connection: tick: Operate on combined object lists
Makes the flow a bit simpler, and allows us to break out polling without
having to pass around a ton of lists.
2015-04-10 15:00:34 -04:00
Cole Robinson
2d25c920ea connection: Use consistent nodedev function names 2015-04-10 15:00:34 -04:00
Cole Robinson
cb5d075f50 libvirtobject: Unify a few APIs and conn tick handling 2015-04-10 15:00:34 -04:00
Cole Robinson
4933cf7600 libvirtobject: Clarify force_update_status 2015-04-10 15:00:34 -04:00
Cole Robinson
c9b882619e libvirtobject: Add decorator for lifecycle events
That does the appropriate event loop updating, if needed.
2015-04-10 15:00:34 -04:00
Cole Robinson
a3f8d73a9c libvirtobject: Unify internal status APIs and signals
Drop config-changes vs. status-changed and just use one signal, since they
are largely the same code paths for all users.
2015-04-10 15:00:34 -04:00
Cole Robinson
01bf07ba11 libvirtobject: Unify status signals
Dispatch them all from the actual object and not proxied through
the connection. Use the same signal name for all objects with the same
signature.
2015-04-10 15:00:33 -04:00
Cole Robinson
1d98af2c47 create: Move mac address editing to customize dialog
People should rarely need to edit the mac address, so remove it from
the create wizard. However we only allow editing the mac address in
the 'customize' dialog: regular network details disables editing, since
that should be a rare and potentially dangerous operation.
2015-04-07 18:52:35 -04:00
Cole Robinson
938060ae53 domain: Fix customize dialog to show VM config with defaults set
Right now we aren't showing the defaults like disk buses, sound devices,
disk cache modes, etc. This is confusing to the user and not that useful.

Encode the defaults before launching the wizard, so the user can see what
the end config will actually look like.

This might cause weirdness if going back to the create.py wizard, but
we'll see if anyone complains before handling that.
2015-04-07 18:36:06 -04:00
Cole Robinson
be5c2c742c libvirtobject: Clean up the internal XML APIs
There was lots of redundancy and confusing semantics. Document functions,
drop a bunch of unneeded ones.
2015-04-07 17:41:29 -04:00
Cole Robinson
2a31ff0248 guest: Perform stable_defaults check using our emulator
Not passing an emulator is only for showing ideal defaults in the UI.
When doing internal checks, we only want to disable features if we know
the emulator doesn't support them.
2015-03-23 16:49:32 -04:00
Giuseppe Scrivano
61e06856a3 virt-manager: Allow to change SGIO with LUN disk devices
It is added only in the details window, and intentionally not added to
the addhardware UI to keep it simpler.  Users can edit this after a
new device is added.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-03-16 20:32:40 +01:00
Giuseppe Scrivano
ef286321f9 Fix an exception while a XEN domain is shutting-down
I've noticed twice today that 'guestcpus' was set to 0 while the
domain was shutting down.  Play safe and check that 'guestcpus' is > 0
before divide by it.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-02-26 11:08:57 +01:00
Cole Robinson
a04307cd70 virt-install: Add --boot uefi
Will enable UEFI if we know libvirt + hypervisor support it, and libvirt
is advertising a suitable UEFI binary.
2015-02-22 10:25:47 -05:00
Giuseppe Scrivano
51e5a47120 virt-manager: reset vgamem for video when changing device type
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1169295

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-12-01 17:02:22 +01:00
Guido Günther
1726505fd6 s/gconf/gsettings/
GConf got replaced by GSettings but some methods kept the old name
2014-09-29 08:56:37 -04:00
Cole Robinson
d1f36ac875 domain: Fix defining domain after migration 2014-09-29 08:55:47 -04:00
Laszlo Ersek
3e5b61da86 domain: relax the UNDEFINE_NVRAM condition precisely to libvirtd's one
(1) A separate nvram (ie. variable store) file for the domain exists if
and only if the following condition holds:

    (self.get_xmlobj().os.loader_ro is True and
     self.get_xmlobj().os.loader_type == "pflash")

(Refer to libvirtd's qemuPrepareNVRAM() function, as of commit 742b08e30.)

(2) The

    self.get_xmlobj().os.nvram

condition is sufficient, but not necessary, for the separate varstore file
to exist. That is, if the condition holds, then the separate varstore file
exists for sure, but if the condition doesn't hold, the file may exist
nonetheless. (Because libvirtd can auto-generate the varstore file's
pathname.)

This means that requiring condition (2) for setting UNDEFINE_NVRAM on
domain deletion will miss a subset of the cases, ie. when the necessary
and sufficient condition (1) holds, but the sufficient-only condition (2)
doesn't.

Make sure that the code uses the necessary and sufficient condition (1).

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
2014-09-22 12:32:31 -04:00
Cole Robinson
38738d9fa6 connection: Don't close VM dialog on rename
Rework things a bit to simplify everything we pass around.

The specific bug fix is making sure we update the object list in place,
otherwise the event loop detects it as the VM being deleted and closes
the details window.
2014-09-20 17:32:09 -04:00
Cole Robinson
3feedb76e9 domain: Match UNDEFINE_NVRAM conditions with libvirt
Suggested-By: Laszlo Ersek <lersek@redhat.com>
2014-09-19 20:08:59 -04:00
Cole Robinson
ae26313ed4 details: Add UI for enabling UEFI via 'customize before install'
We expose a simple combobox with two entries: BIOS, and UEFI. The
UEFI option is only selectable if 1) libvirt supports the necessary
domcapabilities bits, 2) it detects that qemu supports the necessary
command line options, and 3) libvirt detects a UEFI binary on the
host that maps to a known template via qemu.conf

If those conditions aren't met, we disable the UEFI option, and show
a small warning icon with an explanatory tooltip.

The option can only be changed via New VM->Customize Before Install.
For existing x86 VMs, it's a readonly label.
2014-09-17 18:43:41 -04:00
Cole Robinson
ead9d3f56d domain: If VM has nvram, ask libvirt to remove it on undefine 2014-09-17 18:35:20 -04:00
Cole Robinson
226c4562d5 virtManager: Switch to relative imports 2014-09-12 16:28:38 -04:00
Cole Robinson
5041529822 domain: Cache autostart value 2014-09-12 16:28:37 -04:00
Cole Robinson
1662f75e07 domain: Grab snapshot info at domain init time 2014-09-12 16:28:37 -04:00
Cole Robinson
1cf4671f85 domain: Prime the XML cache when object is created 2014-09-12 16:28:37 -04:00
Cole Robinson
f36d2ed960 domain: Remove the description/title hotplug hacks
We would unconditionally read VM description/hotplug from the inactive
domain XML, this allowed us to emulate metadata hotplug where it wasn't
implemented. However this means we end up doing many needless XMLDesc
calls, which slows down connection startup for low latency connections.

Since SetMetadata has been in libvirt for 2 years now, drop this hack.
2014-09-12 16:28:37 -04:00