Commit Graph

130 Commits

Author SHA1 Message Date
Cole Robinson
33ca0fff7d Only use spice on x86
qemu isn't compiled with spice support for non-x86

Reported-by: Kevin Zhao <kevinzs@linux.vnet.ibm.com>
2015-12-24 11:33:47 -05:00
Cole Robinson
e13f81a7c5 guest: Add qemu-ga virtio channel for arm
Originally we didn't add this since arm vexpress virtio only had 4
virtio-mmio slots. But the now-common -M virt target has 32 slots,
so we aren't starved.
2015-11-24 19:39:19 -05:00
Cole Robinson
e18d2caa45 create: Don't go back to NewVM on error, if customize dialog launched
The code really isn't set up to handle exiting the customize dialog,
so just make the UI enforce it.
2015-11-21 19:55:48 -05:00
Cole Robinson
492c9c4f28 cli: Add --vcpu placement=static|auto option 2015-11-18 15:00:42 -05:00
Kevin Zhao
35792f7dd6 Add the console target "sclp" for s390x
Add console target "sclp" for s390x ,since the newest Distro guests has
supported the console target, solve some console issues in s390x.Also
modified the test xml cover this change.

crobinso: fix the test suite output
2015-11-16 19:54:15 -05:00
Cole Robinson
72f83b638d guest: Clarify archs that skip adding the qemu-ga channel 2015-11-10 17:55:55 -05:00
Kevin Zhao
2aca20141e Remove default channel for s390x.
The Qemu guest agent change for 390x,remove default channel device
for s390x and regenerate the test output.Modified the clitest xml.
2015-11-04 14:42:26 -05:00
Cole Robinson
b7e073a407 osdict: Disable x2apic for solaris10 (bz 1262093)
It breaks networking:
https://bugzilla.redhat.com/show_bug.cgi?id=1262093
https://bugs.launchpad.net/bugs/1395217
2015-11-03 16:00:52 -05:00
Pavel Hrdina
5c3758142d virt-install: always enable pae for xen hvm 64bit guest
According to xen documentation 64bit guest has to have pae enabled in
order to be able to run 64bit OS.

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

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-11-03 16:37:17 +01:00
Abhijeet Kasurde
e5a0d1cbb8 Added support to on_lockfailure
Added cli option to specify on_lockfailure in events.
Also, added various testcases and related output XMLs.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

