Commit Graph

329 Commits

Author SHA1 Message Date
Cole Robinson edab908f42 guest: Use q35 chipset by default for new qemu + supported OS
There's been various discussions about changing the x86 default
from 'pc' to 'q35' over the years, but it's unlikely to happen
at the qemu or libvirt level for compatibility reasons. So
let's start using it for new enough OS that support it.
2018-10-13 14:58:57 -04:00
Cole Robinson 0cbb420347 virt-install: Limit --os-variant warning to kvm+x86
As that's really all that libosinfo defaults presently matter for
2018-10-13 12:55:34 -04:00
Cole Robinson 570e6bbb29 tests: add osinfo net fallback test
using openbsd4.9 with its pcnet recommendation
2018-10-13 12:40:22 -04:00
Cole Robinson 467c524684 tests: Add show_nographics_warnings coverage 2018-10-13 11:50:49 -04:00
Cole Robinson 41d0f8fdf1 installer: Order install CDROM before any manual CDROMs
This is important for the virtio-win case: --cdrom media should
always be ordered first, so it's the boot preference.

https://www.redhat.com/archives/virt-tools-list/2018-September/msg00048.html
2018-10-13 10:44:09 -04:00
Cole Robinson e4e924ea50 tests: Add libosinfo iso detection test
With another fake iso, based on stripped down centos 6.5 boot iso.
Reason we do centos 6.5 is that everything newer also compares
on volume size, and we don't want to store a huge iso in git.
2018-10-12 17:15:58 -04:00
Cole Robinson b90b8e3c07 distroinstaller: Remove --cdrom $URL boot.iso fetching
And instead treat any URL passed to --cdrom as a file to
access directly over http. Rationale for dropping this is
laid out here:

https://www.redhat.com/archives/virt-tools-list/2018-May/msg00011.html
2018-10-12 15:54:36 -04:00
Cole Robinson 4f320c2b98 distroinstaller: Remove implied cdrom installs
This is an obscure feature that I'm skeptical anyone is relying on,
and has weirdly subtle semantics that are hard to test.
2018-10-12 15:33:05 -04:00
Cole Robinson 1cd9d0b524 tests: scsi reservation test shouldn't check host /dev/sda
Was failing in our CI
2018-10-11 17:02:45 -04:00
Lin Ma eb1a67a595 cli: disk: Add options to support SCSI persistent reservation
Create the managed or the unmanaged PR object to enable SCSI persistent
reservation for LUN Passthrough

Signed-off-by: Lin Ma <lma@suse.com>
2018-10-11 16:00:28 -04:00
Cole Robinson 42a96cfd59 virt-install: add --destroy-on-exit
This makes the console window behave like a raw qemu command line:
when the user closes it, the VM is hard powered off.
2018-10-11 15:24:16 -04:00
Cole Robinson 3e55e89453 tests: Add better virt-install console testing 2018-10-11 12:19:48 -04:00
Yossi Ovadia 215d296b61 cli: add --boot rebootTimout
virt-install -n blah -r 1024 --vcpu=1 --disk=/root/vm/blah.qcow2,size=10\
 --network=bridge:br-public --pxe --boot=network,rebootTimeout=3

