Commit Graph

5882 Commits

Author SHA1 Message Date
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
Cole Robinson 139031793c serialcon: Remove direct PTY connection
Removal was discussed here:
https://www.redhat.com/archives/virt-tools-list/2018-May/msg00011.html

Libvirt stream APIs are pretty ubiquitous, have several advantages like
remote access, and avoid some pitfalls of direct access. So drop the
old code
2018-06-12 14:23:39 -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 e0e6ac6956 tests: Remove useless read_file helper 2018-06-12 14:07:50 -04:00
Cole Robinson e12049b114 capabilities: Drop old svm/vmx handling
We don't realisistically support these old libvirt versions anymore
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
Cole Robinson 876c79cc15 virt-install: Simplify checking for install options 2018-06-12 14:07:50 -04:00
Cole Robinson 4dfc6b03e8 hostkeymap: Fix sanitize_keymap on python3
And add test cases to cover the failure

https://bugzilla.redhat.com/show_bug.cgi?id=1585574
2018-06-12 14:07:50 -04:00
Stefan Berger c58f8514ab tpm: allow hotplug operation so error is reported by libvirt
Perform a hotplug operation so that we get the error notification
about unsupported TPM hotplug operation and we can alert the user
that the change will only take effect upon domain shutdown.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2018-06-12 09:54:15 -04:00
Stefan Berger a557ed18f9 details: show TPM device model and allow updating it
Show the TPM device model and allow updating it. If a TPM 1.2 has been
chosen, we only allow the TIS interface to be selected. In case of a
TPM 2.0 we also enable the choice of the CRB interface.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2018-06-11 12:40:28 -04:00
Marc-André Lureau c802f2b3b8 details: show TPM version
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2018-06-11 12:40:28 -04:00
Marc-André Lureau 51919b9824 addhardware: learn to set emulated TPM version
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2018-06-11 12:40:28 -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
Marc-André Lureau c04733c10d addhardware: learn to choose a TPM model
There is only one for now, but we are adding CRB next (and SPAPR is
being added too in qemu/libvirt).

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 96414aa88a domain: Fix removing <console> compat (bz #1586333)
Typo referencing the Guest console list

https://bugzilla.redhat.com/show_bug.cgi?id=1586333
2018-06-07 10:56:47 -04:00
Cole Robinson bac3ea74ec virt-install: Do all option compat conversions earlier
Prevents more mistakes like usage of old options when building the
Guest instance
2018-06-07 10:56:47 -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
Cole Robinson b65a144db1 virt-install: Drop unused graphics default override 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
Charles Arnold ad1a0a17cb Missing translation for the "Kernel Options:" string 2018-06-05 14:27:29 -04:00
Cole Robinson aa1619e966 po: Update de translation from zanata 2018-06-05 14:27:29 -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
Radostin Stoyanov bb06053a8a setup: Integrate codespell
Codespell is a tool for checking misspelled words in source code [1].
Integrating this tool will enable automated spell check of the code
base.

Usage example:
        ./setup.py codespell

[1] https://github.com/codespell-project/codespell

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
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 4370fd7c6c domain.numatune: Remove MEMORY_MODES
It doesn't have any user
2018-06-05 14:27:29 -04:00
Cole Robinson 192da16f6b domain.numatune: Remove cpuset_str_to_tuple
Left over from when we had vcpu pinning in the UI, not used anymore
2018-06-05 14:27:29 -04:00
Pavel Hrdina 5b2774b27a numatune: fix validate_cpuset regexp
Character '-' needs to be escaped in a set of characters.

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

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2018-05-22 19:05:43 +02:00
Cole Robinson 65b33a1377 urldetect: Fix some pylint 2018-05-16 19:31:50 -04:00
Charles Arnold 3fd538ba0f Make SuseDistro a base class for other Suse classes
Remove the PRETTY_NAME for SuseDistro so it isn't included in the allstores.

Add appropriate identifiers to the other Suse classes so that they
are included in allstores.

If cache.treeinfo_family_regex fails to find the family but there is
a .treeinfo file, self.cache.suse_content is set to -1 when a failed
attempt is made to find a content file. Check for -1 in the __init__
function so we will pull the kernel from the location in .treeinfo file.

Signed-off-by: Charles Arnold <carnold@suse.com>
2018-05-16 19:25:32 -04:00
Charles Arnold 26b8bb0f0b Use wildcard to detect 'openSUSE Leap'.
Old versions of the string from the content file end with just "openSUSE".
openSUSE 42.x has a string of "openSUSE Leap ". Cleanup extra whitespace
for old versions of openSUSE.

Signed-off-by: Charles Arnold <carnold@suse.com>
2018-05-16 19:25:32 -04:00
Charles Arnold e6fd723c46 Use split_version method to get version and update
The while loop that follows is similar to rhel code but because the osinfo-db
short id for sles doesn't contain a '.0' for first time releases (eg, sles11,
sles12) we check sle with no update and don't add a '.0' to the string.

Signed-off-by: Charles Arnold <carnold@suse.com>
2018-05-16 19:25:32 -04:00
Charles Arnold ab7209cb6c Create shared function _split_version from _split_rhel_version
This new function will be used for for rhel and sles detection.

Signed-off-by: Charles Arnold <carnold@suse.com>
2018-05-16 19:25:32 -04:00
Cole Robinson ffab20782f connection: Handle more openauth cred types
Like ECHOPROMPT which is needed for libssh hosts file management.
Sync the two implementations a bit
2018-05-03 06:16:28 -04:00
Cole Robinson 84150ddd2e tests: pylint: Tweak config a bit
* Drop some redundant config that's duplicating defaults
* Use more standard pylint regexes
2018-05-02 19:53:03 -04:00
Cole Robinson 28b3aca9fa tests: uitests: Fix with connect.py changes 2018-05-02 17:45:09 -04:00
Cole Robinson 1feb478557 connect: When Custom URI selected, prepopulate with URI label 2018-05-02 17:43:20 -04:00
Cole Robinson 04398945e1 connect: Drop non-ssh remote transport UI
These URIs take non-trivial external config to make work. Explicitly
putting them in the UI is a distraction now that we have the custom
URI option
2018-05-02 17:42:32 -04:00
Cole Robinson d99e31cbc4 tests: uitests: newvm: Fix the rest with the oslist rework 2018-05-01 18:45:25 -04:00
Cole Robinson 54bfb3efff create: Fix container install
We hide the OS selection UI for container installs, the new code
wasn't taking this into account
2018-05-01 18:45:25 -04:00
Cole Robinson ec407e8a06 tests: uitests: newvm: Fix import tests after oslist rework 2018-05-01 18:45:25 -04:00
Cole Robinson ad12a6273d create: Fix guest-name-from-os logic
Should be using the os name, not the 'distro' value
2018-05-01 18:45:25 -04:00
Cole Robinson 511d764b84 create: Import media isn't detectable
This bit has been in the code for a while but only surfaced causing
weirdness with the recent changes.
2018-05-01 18:45:25 -04:00