Commit Graph

25 Commits

Author SHA1 Message Date
Cole Robinson
369cf6774b guest: Don't add spicevmc channel if virtio not supported
Not that big of a deal for linux guests, but will add ?
devices on windows
2018-10-14 12:29:33 -04:00
Cole Robinson
469fed08a0 guest: Default to cpu mode=host-model if libvirt is new enough
We check whether host-model is exposed in domcapabilities, which
indicates host-model is using the smarter new safer method in
cooperation with qemu
2018-10-04 14:43:41 -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
7356afcca7 osdict: Use USB tablet if no OS specified
Most OS users will be installing benefit from it, so make it the
default
2018-09-29 13:36:42 -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
538ea96116 guest: devices: change XML ordering to match libvirt 2018-03-21 11:17:36 -04:00
Cole Robinson
d2648d81cc virtconv: Don't implicitly depend on dict hash order 2017-10-20 16:13:04 -04:00
Cole Robinson
2cabc2e386 guest: Don't add default ps2 or xen mouse
libvirt drivers have added these by default for a long time, so
its redudnant here
2017-06-28 16:17:50 -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
Lin Ma
c8aaf08682 test: Add missing test item to cover the code adding by f11eb00
Signed-off-by: Lin Ma <lma@suse.com>

(crobinso: add missing test file)
2016-03-11 12:10:32 -05:00
Lin Ma
7c850c17b4 test: Add a test for converting ovf+compressed files.
Signed-off-by: Lin Ma <lma@suse.com>
2016-03-09 20:06:16 -05:00
Michal Privoznik
ee5da7d02b virtconvtest: Fix vmx2libvirt test
The test consists of translating VMX configuration into domain
XML and converting disks. Cool. But the disk is zipped in a file
and the test tries to string match unzipping command. Problem is,
the absolute path is passed to the unzip command which makes it
impossible for the test to succeed on other hosts.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>

(crobinso: fix whitespace)
2016-01-15 11:42:37 -05:00
Lin Ma
21fd079eb1 Replace the unar to more common archivers
Because some of distributions dont provide the unar (universal archiver),
Using more common archivers to replace it.

Signed-off-by: Lin Ma <lma@suse.com>

(crobinso: adjust test suite)
2016-01-10 18:23:29 -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
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
Cole Robinson
19e35b0a5b Fix test output with libvirt 1.2.16 2015-06-06 14:52:16 -04:00
Chen Hanxiao
24302dfdfd tests: fix test cases failed by 'vmport'
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2015-05-11 04:55:14 -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
ccc0da3e51 tests: Add specific VM for virtxml tests
Decouple it from test-many-devices which is really about manual testing
of virt-manager UI. It's annoying that every time test-many-devices is
extended we need to regenerate all the virtxml tests.
2015-04-21 19:50:41 -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
3933ff101b guest: Limit number of default usb redirdevs to 2 (bug 1135488)
If we use 4 devices here, we fill up all the emulated USB2 slots,
and directly assigned devices are forced to fall back to USB1

https://bugzilla.redhat.com/show_bug.cgi?id=1135488
2014-09-20 20:16:31 -04:00
Cole Robinson
e3de3d8b69 virt-convert: Fix pointing to relative config file 2014-09-20 18:29:20 -04: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
0b4a72fd77 virt-convert: Reimplement it
We totally break CLI compat here, but the previous tool wasn't sustainable.
Instead, repurpose the tool as strictly converting external formats
like ovf/vmx to native libvirt XML, and launch the guest.

So we drop vmx/virt-image output, and virt-image input, and a slew of
command line options. I don't think anyone was depending on this in a
scripted fashion, so in practice I don't think anyone will care.

Add much more comprehensive unit tests while we are at it.
2014-02-07 21:16:09 -05:00