Commit Graph

36 Commits

Author SHA1 Message Date
Pavel Hrdina de9cd87fda virtinst.capabilities: return recommended machine for XEN
This is required in order to ask for correct domcapabilities.  If you don't
specify any machine libvirt will return domcapabilities for default machine
which is xenpv.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-06-16 12:16:49 +02:00
Cole Robinson f73a7e69a4 capabilities: Handle xen outputting os_type=linux
F22 libxl xen still puts old style type=linux in the XML, so we need to
handle it for caps lookup
2015-09-22 12:41:57 -04:00
Cole Robinson b15c44923c capabilities: Handle missing cpu_map.xml
It shouldn't be a fatal issue. Hit on freebsd where they install
libvirt bits into /usr/local

https://www.redhat.com/archives/virt-tools-list/2015-September/msg00056.html
2015-09-16 16:55:37 -04:00
Pavel Hrdina 1590490fa3 capabilities: detect ACPI and APIC capabilites properly
Instead of hard-coding that ACPI and APIC are enabled by default, detect
their presence from libvirt capabilities and use it.

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

(crobinso: Adjust for recently added test case)

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-07-14 13:26:42 -04:00
Pavel Hrdina 3ff35898a4 refactor detection of guest type capabilities
Each guest type can have its own capabilities and we should always ask
only for those capabilities.

The old approach was to get capabilities from libvirt and then for
example cycle trough all guests and return True, if any guest type
supports kvm or pae, etc.

Now we check those capabilities only for the correct guest type
according to defaults and input from user.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-07-14 13:11:40 -04:00
Kevin Zhao 8dbe96fc01 virt-manager : add support for architecture type "s390x".
For architecture "s390x",the disk and the network device are base
on "virtio" bus.The cdrom is based on "scsi".So set the default
cdrom bus as "scsi",the default bus as "virtio".Also the default
machine type is set to "s390-ccw-virtio" as it is the only supported
in "s390x".Also add a test cast of virt-install by cdrom in s390x.

(crobinso: Tweak test suite and minor formatting stuff)
2015-07-14 12:45:32 -04:00
Cole Robinson 6fd3983f6d tests: Clean up capabilities test data
Make it clear which ones are used for the caps unit tests, and which
are for cli/UI testing and can be updated at will. And drop a bunch
of outdated stuff.
2015-04-22 19:05:06 -04:00
Cole Robinson 070664b9e7 tests: Enable property checking for all objects
And loosen restrictions a bit so any read/write will trigger the
tracking.
2015-04-22 16:26:03 -04:00
Cole Robinson 36e46d0276 capabilities: Use _CapsInfo to simplife recommended_machine 2015-04-03 17:37:08 -04:00
Cole Robinson 97259c4d9b capabilities: Store results of guest_lookup together
Simplifies API users lives to not have to remember whether caps guest
or caps domain contains a particular value.
2015-04-03 17:37:08 -04:00
Cole Robinson 81a1910d90 capabilities: Rename no_install_options -> has_install_options
It's easier to visually parse the wording
2015-04-03 17:25:29 -04:00
Cole Robinson fe9ffe86f6 capabilities: Drop xen-only bios virt checks
These only work for xen x86, and are less relevant nowadays since HW
virt has been around for a very long time. Also it's tough to be sure
that we aren't giving a bogus warning.
2015-04-03 17:25:29 -04:00
Cole Robinson 4e9f70f9b3 Drop all references to kqemu, it's long dead 2015-04-03 16:45:43 -04:00
Cole Robinson f5b13a6e19 Drop all references to xenner, it's long dead 2015-04-03 16:45:43 -04:00
Cole Robinson d4dfbd41b5 capabilities: Use XMLBuilder for cpu_map parsing
And clean up the internal bits a little
2015-04-03 16:45:43 -04:00
Cole Robinson cac4ac1401 capabilities: Switch to use XMLBuilder
Just a cleanup to finally unify all the XML objects around the same
API, and drop a bunch of old cruft.
2015-04-03 16:45:42 -04:00
Prerna Saxena 232507b4e9 Add support for PowerPC Little Endian (ppc64le) architecture.
This enables virt-install to create VMs based on ppc64le architecture.

