Commit Graph

620 Commits

Author SHA1 Message Date
Cole Robinson
56c091600a details: Move hostdev prettyifier to virtinst 2014-09-20 14:56:57 -04:00
Cole Robinson
5130d959e5 cli: Advertise the --host-device option as --hostdev
It annoys me that all the other CLI options map to the libvirt XML name,
except this one. Of course, keep the old option around for back compat,
just give precendence to the new option.
2014-09-20 14:29:34 -04:00
Cole Robinson
5bbd46a070 cli: Fix suddenly appearing pylint warning :/ 2014-09-20 14:22:29 -04:00
Cole Robinson
c88d085d03 virt-xml: Make --remove-device --host-device <str> work
Need to add some infrastructure for arbitrary lookup functions
2014-09-20 14:22:29 -04:00
Cole Robinson
35c86a775a nodedev: Simplify parameter comparison 2014-09-20 14:22:03 -04:00
Cole Robinson
cf80b4e013 cli: Show failing option via virt-xml --remove lookup 2014-09-20 13:53:27 -04:00
Cole Robinson
a3c6637989 nodedev: Share comparison logic for cli string lookup 2014-09-20 12:58:51 -04:00
Cole Robinson
dd67c48233 connection: Handle nodedev polling too
And cleanup up a bunch of nodedev functions as a result
2014-09-20 12:04:49 -04:00
Cole Robinson
8cd4958a19 cli: Break out function to disable libvirt error printing
We need it early in the test suite
2014-09-20 12:04:37 -04:00
Cole Robinson
439e5ad0fe details: Reorg a bunch of the global helpers
Some were redundant, some should be in virtinst
2014-09-20 10:23:19 -04:00
Cole Robinson
ca2ee52eb8 virtinst: cli: Move unshared bits to virt-install
Since virt-image is gone, this stuff should all be private to virt-install
2014-09-19 20:31:22 -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
052220cfc8 virtinst: Add DomainCapabilities parser 2014-09-17 18:29:24 -04:00
Lin Ma
2f62ba964c Add comparison function for NodeDevice
PCIDevice and USBDevice include respective comparison logic.

Signed-off-by: Lin Ma <lma@suse.com>
2014-09-16 11:41:13 -04:00
Laszlo Ersek
d2fffa509e virt-install: add support for OVMF
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
2014-09-16 09:47:02 +02:00
Giuseppe Scrivano
21319c4232 osdict, libosinfo: use "minimum" resources when "recommended" is missing
Some OS entries in libosinfo miss the "recommended" resources block.
In this case use the "minimum" resources when available.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-09-16 09:12:04 +02:00
Giuseppe Scrivano
0218d29a35 virtinst: add ich9 to the list of audio models
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-09-16 09:04:14 +02:00
Chen Hanxiao
30c3434916 test: update compare_check flags for auto-clone cases
auto-clone cases use SUPPORT_CONN_BARE_BACKINGSTORE,
which check libvirt 1.2.4.
Change it to SUPPORT_CONN_LOADER_ROM(1.2.9)
and drop SUPPORT_CONN_BARE_BACKINGSTORE.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-09-16 10:03:27 +08:00
Chen Hanxiao
4a83ea3a83 test: skip unit tests affected by loader extention before libvirt 1.2.9
libvirt commit for 1.2.9
68bf13dbef8342eaee0bf57c73cebb60b7de11e8
conf: Extend <loader/> and introduce <nvram/>

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-09-16 10:02:57 +08:00
Cole Robinson
eb7612356e virtinst: Switch to relative imports, fix cyclic import warnings 2014-09-12 16:28:38 -04:00
Cole Robinson
f512c05381 diskbackend: Get volume path from XML
The XML is likely already cached, and path() can hit the network, so
this can speed things up.
2014-09-12 16:28:38 -04:00
Cole Robinson
3064f4058d diskbackend: Simplify pool source lookup
Have it share logic with a similar routine
2014-09-12 16:28:38 -04:00
Cole Robinson
508debaf2d virtinst: Don't needlessly call conn.getType 2014-09-12 16:28:37 -04:00
Giuseppe Scrivano
a94cc98238 osdict: merge _OsVariantOsInfo with _OsVariant
Make a new class _OsVariantType which contains only the minimum
information shared between a OS type and an OS variant.

As it is not possible anymore to specify the type as the variant name,
define some alias names.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-09-12 10:36:11 +02:00
Giuseppe Scrivano
1291ffc8b7 osdict: _OsVariantOsInfo._init_ doesn't call _OsVariant._init_
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-09-12 10:36:11 +02:00
Giuseppe Scrivano
cbe5ffcee7 osdict: drop attribute "parent" from _OSVariant
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-09-12 10:36:11 +02:00
Lubomir Rintel
cf79f06559 nodedev: Be more descriptive about USB device identification
libvirt often passes devices with vendor and product information missing or
malformed, making the USB sharing dialog ugly or useless to the point it's
impossible to identify the device.

