Commit Graph

51 Commits

Author SHA1 Message Date
Cole Robinson 019a33e975 clock: Drop RHEL hyperv clock distinction
I think enough time has passed that we can just check the
support based on the older RHEL version.
2018-10-06 19:45:51 -04:00
Cole Robinson 97ea737386 devices: interface: Have x86 fallback model be e1000
libvirt will use rtl8139, but the qemu default changed a while
ago to e1000, and libvirt has diverged. e1000 is more modern and
considered the better default here, so use it
2018-09-29 14:35:28 -04:00
Cole Robinson d7ff46f7f5 guest: Encode the cli --os-variant in the XML
And add some testdriver examples of it
2018-09-13 15:11:22 -04:00
Cole Robinson e903d374c2 guest: Always encode machine= in XML
Don't rely on libvirt's default. This makes any XML changes more
explicit, and can help other parts of the code that may depend on
a machine type being encoded
2018-09-12 12:16:47 -04:00
Cole Robinson c154bbacd4 guest: Fold add_default_devices into set_defaults
It doesn't have any need anymore to be separate
2018-09-04 14:55:04 -04:00
Cole Robinson fb1bb26373 support: Drop lots more checks
- Remove anything for less than qemu 0.12 or libvirt 0.10, basically
  rhel6 vintage stuff
- Open code some simple checks
- Remove some that are only used for unnecessary error reporting
2018-08-31 22:21:15 -04:00
Cole Robinson 538ea96116 guest: devices: change XML ordering to match libvirt 2018-03-21 11:17:36 -04:00
Cole Robinson 4c4d31d67d tests: Fix after vmvga change 2017-04-19 14:08:04 -04: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
Cole Robinson cd2ade9fd7 tests: Fix with latest osinfo-db output 2017-02-22 14:40:49 -05:00
Cole Robinson 4f9fd84f8f diskbackend: Use type=file for empty cdrom, not type=block
It doesn't have any operational effect, however since most people use
type=file for cdrom isos, this makes it easier for people to hand edit
the XML.
2015-11-21 20:07:05 -05: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
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 af2aea8bbc tests: xmlconfig: Drop needless version limiting 2015-03-25 08:58:09 -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
Cole Robinson 838d7f015c tests: Drop a bunch of redundant xmlconfig tests
These are mostly covered by clitests. Keep the important ones around
for code coverage.
2014-12-09 13:19:56 -05:00
Cole Robinson 86417d42ca osxml: Ensure kernel/initrd/dtb are absolute paths 2014-09-23 14:32:01 -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 8ea634f9e4 guest: Enable Hyper-v Enlightenments for Windows VMs
These are the recommended defaults for all windows VMs, when using
a new enough libvirt + kvm. Some more details in this boxes bug report:

https://bugzilla.gnome.org/show_bug.cgi?id=732811
2014-07-07 18:24:40 -04:00
Cole Robinson 98ea4cdad2 Reduce test suites clear_cache calls 2014-02-08 19:28:56 -05:00
Giuseppe Scrivano 499cb63f65 doc: remove reference to SDL from virt-install man page
Adjust some tests to not use --graphics sdl.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-02-06 16:20:12 +01:00
Cole Robinson 427400d3f3 virtinst: cpu: Reorder feature bits to match libvirt XML order 2014-01-31 13:44:50 -05:00
Chen Hanxiao 8419835b1d virtinst: add support for panic notifier device
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-01-11 14:32:18 -05:00
Cole Robinson 4911cb990e tests: Fix a rogue failure after last commits 2013-10-06 08:23:22 -04:00
Cole Robinson eede884554 guest: Set more involved clock defaults for qemu
The XML we use is:

  <clock offset="utc">
    <timer name="rtc" tickpolicy="catchup"/>
    <timer name="pit" tickpolicy="delay"/>
    <timer name="hpet" present="no"/>
  </clock>

Which translates to the qemu commands:

    -no-hpet -no-kvm-pit-reinjection -rtc driftfix=slew

The latter two bits are already used by openstack and gnome boxes by
default.

On RHEL hpet is compiled out so -no-hpet is the default,
but not everywhere else. Though recently the RH guys confirmed that
for regular usage it should be turned off because a) qemu support
is not that good, b) most users don't need it anyways c) it has
a performance penalty.

This default can be overridden from a virt-install command like

  --clock rtc_tickpolicy=delay