(crobinso: add clitest.py example)
2015-10-07 10:25:12 -04:00
Cole Robinson
f371ac0de3 virt-install: Don't add USB tablet if user disables USB controller 2015-09-28 19:01:44 -04:00
Cole Robinson
9dd0900b7d guest: Add default console device for xenpv
Libvirt already adds one so this is kinda redundant, but it makes
things clearer in the virt-manager 'customize' UI at least.
2015-09-22 12:41:57 -04:00
Cole Robinson
a538b69356 guest: Remove code for default virtio console
It's been disabled for a while and we don't plan on re-enabling it
2015-09-22 12:41:57 -04:00
Cole Robinson
60d6161efc create: Clean up default storage if VM fails (bz #799721)
Similar to the virt-install change, we only do this with default storage
if the installed failed in such a way that we never left the wizard.

It isn't going to cover all cases, but should handle the common issue
of stranded disk images

https://bugzilla.redhat.com/show_bug.cgi?id=799721
2015-09-06 15:10:17 -04:00
Cole Robinson
697164f2e5 virtinst: Centralize urlgrabber meter lookup
We will eventually want to drop this dep since it's basically dead
upstream, this is a small step in that direction
2015-09-06 15:09:44 -04:00
Cole Robinson
1237be9d1a virt-install: Clean up created disk images if VM creation fails
We are conservative here, only cleaning up disk images if libvirt
fails to even accept the XML. Otherwise the VM may already be
running or defined, and the user has to do some cleanup anyways.
2015-09-06 14:27:37 -04:00
Cole Robinson
68962f48f7 virtinst: Support multiple seclabels
libvirt has supported this for a while. Wire it all up through the
cli, and fix some bad assumptions along the way.
2015-09-05 13:49:36 -04:00
Cole Robinson
acfb988945 xmlbuilder: Make _add_child and _remove_child public
We have a lot of functions that are just wrappers around these, so
make it public for future use.
2015-09-04 15:47:43 -04:00
Cole Robinson
5e68b0fc3d guest: Don't try to set vmport on non-x86, it isn't supported (bz 1259998) 2015-09-04 12:14:22 -04:00
Pavel Hrdina
2d9587c114 support: enable hv_time since qemu-kvm 1.5.3 from RHEL
This feature is available in upstream Qemu since 2.0.0 but it was also
back-ported to downstream Qemu into qemu-kvm-1.5.3 released in RHEL-7.
Add a new check and enable hv_time also in RHEL systems if qemu new
enough.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-07-21 10:51:41 +02: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
bfa5762d9e guest: Add install cdrom in set_defaults, not start_install (bz 1220180)
Fixes weirdness when using addhardware wizard for a customized VM,
and makes the code easier to follow anyways.
2015-06-06 17:02:20 -04:00
Cole Robinson
cdc0a8fe41 guest: Remove unused code
We don't support the transient install disks anymore
2015-06-06 14:59:48 -04:00
Giuseppe Scrivano
f8af2e6b10 create: verify HYPER-V support after customization
commit 938060ae53 moved default devices
setup to happen before UEFI is set invalidating what the commit
5acfccf6032abb9e8be89130d05b661e8b3f42c7 does.

Add another check to happen before installing the guest to disable
HYPER-V when not supported.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-05-20 22:48:33 +02:00
Marc-André Lureau
ddfca74e54 virtinst: set vmport off by default when has_spice()
Spice is better off without vmport enabled, to be able to switch between
absolute and relative mouse mode easily.
Message-Id: <1428012248-5767-5-git-send-email-marcandre.lureau@gmail.com>
2015-05-04 12:40:13 -04:00
Marc-André Lureau
ede876e792 virtinst: set_graphics_defaults() first
Some later options may require Spice (or other) to be enabled,
so call set_graphics_defaults() earlier.
Message-Id: <1428012248-5767-4-git-send-email-marcandre.lureau@gmail.com>
2015-05-04 12:40:13 -04:00
Cole Robinson
33cfe883c6 guest: arm kvm should use host-passthrough, not model=host
Seems to work with libvirt, not sure if it was ever broken as the comment
suggested.
2015-04-23 10:14:58 -04:00
Cole Robinson
0f3d86ac9e guest: Disable PM for virt-install as well
We are just mirroring the behavior that virt-manager (and boxes) have
used for a while now.

In my experience the average user is confused by their VMs suspending,
so for our sake I'd rather make people opt into this feature.
2015-04-11 18:02:45 -04:00
Cole Robinson
a2c7d62ec4 guest: Disable spice image compression for local VMs
The image compression setting has a noticably detrimental effect on
spice graphics quality. It's meant to be used for spice VDI but the
vast majority of people don't use spice in a way that makes bandwidth
usage matter.

Boxes has already done this for a while as well:

https://mail.gnome.org/archives/commits-list/2013-March/msg14904.html

Turn it off by default if creating the VM on a local connection.
2015-04-11 17:53:17 -04:00
Cole Robinson
a5d03fdf6e guest: Don't unconditionally overwrite on_poweroff/on_crash 2015-04-07 19:53:15 -04:00
Cole Robinson
86f1133777 guest: Encode defaults into the XML at install time
Previously we made all the default encoding non-permanent by XML objects
before generating the XML, making changes to the copies, and restoring
to the old state after the XML is returned to the user.

This allows us to call start_install multiple times with the same Guest
object and not alter it's original config... but that feature isn't really
useful anymore, and this behavior makes the 'customize before install'
dialog difficult to handle.

So drop most of it, and fix some of the minor fallout.
2015-04-07 18:36:06 -04:00
Cole Robinson
a773a66a3f virtcli: Export config variables in a class object
Makes things easier to extend later
2015-04-06 15:54:35 -04:00
Cole Robinson
e29f216503 guest: Use sata by default for q35 cdrom, non-virtio (bz #1207834) 2015-04-06 13:43:18 -04:00
Cole Robinson
bd9ab2d5b5 osdict: Add toplevel OSDB as API entry point
Makes code more readable, and lazy loading simpler.
2015-04-04 12:06:41 -04:00
Cole Robinson
f644b0997d osdict: Have users call functions, rather than access properties
Gives us more future flexibility, and simplifies the flow quite a bit.
2015-04-04 11:24:18 -04:00
Cole Robinson
710c588eaf guest: Use cached osdict object for all lookups
Rather than have lookup_osdict_key constantly do the dictionary lookup.

This is step one towards simplifying the osdict lazy loading
2015-04-04 11:23:54 -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
Cole Robinson
7866e291f6 guest: Never use vmvga if host is RHEL (bz 1147662)
We basically need to do this independent of whether the build is configured
for RHEL defaults or not
2015-03-25 09:04:51 -04:00
Cole Robinson
cfe9e7dc7e virt-install: Make '--cpu none' work with aarch64 2015-03-23 17:46:09 -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
478ba6d885 Use virtio-net only when it is supported
Do not use the model specified by the OS if it is "virtio-net" and
virtionet is not supported.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-02-25 15:32:54 +01:00
Giuseppe Scrivano
00aea929ef tests: check that vmvga is not used on RHEL
And fix typo in last commit

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-02-24 19:03:59 +01:00
Giuseppe Scrivano
6c61e66ff7 Do not use vmvga on RHEL
Fallback to VGA

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-02-24 17:44:23 +01:00
Cole Robinson
4ee9fdf944 domcapabilities: Get arch from caps XML 2015-02-22 11:13:59 -05: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
cbba1c4dd3 virt-manager: disable HYPER-V on Windows 2008 R2 and Win7 SP1 with UEFI
Windows 2008 R2 or Win7 SP1 guests do not work when UEFI and HYPER-V,
so just disable HYPER-V.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-01-27 13:38:24 +01: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
aa772f01e1 guest: Prefer virtio-scsi for arm mach-virt
Since it gives us disk hotplug, and CDROM devices, etc.

This requires fairly recent patches to UEFI/OVMF/AAVMF
2014-12-17 15:23:05 -05:00