This aims to fix pretty-printing of weird textural identification and fall
back to numeric product and device id (in case textual represetations are
not present in the descriptor and device is too new to be in device
database).
2014-09-11 15:37:10 -04:00
Chen Hanxiao
61eadad354 distroinstaller: fix a typo
s/prepartions/preparations

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-09-11 11:08:22 +08:00
Chen Hanxiao
2987c721fb virtinst: fix a pylint warning
fix a "attribute-defined-outside-init" warning.
We set installer.livecd in virt-install.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-09-11 09:33:50 +08:00
Cole Robinson
db41d9459f cli: Don't error if logfile setup fails (bug 1138991)
If the logfile is owned as root, like could happen if the first run of
virt-manager is done via 'su -c' or similar, virt-manager refustes to
start on subsequent runs under reduced privs. Just log an error and
skip the logfile setup if that happens.
2014-09-08 10:51:34 -04:00
Cole Robinson
17f57eaaa7 Centralize call to setup_i18n in virtinst __init__
No need to call it twice
2014-09-08 10:42:44 -04:00
Cole Robinson
d9ca950acb distroinstaller: Don't attempt distro detection for remote CDROMs
We shouldn't access the local disk in this case
2014-09-07 16:16:39 -04:00
Cole Robinson
d8d6af55e5 distroinstaller: Cache fetcher and distro store lookups
Since we already determine the distro store ahead of time via
check_location and detect_distro, cache the result in the installer
class to save us some network traffic.
2014-09-07 14:40:09 -04:00
Cole Robinson
050d0fb16e urlfetcher: Make fetcher cleanup idempotent 2014-09-07 14:22:56 -04:00
Cole Robinson
faa0ef5e55 urlfetcher: Point to man page if location URL is invalid 2014-09-07 14:01:40 -04:00
Cole Robinson
46e135c7a1 urlfetcher: Remove outdated comment 2014-09-07 13:59:54 -04:00
Cole Robinson
a8843e5807 virtinst: Remove redundant LiveCDInstaller
DistroInstaller can basically do the same thing. This also gives us distro
detection when using virt-install --livecd
2014-09-07 13:42:56 -04:00
Cole Robinson
1247e8d43e installer: Don't needlessly pass around scratchdir 2014-09-07 13:35:34 -04:00
Cole Robinson
a722eeac78 virt-install: Enable libosinfo detection for --cdrom
This streamlines virt-manager and virt-install implementations, requiring
installer.distro_detect to be called if we want distro detection. As
a side effect, we now get CDROM detection for free.
2014-09-07 12:20:26 -04:00
Cole Robinson
bfb3174ec2 osdict: Manually tweak 'supported' info
Many old OSes don't have an EOL date tracked with libosinfo, and
we just treat them as 'supported'. So the default distro list in
the create wizard is wayyy too huge and contains all sorts of
crazy options.

Assume lack of EOL date means 'unsupported', and add a manual whitelist
for some still common distros. We will fix this at the libosinfo level.
2014-09-07 10:49:50 -04:00
Cole Robinson
eb01bc1b61 osdict: Disable virtioconsole default
We used to enable this for Fedora 18+, because systemd would
autostart a getty on /dev/hvc0 which made 'virsh console' work
out of the box for a login prompt. However now in Fedora
virtio-console is compiled as a module, and systemd doesn't
detect it in time to start a getty. So the benefit of using
it as the default is erased, and we reverted to this.

More info: https://bugzilla.redhat.com/show_bug.cgi?id=1039742
2014-09-06 18:37:20 -04:00
Cole Robinson
5aafe008bc Remove virt-image, as scheduled
As promised with the last release, remove virt-image. In 6 months I didn't
hear a peep from any actual users that cared.
2014-09-06 18:05:43 -04:00
Cole Robinson
2e7d477156 urlfetcher: Bunch of distro detection fixes
And update test_urls to ensure it's passing
2014-09-06 16:42:09 -04:00
Cole Robinson
95f8b4c6b0 distroinstaller: Fix https:// installs 2014-09-06 15:08:40 -04:00
Cole Robinson
f2f2c1fd95 Fix some pylint 2014-09-06 13:47:10 -04:00
Cole Robinson
7d25dbe7a3 osdict: Always use vmvga for ubuntu
There's been a couple reports recently that virt-manager's default of video
model=qxl doesn't work well with latest ubuntu 14.04:

https://bugzilla.redhat.com/show_bug.cgi?id=1129803
https://lists.fedoraproject.org/pipermail/virt/2014-August/004105.html

However vmvga works, so let's use it for all ubuntu versions and not just a
couple of them. Marc Deslauriers confirmed it should be safe.
2014-09-06 13:45:15 -04:00
Cole Robinson
d89888a7bd osdict: Don't force encode cirrus as the video default
Forcing cirrus isn't correct for non-x86 architectures, so let's have
libvirt fill in the default so there's only one place to fix it.
2014-09-06 13:45:15 -04:00
Cole Robinson
0759a31acc osdict: Turn videomodel check into a function
The previous setup of having an OS register a preferred videomodel is
overly simplistic and doesn't cover all our needs. Rework it without any
logic change for now, we will alter the logic in subsequent commits.
2014-09-06 13:45:15 -04:00
Cole Robinson
d1f46a75e7 cli: Don't rely on libvirt to generate MAC if mac=RANDOM (bz 1130449) 2014-08-15 15:02:57 -04:00
Giuseppe Scrivano
c1fd79c4f7 virtinst, snapshot: do not hardcode the value of VIR_DOMAIN_PMSUSPENDED
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-08-01 09:30:21 +02:00