Commit Graph

126 Commits

Author SHA1 Message Date
Marc Hartmayer
1b53594002 tests: Add test case for reorder_boot_order method
Add a test case for `reorder_boot_order`. It verifies that the OS boot
order is removed and that all other boot order indices are adjusted
accordingly.

Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
2019-03-06 13:15:38 -05:00
Pavel Hrdina
a0b42327c6 graphics: move all listen code into one place
Instead of duplicating the code into CLI and GUI move it into graphics
device file which is used from both places.  This also fixes a bug in
virt-xml where changing listen to address was not working.

This also changes behavior to always configure one listen type when
using CLI listen option or GUI.  If user wants to modify only specific
listen type they can use listens[] options from CLI.

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

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2019-02-28 11:48:09 +01: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
bad5eabd93 domain: Add metadata.libosinfo
From the libosinfo discussion here:
https://www.redhat.com/archives/libosinfo/2018-September/msg00003.html

This is a cross-app schema for tracking libosinfo OS ID in the
domain <metadata> XML. Example:

   <metadata>
     <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
       <libosinfo:os id="http://fedoraproject.org/fedora/17"/>
     </libosinfo:libosinfo>
   </metadata>
2018-09-13 12:39:56 -04:00
Povilas Kanapickas
e6c7e46a54 details: Add support for disk detect zeroes option 2018-09-04 11:39:50 -04:00
Cole Robinson
ad70393ed9 tests: Fix breakage with libvirt.git
https://ci.centos.org/job/virt-manager-master-check/systems=libvirt-fedora-rawhide/409/

Added validation to hugepages nodeset. Just drop the test case, we
test it elsewhere too
2018-09-04 09:21:23 -04:00
Lin Ma
4484f473cd char: Track/Show the state of virtio channels in channel details
crobinso: Add a test case

Signed-off-by: Lin Ma <lma@suse.com>
2018-07-12 15:25:23 -04:00
Lubomir Rintel
3a4cf07a28 virtinst: allow adding host block devices to LXC containers
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
2018-06-19 15:07:45 -04:00
Lubomir Rintel
a2a022a879 virtinst: allow adding host character devices to LXC containers
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
2018-06-19 15:07:42 -04:00
Lubomir Rintel
bba3d04558 virtinst: allow adding host network devices to LXC containers
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
2018-06-19 15:05:28 -04:00
Marc-André Lureau
55fa6c4caa tests: add xmlparse/change vmcoreinfo test
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2018-02-22 16:23:40 -05:00
Cole Robinson
dfa0fa34b4 tests: xmlparse: Add a roundtrip metadata test
To ensure the xml engine doesn't mangle unknown XML
2018-02-20 11:23:37 -05:00
Cole Robinson
bc94666778 tests: xmlparse: Add qemu xmlns tests
Since reproducing via manual clitest is hard since it requires
XML on stdin
2018-02-20 11:23:37 -05:00
Cole Robinson
f04b284f21 xmlbuilder: Abstract libxml2 API and cleanup
Moves the libxml2 bits to a separate xmlapi file and class, a bunch
of cleanups to xmlbuilder internals dealing with XML stuff.

The main point is to experiment with different XML library impls,
since libxml2 is unfun to deal with and we are having python3
issues like

https://bugzilla.gnome.org/show_bug.cgi?id=776815
2018-02-20 11:23:37 -05:00
Cole Robinson
4224b0926e tests: Remove storage UUID hackery
In several cases we were trying to define two different pools with
the same UUID. Libvirt used to accept that but as of a recent
commit it started rejecting it for the test driver.

The UUID stuff isn't adding anything so drop it from all the test
cases and data.
2017-12-14 12:45:01 -05:00
Lin Ma
6dfc4de125 network: add support for parsing/formatting SR-IOV VFs
Signed-off-by: Lin Ma <lma@suse.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-10-09 10:22:48 +02:00
Radostin Stoyanov
0dfc371f18 Keep the value of filesystem/source when attribute is changed
When the attribute of filesystem/source is changed the old value was
not assigned to the new attribute.
2017-06-20 16:14:17 -04:00
Lin Ma
ea85a3c680 tests: add test for network forward mode 'open'
Signed-off-by: Lin Ma <lma@suse.com>
2017-05-03 14:08:42 -04:00
Lin Ma
fe9588d438 tests: add test for network of SR-IOV VF pool
Signed-off-by: Lin Ma <lma@suse.com>
2017-04-03 19:09:08 -04:00
Charles d'Hondt
b545201617 Added OpenVSwitch Network Detection
Small patch to allow VMM to detect OpenVSwitch

