Commit Graph

5069 Commits

Author SHA1 Message Date
Mikhail Feoktistov
3870001fd2 virtinst: Add tests for Virtuozzo hypervisor 2017-03-01 15:45:24 -05:00
Mikhail Feoktistov
f78ff6457b Do not use createXML for non transient domains
For these domains use defineXML

(crobinso: Add undefine on start() failure)
2017-03-01 15:27:37 -05:00
Cole Robinson
fc6778108b guest: Don't set any defaults for on_*
Currently we hardcode these defaults for installing VMs:

  <on_poweroff>destroy</on_poweroff>
  <on_reboot>destroy</on_reboot>
  <on_crash>destroy</on_crash>

And these for post-install config:

  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>

But this has some issues. on_crash=restart is problematic in that most
configs don't support it, and some like virtuozzo actively reject it.
Additionally this we should leave as much to libvirt defaults as we
can, which are more sensible in this case.

Drop everything except setting on_reboot=destroy for the install time
case (which is required for our config changes). Since on_poweroff
and on_crash already default to 'destroy', the install time config
is unchanged, and the post-install config now on_crash=destroy instead
of 'restart'.

The s390 on_crash=preserve workaround is dropped, which was intended
to avoid a reboot loop caused by on_crash=reboot
2017-03-01 14:17:51 -05:00
Marc-André Lureau
1f0d1d3f7d xmlbuilder: add a __repr__ for XMLBuilder object
To help with debugging.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2017-02-23 19:42:00 -05:00
Cole Robinson
0055798d21 tests: Move __init__ logic into functions, for clarity 2017-02-23 18:47:57 -05:00
Marc-André Lureau
dffb2aaa2d virtinst/cli: add spice rendernode argument
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2017-02-23 18:31:43 -05:00
Marc-André Lureau
4c82ff59e8 virtinst: clean @listen attribute on listen=none
Clear the obsolete @listen attribute when setting listen to none.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2017-02-23 18:31:43 -05:00
Marc-André Lureau
ae3cc58369 virtinst: remove unnecessary autoport when listen=none
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2017-02-23 18:31:42 -05:00
Marc-André Lureau
a5f4b8a57f support: bump libvirt requirements for GL
libvirt 3.1.0 improves spice/GL support with rendernode options, file
cgroup/namespace rights etc, that are required for qemu:///system to
work without additional tweaking.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2017-02-23 18:31:37 -05:00
Marc-André Lureau
35e6003ba5 nodedev: add DRMDevice
drm capability has been proposed for libvirt 3.1, it provide Direct
Rendering Manager (DRM) devices.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2017-02-23 18:30:00 -05:00
Marc-André Lureau
a861629f0c nodedev: add DevNode children and helper
<devnode> have been proposed for libvirt 3.1, it provides device /dev/
path when available.

The get_devnode() helper will return the by-path/ path preferably, as
they should be stable.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2017-02-23 16:30:44 -05:00
Marc-André Lureau
806bbbb4ea tests/nodedev: make compare recursive
This will allow to have nested dict for childrens. See the following
commits.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2017-02-23 16:30:44 -05:00
Cole Robinson
cd2ade9fd7 tests: Fix with latest osinfo-db output 2017-02-22 14:40:49 -05:00
Mario Trangoni
83a40a932f NEWS: convert to Markdown format. 2017-02-16 19:02:22 -05:00
Mario Trangoni
07db3f178e HACKING: convert to Markdown format. 2017-02-16 19:02:01 -05:00
Mario Trangoni
aa7d9c4593 INSTALL: convert to Markdown format. 2017-02-16 19:01:42 -05:00
David H. Gutteridge
9a451e6faa Remove minor redundancy in action_remove_device()
There's no need to call util.listify() twice.
2017-02-16 13:31:32 -05:00
Pavel Hrdina
b8dccf6aca virtManager/viewers: fix connection to remote SPICE with password
When connecting to remote SPICE we use ssh tunnel if the SPICE is
listening only on "localhost".  Our ssh tunnel scheduler uses locks
to serialize the requests for FD in order to not spam user for ssh
password.

However when the main_channel is connected and emits AUTH_ERROR
we ask user for password and request for new FD.  Unfortunately
after the new request is handled we didn't unlock the scheduler
and all other request would remain waiting for the lock.