By default, in case of (first) pxe boot failure the VM will simply
stop trying.
By adding the above, VM will re-try pxe boot. ( useful when DHCP not
replys on first attempt.

Libvirt support it and VM XML will look as follow : ( 'bios rebootTimeout'
will be created under OS section. )

  <os>
    <type arch='x86_64' machine='pc-i440fx-rhel7.5.0'>hvm</type>
    <boot dev='network'/>
    <bios rebootTimeout='3'/>
  </os>

(crobinso: fix it, add test case)
2018-10-11 11:24:07 -04:00
Cole Robinson 877cbade4a tests: Move OLD_OSINFO check to central place
Other tests may need it in the future
2018-10-04 19:29:41 -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 046a242bd4 guest: Use USB3 for x86 qemu if OS supports it
Using new annotations in osinfo-db
2018-10-03 19:02:07 -04:00
Marc-André Lureau 4ad74278ca cli: add memory backing access_mode & source_type
Allow to set some memory backing options, ex:
--memorybacking access_mode=shared,source_type=anonymous

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2018-10-02 11:12:13 -04:00
Cole Robinson d389e93586 tests: Fix with latest libosinfo
And add some logic to skip these tests on older libosinfo as well
2018-10-01 11:34:51 -04:00
Cole Robinson 757910a1bb cli: Add --metadata os_name= and os_full_id=
Allows changing the libosinfo metadata for an existing vm via virt-xml
2018-09-30 20:55:32 -04:00
Cole Robinson 87d19ebf36 tests: Add rhel5 and win10 kvm XML tests 2018-09-14 14:37:12 -04:00
Cole Robinson a741f595ea guest: Drop update_defaults
Fold its one purpose into the UEFI setting bits, fix it and test it
2018-09-13 15:59:27 -04:00
Cole Robinson 2d53f7223d clitest: Test comparison against --os-variant fedora-unknown
Which always maps to the latest Fedora. May help catch accidental
changes
2018-09-12 12:33:16 -04:00
Cole Robinson 5f22f41da4 guest: Absorb capabilities defaults setup
Rather than forcing API users to go through the capabilities APIs.
This lets us simplify things in virt-install quite a bit, and is
needed for smarter machine type defaults
2018-09-06 20:12:49 -04:00
Cole Robinson 256ca7f3fb virt-install: Simplify install method validation a bit
And drop the --pxe --nonetwork collision check, it's near pointless
2018-09-04 14:55:04 -04:00
Cole Robinson 347143982a devices: Add set_defaults for memballon, redirdev, rng, smartcard 2018-09-04 14:55:04 -04:00
Cole Robinson c3515fa469 guest: Drop multifunction address magic
Seems sufficiently obscure that if someone is manually specifying
addresses we can require them to pass multifunction as well
2018-09-04 14:55:04 -04:00
Cole Robinson 6f301ba0aa tests: clitest: Fix failure when isoinfo not installed
https://ci.centos.org/job/virt-manager-master-check/systems=libvirt-fedora-rawhide/410/display/redirect

support usage cleanup broke self.skip_test
2018-09-04 10:01:20 -04:00
Cole Robinson 967ca4eeda virtinst: Drop direct 'support' usage
Except from connection. This requires some reorg in clitest and
some minor changes in a few other places
2018-08-31 18:31:17 -04:00
Cole Robinson d8514e19c8 guest: Drop arm vexpress virtio-mmio support
This case will still work, but be a bit slower, which is fine. Nowadays
-M virt is much better for virt usage and nearly everyone is using that,
so save us the complication. This was really only useful when
bootstrapping arm virt support
2018-08-31 17:31:09 -04:00
Cole Robinson 8d45dba43d cli: Add --boot bootloader= 2018-08-22 07:38:34 -04:00
Cole Robinson f9600ca31b virt-install: Remove smm validation and q35 default setting
The validation is already handled by libvirt, and setting q35 for
smm=on is overkill and just hardcoding some libvirt logic here.
I think the 'secboot' detection in Guest.py is the preferred
magic here, otherwise let users specify all the correct values.
2018-08-21 15:39:27 -04:00
Cole Robinson eb0f4a612f virt-install: Support armv7l and i686 uefi 2018-08-08 15:14:21 -04:00
Cole Robinson 7a2abb5abf installer: Remove --location nfs support
Removal was discussed here:
https://www.redhat.com/archives/virt-tools-list/2018-May/msg00011.html

Basically I don't think many people use this, the feature is very
inflexible, it's hard to test, and users can essentially do it
themselves with a bit more effort.
2018-06-12 14:07:50 -04:00
Cole Robinson 8e150901f4 clitest: Streamline the string format dict
Remove a bunch of dead entries, open code a bunch of limited usage,
and only use the dict for commonly referenced data
2018-06-12 14:07:50 -04:00
Cole Robinson d68305eaab tests: utils: Move all URI strings to URIs object
Non-functional change, just makes code org nicer
2018-06-12 14:07:50 -04:00
Cole Robinson b6cd46b382 virt-install: Add --test-stub-command
Fills in basic install options to make the command succeed. Saves
devs having to type boiler plate options when testing new command
line bits
2018-06-12 14:07:50 -04:00
Marc-André Lureau fa32aea416 tpm: add TPM emulator backend
An emulated backend doesn't require any path, since libvirt will take
care of finding the emulator and managing the storage. However, the
version to emulate can be specified.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2018-06-11 12:40:28 -04:00
Marc-André Lureau 67cb191e82 tpm: add CRB device model
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2018-06-11 12:40:28 -04:00
Anya Harter 846e2f711a cli: add --sound codec support
Add codec support to virt-install so that it can accommodate
multiple instances of codec configuration.

The commandline argument:

  --sound codec0.type=micro,codec1.type=duplex,codec2.type=output

maps to the sound XML below:

    <sound model="es1370">
      <codec type="micro"/>
      <codec type="duplex"/>
      <codec type="output"/>
    </sound>

Signed-off-by: Anya Harter <aharter@redhat.com>
2018-06-11 12:23:14 -04:00
Anya Harter 02635d3358 cli: Add --disk geometry attribute options
Attribute options are:
    - geometry.cyls=W
    - geometry.heads=X
    - geometry.secs=Y
    - geometry.trans=Z

This maps to disk XML like:

    <disk>
      <geometry cyls='W' heads='X' secs='Y' trans='Z'/>
    </disk>

Signed-off-by: Anya Harter <aharter@redhat.com>
2018-06-11 12:02:11 -04:00
Anya Harter 89c389e45a cli: Add --disk driver.copy_on_read=on option
This maps to disk XML like:

    <disk>
      <driver copy_on_read='on'/>
    </disk>

Signed-off-by: Anya Harter <aharter@redhat.com>
2018-06-11 12:00:56 -04:00
Cole Robinson b85a2a9eb8 virt-install: Drop --import and --nodisks collision
It doesn't work with '--disk none' and it's not very useful anyways
2018-06-07 10:56:47 -04:00
Anya Harter 8bde479112 cli: Add --network mtu.size=X option
This maps to interface XML like:

    <interface>
      <mtu size='X'/>
    </interface>

Signed-off-by: Anya Harter <aharter@redhat.com>
2018-06-06 10:44:03 -04:00
Stefan Weil 633534c8b8 Fix some typos in comments and documentation (found by codespell)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-06-05 14:27:29 -04:00
Cole Robinson 39a7cbbad7 domain.numatune: Drop cpuset validation
This type of validation should really be done at the libvirt level,
particularly for a non-mandatory feature like cpuset. Otherwise
it's just more code for us to test which will rarely be hit by users
2018-06-05 14:27:29 -04:00
Cole Robinson a33ac92040 cli: Fix --boot smbios_mode=sysinfo (bz 1570549)
Not sure how this was expected to work, just make it do the simple
thing and set the value in the XML. Add a test case for it
2018-04-24 12:32:18 -04:00
Daniel P. Berrangé 48e32b429d Fix copyright header to specify GPLv2 or later, not GPLv2 only.
The copyright headers in every file were chjanged in this previous commit

  commit b6dcee8eb7
  Author: Cole Robinson <crobinso@redhat.com>
  Date:   Tue Mar 20 15:00:02 2018 -0400

    Use consistent and minimal license header for every file

Where before this they said "

  "either version 2 of the License, or (at your option) any later version."

Now they just say

  "GNU GPLv2"

This fixes it to say "GNU GPLv2 or later" again.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-04 16:51:37 -04:00
Cole Robinson b17c7565e2 tests: clitest: test virt-xml --update on inactive VM 2018-04-03 12:43:14 -04:00
Cole Robinson 5aedc0aff7 urldetect: Drop GenericDistro, non-treeinfo redhat bits
non-treeinfo redhat only applies to pre RHEL5.4 and very old
Fedora. It's not worth it anymore to slow down all URL lookups
and maintain code complexity to handle such long out of date
distros.

GenericDistro doesn't actually apply to any public trees that I
can find, except for some with TreeInfo. So turn it into
GenericTreeinfoDistro. If random URL trees want to work with
virt-install, add a treeinfo file
2018-03-29 16:23:57 -04:00
Cole Robinson 3b88bfb1ee cli: Drop clear_attr property
It slightly complicates the generic machinery, and the one usage we
can handle directly
2018-03-21 11:17:36 -04:00