Signed-off-by: Charles d'Hondt <charles.dhondt@gmail.com>
2017-03-24 16:42:45 -04:00
Cole Robinson
a2df53db21 guest: Reorder XML output to match libvirt output 2017-03-05 21:04:34 -05: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
Marc-André Lureau
dffb2aaa2d virtinst/cli: add spice rendernode argument
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2017-02-23 18:31:43 -05:00
Pavel Hrdina
1bed021a00 tests.xmlparse: fix network test
Device <interface type='ethernet'/> doesn't support <source dev=''/> attribute.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-07-08 18:01:35 +02:00
Cole Robinson
a8914ae1e6 virtinst: disk: Fix seclabel testing
disk devices don't have a full <seclabel> under their <source>
element, just a smaller one with only a few options. Fix things
to match what libvirt does
2016-06-11 17:43:18 -04:00
Cole Robinson
42d4179e1e tests: Fix error with latest libvirt
It caught a duplicate disk definition
2016-06-11 13:08:59 -04:00
Marc-André Lureau
8ba48f5299 virtinst: add virtio device model and accel3d attribute
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-03-09 20:25:37 -05:00
Marc-André Lureau
f912f28e97 virtinst: add --graphics gl option
Add a --graphics option to enable accelarated rendering using
OpenGl. This is used only by Spice (and for local only guests atm).

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-03-09 20:25:37 -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
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
Abhijeet Kasurde
d7e678cb28 Added support pvspinlock in features
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2015-10-05 15:14:34 -04:00
Pavel Hrdina
39da70a456 Added option to enable kvm_hidden feature in virt-install cmd-line
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2015-09-08 12:03:04 +02:00
Cole Robinson
3f6081abe5 disk: Support <seclabel> overrides 2015-09-05 14:42:03 -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
Marc-André Lureau
e2184ea2cf tests: add some vmport tests
Message-Id: <1428012248-5767-6-git-send-email-marcandre.lureau@gmail.com>
2015-05-04 12:40:14 -04:00
Cole Robinson
20d37422fe virt-install: Fill in a bunch of --graphics spice options (bz 1110017) 2015-04-11 16:56:27 -04:00
Cole Robinson
9a789c19e2 virt-install: Support --hostdev scsi passthrough (bz 1054912)
Pass it a type=scsi nodedev name, and we will set things up correctly.
2015-04-11 15:55:09 -04:00
Cole Robinson
dc1737e623 cpu: Drop vendor and features if setting host-model (bz 1190851)
Otherwise via virt-manager we can try to set a <cpu> with a <vendor>
but no <model>, and libvirt complains.
2015-03-26 17:08:15 -04:00
Giuseppe Scrivano
31836e2b5d virtinst: add support for <disk> sgio attribute
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-03-16 20:32:40 +01:00
Cole Robinson
464ebabc5a virt-install: Wire up --disk vol= for network volumes
This involves convering pool/vol XML to disk source bits
2014-12-09 18:23:22 -05:00
Cole Robinson
e61311fc8a storage: More support for network pools
Including parsing multiple hosts, filling reasonably defaults, making
sure the createpool wizard does the correct thing, etc.
2014-12-09 16:12:47 -05:00
Cole Robinson
9952764dda virt-install: Make --disk $URL 'just work'
If VirtualDisk.path is set to a URL, parse it and fill in all the
source_* values automagically.
2014-12-09 10:45:26 -05:00
Cole Robinson
cd305da3f8 virt-install: support network --disk's
Handle type=network in devicedisk.py, and wire up all the network fields
for virt-install --disk. Right now it requires manually spelling out
all the protocol, name, host/port etc fields.

The one 'magic' bit is that VirtualDisk.path will be a pretty URL when
all those network fields are specified. This is keeps things mostly
working in various parts of the code where we expect 'path' to be an
identifier for a VirtualDisk.
2014-12-06 21:00:51 -05:00
Cole Robinson
c5f5827499 tests: xmlparse: Simplify disk lookup 2014-12-06 21:00:07 -05:00
Giuseppe Scrivano
51e5a47120 virt-manager: reset vgamem for video when changing device type
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1169295

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-12-01 17:02:22 +01:00
Giuseppe Scrivano
cce5827195 virtinst: add support for disk type="volume"
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-09-26 16:24:59 +02:00
Cole Robinson
86417d42ca osxml: Ensure kernel/initrd/dtb are absolute paths 2014-09-23 14:32:01 -04:00
Giuseppe Scrivano
17a37ea39b virt-install: add tests for OVMF
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-09-16 09:47:02 +02:00
Chen Hanxiao
cff8e32c55 virt-install: support setting hugepages/page/[@size, @unit, @nodeset] for memorybacking
libvirt commit
136ad49740f017aabcac48d02d2df6ab7b0195e9
introduce ./hugepages/page/[@size, @unit, @nodeset]
for memory backing.
This patch will add support in virt-install.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-07-30 14:34:03 +08:00
Giuseppe Scrivano
57d26e6265 virtinst: parse "bandwith" node in network definition
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-06-26 15:26:37 +02:00