We need to unlock every FD request for the SPICE main channel not
only the first one when the channel itself is created.

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

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-02-10 09:43:20 +01:00
David H. Gutteridge
2b9d468176 Add caveats section to virt-xml.pod
Caveats section added to warn users that some changes made to a VM's definition may be ignored by the virtualization host.
2017-02-09 16:33:00 -05:00
Pino Toscano
46f4abbb50 inspection: try low quality icons as fallback
When there is no high quality icon for a guest, try getting the low
quality icon.  This should make virt-manager show icons for Ubuntu and
Windows guests.
2017-02-09 16:29:27 -05:00
Pino Toscano
3c95d20994 inspection: consider also epoch for pkg version
When composing the string of the version of packages, prepend also the
epoch, as it is an important part of the package version.
2017-02-09 16:29:27 -05:00
Pino Toscano
ebf4ade208 inspection: show OS type in Inspection page
Show also a pretty label for the OS of the guest, in addition to
hostname and product name.
2017-02-09 16:29:27 -05:00
Pino Toscano
f7a726dc70 inspection: rename variable for OS type
'type' is ambiguous as name, it might conflict with the Python builtin.
Instead, rename it to 'os_type' to get rid of the issue altogether.
2017-02-09 16:29:27 -05:00
Pavel Hrdina
2df8dc39e8 virtManager/interface: detect whether IP address comes from DHCP server
When the network interface is up the active XML contains only IP address
even in case that the inactive XML was configured to get the IP address
from DHCP server.  To propagate this information back to UI we need to
get both XMLs to figure out current IP addresses and the configuration.

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

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-02-06 09:11:00 +01:00
Arondight
741ad25bfe Corrected translation for zh_CN
Remove the '%s', it is strange here.
2017-02-05 15:59:19 -05:00
Cole Robinson
e0937f8b05 Update translations 2017-02-05 15:58:54 -05:00
Cole Robinson
9bfd9f66c8 spec: README->README.md
And fix the MANIFEST as well
2017-02-05 15:47:36 -05:00
Cole Robinson
4a365046d6 spec: Add virt-install libvirt-client dep (bz 1416752)
Since we unconditionally attempt to call 'virsh console' for certain
configs.

https://bugzilla.redhat.com/show_bug.cgi?id=1416752
2017-02-05 15:44:33 -05:00
Pavel Hrdina
798a2e5080 virtManager/addhardware: get supported disk bus types from libvirt
Libvirt provides domain capabilities where supported disk bus types are
listed.  Virt-manager should try to get those bus types.  The old code
remains as fallback if domain capabilities doesn't contain the disk
bus types.

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

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-01-24 08:37:17 +01:00
Pavel Hrdina
67998282a7 ui/snapshots: add a tooltip for refresh button
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1375452

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-01-18 13:33:42 +01:00
Pavel Hrdina
f07a3021d9 virt-install: fix --wait=0 to behave like --noautoconsole
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1371781

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-01-18 13:11:43 +01:00
Pavel Hrdina
888fcf7aec man/virt-install: remove -c as short for --connect
Argument -c is short for --cdrom so fix the man page.

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

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-01-18 09:48:56 +01:00
Pavel Hrdina
ceda7a5dbf virt-manager: don't autostart other connection if --show-* was specified
Broken by commit a9bc56add3.

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

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-01-17 17:55:25 +01:00
Pavel Hrdina
b4239b7538 tests: fix virt-xml test
Broken by commit b1c0a1c2d9.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-01-17 17:47:46 +01:00
Pavel Hrdina
b1c0a1c2d9 virtinst/cli: set default value for disk sparse to "yes"
Commit 41a84bae9 reworked CLI parsing, but lost the default value disk
sparse option.  Man page also states that the default value is "yes".

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

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-01-17 12:54:12 +01:00
Pavel Hrdina
45a3d50668 man: virt-install: keymap is valid for spice graphics as well
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1399091

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-01-13 13:20:47 +01:00
Mario Trangoni
d02a1230d5 README: convert to Markdown format. 2016-12-22 14:32:46 -05:00
Cole Robinson
10715eb50c urlfetcher: Fix incorrect comment
Added via 3f15a489cd when the code was reworked, but the default has
always been i386. Maybe we should change it to amd64, but it needs
testing. In the mean time, fix the comment.

