IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
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.
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.
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>
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>
(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>
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.
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.
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.
And clean up the API mess while we are at it. Treat the key as an opaque
value that users shouldn't depend on.
Besides the improved code clarity and API layout, this will help diagnose
'key error' issues, since we'll see an object name instead of UUID which
is hard to trace back.
Rather than register a bunch of functions to call, lump it all into
one function per page. This allows us to easily call UpdateDevice
unconditionally, to pick up any addition hotplug operations that
become available via libvirt and qemu.
Libvirt not allowed uid/gid_start
configured as none 0 or not specified.
This patch will disable config uid/gid_start in UI.
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
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.
We acted like it would migrate a shutoff VM, but it just toggled
the LIVE flag. We should support true 'offline' migration, but
the UI will be different.
Racey shutdown can mean we try to poll disk stats at a time when
it won't work. Resetting the lists give things a chance to work
correctly when the VM is rebooted.
- Add options in the model drop down for clear, hvdefault, and app default
- Make 'copy host' a check box, when enabled it hides the model dropdown
- Detect if the VM CPU is a copy of the host CPU
- Undocumented bit that allows passing in host-model/host-passthrough
to the model field for people that really want those settings.
Much of uihelpers is just simple stuff that's shared between addhw
and details UI, so just make it staticmethods in addhw, which details
already has a reference to.
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>
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.
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>
This was originally there for when we weren't defaulting to spice.
We basically do that now, so people shouldn't have much need to
switch spice on/off for an existing guest. Plus if we wanted to
be far about it we would want to add/remove qxl as well but there
it's just getting rediculous.
Show a screenshot in the 'new snapshot' wizard. If we successfully create
that snapshot, save the screenshot in
~/.cache/virt-manager/$connuri/$vmuuid/snap-screenshot-$snapname.$ext
And show it in the snapshot details overview. We don't do any reaping
on snapshot delete, vm delete, etc, but that could be added later.
We sort them separately in the snapshot list, explicitly mention that
they are 'external', and add a UI field listing the memory/disk
details.
In general mixing internal and external snapshots is a recipe for
confusion and disaster, so I think the best thing to do is at least
acknowledge their presence in the UI but not make any attempt to
predict what will or will not work.
So we unify parsing and building the XML.
Since we already do this for vmmDomain, take the opportunity to move
the shared infrastructure into vmmLibvirtObject
It fixes this exception while removing a VM:
Traceback (most recent call last):
File "virt-manager/virtManager/details.py", line 1438, in refresh_vm_state
self.change_run_text(vm.hasSavedImage())
File "virt-manager/virtManager/domain.py", line 1238, in hasSavedImage
return self._backend.hasManagedSaveImage(0)
File "/usr/local/lib/python2.7/site-packages/libvirt.py", line 852, in hasManagedSaveImage
if ret == -1: raise libvirtError ('virDomainHasManagedSaveImage() failed', dom=self)
libvirt.libvirtError: Domain not found: no domain with matching uuid
'7c3eebec-9b22-48ea-b9a2-3341840d0476' (test)
Traceback (most recent call last):
File "virt-manager/virtManager/manager.py", line 885, in vm_status_changed
self.vm_selected()
File "virt-manager/virtManager/manager.py", line 1009, in vm_selected
self.change_run_text(vm.hasSavedImage())
File "virt-manager/virtManager/domain.py", line 1238, in hasSavedImage
return self._backend.hasManagedSaveImage(0)
File "/usr/local/lib/python2.7/site-packages/libvirt.py", line 852, in hasManagedSaveImage
if ret == -1: raise libvirtError ('virDomainHasManagedSaveImage() failed', dom=self)
libvirt.libvirtError: Domain not found: no domain with matching uuid
'7c3eebec-9b22-48ea-b9a2-3341840d0476' (test)
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This adds initial UI for managing snapshots: list, run/revert, delete,
add, and redefining (for changing <description>) supported, but currently
only for internal snapshots. The UI is mostly in its final form except for
some bells and whistles.
The real remaining question is what do we want to advertise and support.
Internal (qcow2) snapshots are by far the simplest to manage, very
mature, and already have the semantics we want.
However most recent libvirt and qemu work has been to facilitate
external snapshots, which are more extensible and can be performed
live, and with qemu-ga coordination for extra safety. However
they make things much harder for virt-manager at the moment.
Until we have a plan, this work should be considered experimental
and not be relied upon.
This simple patch fixes three issues:
1) We used only one list of storage formats. However, we are able to
use some formats which we cannot create. This patch adds a list
called 'no_create_formats' and moves such formats (currently only
one) into it and uses new parameter 'create' which describes
whether such formats should be removed or not.
2) When creating new storage with the above fixed, we need to set the
combobox's text to "" in order not to change it to "raw". This
was already done in reset_state(), but we need it also when
toggle_storage_select() happens and it doesn't hurt in
set_initial_state(), so I abstracted the implementation into
populate_disk_format_combo().
3) It's a bit unrelated, but when bus of a domain disk gets changed
(in details.py), the address was not cleaned up properly ('target'
attribute was still kept), so I fixed up the VirtualDeviceAddress
as well.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=907289
Some callbacks could try to access a domain that was just deleted and
not accessible anymore. Detect these cases and don't propagate the
exception.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Now when a password is used a check box must be explicitely selected.
This enable the possibility to set an empty password "".
Solves: https://bugzilla.redhat.com/show_bug.cgi?id=749718
Signed-off-by: Giuseppe Scrivano <gscrivano@gnu.org>
(crobinso: fix minor pylint violation)