(crobinso: fix minor pylint)

Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com>
2015-01-09 10:47:52 -05:00
Cole Robinson c4162f6708 Use -M virt as default machine for arm/aarch64
Centralize the default machine logic in caps and use it consistently
2014-09-23 16:05:48 -04:00
Cole Robinson eb7612356e virtinst: Switch to relative imports, fix cyclic import warnings 2014-09-12 16:28:38 -04:00
Cole Robinson 196ff823b3 Fix warnings with latest pep8 2014-05-02 10:20:59 -04:00
Chen Hanxiao 35c9afad45 test: fix a pylint
After commit 7594cef35f,
pylint show a "access to a protected member" warning.
This patch introduces a static method to solve it.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-04-10 23:15:55 +08:00
Roman Bogorodskiy 7594cef35f tests: fix TestCapabilities.testCPUMap
testCPUMap() tries to open /usr/share/libvirt/cpu_map.xml file
and that fails if libvirt is not installed on the system
or cpu_map.xml path is different.

Force it to use tests/capabilities-xml/cpu_map.xml file instead.
2014-04-08 18:13:03 +02:00
Cole Robinson a99da363a4 capabilities: Handle arch=none for CPU lookup 2014-03-20 14:04:29 -04:00
Cole Robinson 1f5b07bea8 capabilities: Handle broken return value of failed CPUModelNames 2014-03-20 14:04:29 -04:00
Cole Robinson 994b1fa4f4 connection: Add explicit API for getting virConnect object 2014-03-20 14:04:29 -04:00
Giuseppe Scrivano 81696a5144 virtinst: use libvirt getCPUModelNames when available
Read the list of CPU models trough getCPUModelNames instead of
accessing directly the file cpu_map.xml.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1060316

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-03-13 19:00:54 +01:00
Giuseppe Scrivano 6c2645f0d2 virtinst: drop parsing of cpu features
As for the previous patch, this information is not used anywhere and
this information should be retrieved using the libvirt baselineCPU
API.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-03-13 16:50:40 +01:00
Giuseppe Scrivano 143a689592 virtinst: drop cpu_map parsing of arch features
This information is not used anywhere and there is no way to read
it directly from libvirt without parsing the cpu_map.xml file.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-03-13 16:50:37 +01: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 90c9b3ca2e details: Reword the CPU model UI a bit more
- 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.
2014-01-31 13:40:09 -05:00
Cole Robinson a82b60dcff capabilities: Remove some public API back compat 2014-01-18 13:23:30 -05:00
Giuseppe Scrivano e51dd1cf40 capabilities: correctly parse "cpus" in the host NUMA topology
"cpus" might no be the only child element in the "cell" element, so be
sure to check all children.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1032320

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-11-22 13:53:06 +01:00
Giuseppe Scrivano d3a6f1a537 virtinst: parse capabilities baselabel element
libvirt since version 1.1.4 shows the security context used to execute
the hypervisor process.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-11-18 09:05:22 +01:00
Giuseppe Scrivano 2a040ccd17 mass update: remove double spaces from comments
Updated by this script:

find -name '*.py' -exec sed -i "s|^\(#.*[^.?\!]\)  \(.*[^#]\)$|\1 \2|g" \{\} \;

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-10-28 17:22:31 +01:00
Giuseppe Scrivano 0df75c7603 headers: update "Red Hat, Inc." copyright for the year 2013
Ensure that any file touched by a @redhat.com author in 2013 has an
updated copyright header.

The files were updated using the build-aux/update-copyright gnulib
script and manually added where the copyright line wasn't present.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-10-28 17:22:26 +01:00
Cole Robinson 952708f509 virtinst: Rename most files to be more sensible
- Lower case everything
- Virtual... -> device...
- A few other similar bits
2013-08-09 08:54:39 -04:00