Spotted at 3f15a489cd (commitcomment-20111744)
2016-12-13 14:37:16 -05:00
Cole Robinson
e369580450 tests: test_urls: update data 2016-12-13 14:36:24 -05:00
Cole Robinson
88bfdf4926 console: Fix resize to VM on wayland (bug 1397598)
Yet another issue with not using window.get_size() and instead using
its size allocation directly, which differ on wayland due to client
side decorations.

https://bugzilla.redhat.com/show_bug.cgi?id=1397598
2016-12-13 13:34:09 -05:00
Cole Robinson
107aa2b134 manager: Fix window size tracking on wayland (bug 1375175)
The method we were using is a common implementation bug,
explained here: https://wiki.gnome.org/HowDoI/SaveWindowState

https://bugzilla.redhat.com/show_bug.cgi?id=1375175
2016-12-13 13:34:09 -05:00
Cole Robinson
617b92710f osdict: Don't return virtio1.0-net as a valid device name (bug 1399083)
We can't depend on libosinfo device names being valid libvirt network
model names, so use a whitelist

https://bugzilla.redhat.com/show_bug.cgi?id=1399083
2016-12-13 12:58:14 -05:00
Cole Robinson
435de2d40c pylint: Fix some issues with F25 version 2016-12-13 12:36:49 -05:00
Cole Robinson
a7d3949080 pylint: disable wrong-import-position
We need it in some cases, and it's a minor style issue
2016-12-13 11:49:03 -05:00
Seeteena Thoufeek
5a11cf0782 virt-manager generates invalid guest XML
The virt-manager application generates invalid guest XML when a
 spapr-vio SCSI model controller is changed to a virtio-scsi model controller.

1. Create a guest
2. Add an spapr-vio controller to the guest via this gui path:
->Add Hardware
->Controller
->Type SCSI
->Model Hypervisor default
At this point, there will be a valid spapr-vio SCSI controller defined:
    <controller type='scsi' index='0'>
      <address type='spapr-vio' reg='0x2000'/>
    </controller>
3.Now modify the above SCSI controller using this gui path:
->Choose "Controller sPAPR SCSI" on left pane
->Choose "VirtIO SCSI" for the Model on the right pane
->Apply
At this point, there will be a SCSI controller definition which is invalid due to an incorrect address type:
~# virsh dumpxml dotg2|grep -A2 -i scsi
    <controller type='scsi' index='0' model='virtio-scsi'>
      <address type='spapr-vio' reg='0x2000'/>
    </controller>
Any attempt to start the guest will throw this error:
error: Failed to start domain dotg2
error: internal error: process exited while connecting to monitor: 2016-12-02T17:45:12.989165Z qemu-system-ppc64le: -device virtio-scsi-pci,id=scsi0,reg=0x2000: Property '.reg' not found

virt-manager fails to realize that the address type needs to be changed to a PCI address for a virtio-scsi controller.

If you change the model, you are supposed to leave the address field empty, so that libvirt sets it correctly. Or change the address field also appropriately.

Note that this bug can be reproduced entirely within virt-manager.  No manual editing of guest XML is being done here.  So, fix is to make virt-manager delete the address field when the SCSI controller model is changed, allowing libvirt to automatically assign a new address with the correct type.

Signed-off-by: Seeteena Thoufeek <s1seetee@linux.vnet.ibm.com>
2016-12-12 21:12:09 -05:00
Marc-André Lureau
ee6a60a9b9 virtinst: error out if spice+gl is not supported
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-11-14 09:55:43 +01:00
Marc-André Lureau
b4858842f9 virtinst: fix bad version check regression from 55327c81b7
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-11-14 09:03:30 +01:00
Cole Robinson
7962672c71 virt-install: Fix error checking extra_args
Later bits in the code that want to warn based on extra_args content
don't handle the None case. Be consistent and convert it to a list
everywhere.

Mentioned at https://bugzilla.redhat.com/show_bug.cgi?id=1376547#c9
2016-11-02 10:27:14 -04:00
Chen Hanxiao
8eb0a9002f gfxdetails: active SpinButton when mnemonic key of 'Port' or 'TLS port' pressed
Currently when press mnemonic key of 'Port' or its CheckButton,
the behaviour is the same:
  check 'Auto' CheckButton.
which is not right.

This patch will change the behaviour:
  when press mnemonic key of 'Port',
  change the focus to graphics-port SpinButton.
So as 'TLS Port'.

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
2016-11-01 22:04:43 +08:00
Guido Günther
a26c656d5c osdict: Debian8 onwards has qemu-ga 2016-10-31 09:07:33 -04:00