When Guest() sees that a timer has already been defined, it won't
set the new defaults, and that setting above is the old implied
default rtc setting.
2013-10-05 17:12:11 -04:00
Cole Robinson 0366589812 Rip out all support for local RHEL6 version checks
These bits only apply if virt-manager is running directly on a RHEL6.
Since latest virt-manager can't do that thanks to GTK3 conversion,
just drop it all.
2013-10-05 13:57:55 -04:00
Cole Robinson 0614e490c8 VirtualDisk: Don't try to force cdrom target=hdc
It was required a long long time ago, before qemu supported -drive
and possibly ancient xen. Nowadays it should be pointless, and contributes
to some issues like bz 905439
2013-10-02 20:31:57 -04:00
Cole Robinson fb7868db19 Enable cache=None and io=native by default for block devices
This is where performance issues hit the most. This changes the
RHEL default to remove cache=None for all file volumes. If anyone
cares they can speak up, but it seems an overly unnecessary deviation
from upstream qemu.
2013-10-02 16:10:39 -04:00
Cole Robinson 8d59a7132b tests: Revive most disk=block checks
The patches to drop /dev/loop0 meant get_blkdisk was inaccurate and
we weren't testing many things that were intended. Use a block disk
from the test driver.
2013-10-02 16:05:43 -04:00
Giuseppe Scrivano 153e485bb7 Fix some tests
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-09-26 19:41:40 -04:00
Cole Robinson 382a24d08d Fix tests on f20, /dev/loop0 isn't available 2013-09-25 19:35:05 -04:00
Cole Robinson 414f6bbd99 guest: Use virtio on plain qemu on x86
It's been available for a long long time, and unifies code paths.
2013-08-17 18:00:31 -04:00
Cole Robinson 3130f64e35 VirtualDisk: Add is_disk, is_cdrom, is_floppy helpers 2013-08-17 14:21:30 -04:00
Cole Robinson 81ce0a1085 osdict: Clean up 'default' handling usage
- Unify looking up osdict values
- Have Guest.py pass in its defaults, not encoding them in osdict
- Explicitly specify every device parameter that osdict handles, rather
    than have some psuedo magic dictionary format to handle it
2013-08-12 13:31:47 -04:00
Giuseppe Scrivano 4f63458050 tests: move the storage pool under /dev.
The commit efab27afbf02743a3a2582e9a111eb1b7d985b26 in libvirt uses
/dev/%s for logical pools, change the tests to accommodate it.

(crobinso: additional fix to work with older libvirt)
2013-07-29 10:01:18 -04:00
Cole Robinson bba3c93508 xmlbuilder: Always keep around an xml node, even if building from scratch
This further unifies the 'parse existing' vs. 'build new' case.
2013-07-25 10:59:23 -04:00
Cole Robinson 2ba3ec2684 Guest: Convert to new style XML prop, drop a bunch of XML infrastructure
Now every XML property is new style, without explicit local get/set
handlers. Drop a bunch of XML infrastructure that was helping with the
transition.
2013-07-24 07:54:04 -04:00
Cole Robinson 24e433a8de CPU: Convert to new style XML props 2013-07-23 17:34:33 -04:00
Cole Robinson 524d1047b1 Guest: Make API users opt in for default console/input devices
We don't need to maintain API back compat anymore
2013-07-23 17:34:32 -04:00
Cole Robinson 326731cfc5 xmlbuilder: Remove order_elements hack 2013-07-23 17:34:32 -04:00
Cole Robinson 81cd055f9c VirtualNetworkInterface: Convert to new style XML props
Leave __init__ where it is for now though.
2013-07-15 13:59:09 -04:00
Cole Robinson 98a4d86d7f VirtualRedir: Convert to new style XML props 2013-07-15 12:57:37 -04:00
Cole Robinson e04dfdd4ff virtinst: Test rhel defaults, and make sure it doesn't break test suite 2013-07-13 20:01:07 -04:00
Cole Robinson 4ce1774d53 VirtualDisk: Rework provisioning and validation behavior
We separate all the provisioning bits to diskbackend.py. VirtualDisk
users now need to explicitly opt in to storage creation by using
set_create_storage().

validation is no longer done automatically, users must call the
validation() command.

__init__ drops all extra parameters.

This will eventually get us to a point where we can unify the manual
XML building and XML parsing machinery, and get consistent validation
behavior between devices.
2013-07-13 16:37:33 -04:00
Cole Robinson dcd632da80 XMLBuilder: Provide default fget and fset impls
This is the first step towards unifying the XML handling split between
parsing and creating from scratch. Demonstrate it with VirtualDisk.iotune
bits.
2013-07-12 14:41:29 -04:00
Cole Robinson f620b317b9 tests: Make sure all XML use " for quoting
This is what libxml outputs with, and it's going to mess up
test output with upcoming tests.
2013-07-12 14:19:54 -04:00
Martin Kletzander 137134650f Allow partial address formatting
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2013-06-19 18:18:32 -04:00
Hu Tao ee7168e6f9 Add and fix test cases for cpu mode attribute
This patch adds and fixes test cases for cpu mode attribute.

Signed-off-by: Ken ICHIKAWA <ichikawa.ken@jp.fujitsu.com>
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>

(crobinso: Minor rebase tweaks)
2013-04-14 13:55:26 -04:00
Martin Kletzander 1876ce0af8 Fix cpuset tests
In order to fix last tests that fail for me, I had to modify the
output xml, both modified machines will fit in the first numa node, so
the cpus from that node should be mentioned in the xml and that lead
me to the fact that the problem was in the test xml and not the code.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2013-04-10 10:02:13 -04:00