The versions we are warning about are all over 4 years old, and
these warnings were initially just informative to help users know
when the config wasn't going to work. Drop most of it. Still warn
in the UI when a VM misconfig will prevent spice GL from working
Signed-off-by: Cole Robinson <crobinso@redhat.com>
I don't think many, if any, people are using virt-manager with
openvz. Drop the specific handling the filesystem UI, users can use
the raw XML editor if they need special behavior
Signed-off-by: Cole Robinson <crobinso@redhat.com>
All drivers that support the listAll APIs, which we depend on,
also are new enough to support isActive, so stop checking support
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Commit d52d9885c8 added a logic to
consider as EOL a distribution with no EOL date set and release date
earlier than 5 years from the current day. This was done because there
were (and still are, even if fewer now) many old OSes in osinfo-db with
no EOL date set, which were thus considered "supported". Sadly, OSes
that are still supported, like Windows 10, Windows Server 2012, or
earlier versions of RHEL/CentOS/OL 6/7, are now considered "EOL".
As a hack on top of the initial hack, extend the range from 5 years to
10 years: this will consider some of the aforementioned OSes as
supported, without adding too many other OSes.
Of course the long term solution is to make sure all the OSes in
osinfo-db that are EOL upstream have a EOL date set, so there is no more
need to arbitrary exclusion logic.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
-1 returned from osdict resource lookup means the value is unspecified.
When we encounter that value we should also check the 'all' arch
category, instead of stop processing.
This fixes some vcpus calculation for --os-variant rhel7.0 with
latest osdict
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Since machine's canonical alias can be the same as other machine's
name, current all_machine_names() may return duplicates entries.
This causes the problem that the entry of "virt-5.0" appears twice in
machine selection menu when aarch64 is used.
So, fix this by just not adding the same entry twice.
Signed-off-by: Misono Tomohiro <misono.tm@gmail.com>
Add data/urldetect with a bunch of distro tree content to trigger
full code coverage of virtinst/install/urldetect.py
Signed-off-by: Cole Robinson <crobinso@redhat.com>
I can't find any publicly available media to test this case, I'm
not sure it does anything useful anyways, so just drop it
Signed-off-by: Cole Robinson <crobinso@redhat.com>
osinfo library doesn't return data for these with the fedora 32
version, so it's hard to get coverage testing. Since we aren't
even using this code yet anyways, let's remove it until it is needed
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Use single strings with proper placeholders for texts, so there is no
need to join together bits of translated texts.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
Use plural forms for strings that depend on a runtime value, like a
count. This way they will get the proper string for the actual value.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
Use two different strings in case there is a timeout and there is none.
Also add a "the" article to make it slightly better.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
It will be used to translate strings with plural forms.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
Do not split the error messages and the error details, but rather use a
single string with proper placeholders. This avoids string puzzles.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
Create and pass the whole strings to the internal _run_console()
function: this way there is no need to second guess what the
%(console_type) placeholder is, and the types are actually translatable.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
Change the label for a generic OS to "Generic OS", and making it
translatable.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Pino Toscano <ptoscano@redhat.com>
Add a --iommu option to configure IOMMU parameters as described in
https://libvirt.org/formatdomain.html#elementsIommu
E.g. 'virt-install --iommu model=intel,driver.aw_bits=48,driver.iotlb=on ...'
will generate the following domain XML:
<devices>
<iommu model="intel">
<driver aw_bits="48" iotlb="on"/>
</iommu>
</devices>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Menno Lageman <menno.lageman@oracle.com>
So in the code we can prefix comments with 'translators:' before
translated strings to have them show up in .pot file output
Signed-off-by: Cole Robinson <crobinso@redhat.com>
There's valid cases where a VM can be defined with a conflicting MAC
address. Prior to ebd6091cc8 and related refactorings we were more
lax here if the conflicting VM wasn't running, but now we are blocking
some valid usage.
Hoist the validation check up to cli.py and add --check mac_in_use=off
to skip the validation. Advertise it like we do for other checks, so
now a collision error will look something like:
The MAC address '22:11:11:11:11:11' is in use by another virtual
machine. (Use --check mac_in_use=off or --check all=off to override)
Reported-by: Pino Toscano <ptoscano@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Users are fond of using "--tpm /dev/tpm0" to create a TPM device
for their VMs. ppc64 users, however, are experiencing errors because
the default TPM model is 'tpm-tis', which does not work in ppc64, and
they need to specify 'model=tpm-spapr' to work around that.
This patch makes the default TPM model change to 'tpm-spapr' when
running virt-install on a ppc64 host. A new test was added in test_cli.py
to test this new condition. This also keeps the 100% coverage of
the tpm.py file.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
CC: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>
CC: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
'codespell' returns errors on this file in the format of:
virtinst/progress.py:527: fo ==> of, for
This has to do with the 'fo' instance variable of the TextMeter
class. The code was introduced in commit v1.2.1-131-gd5d6cfff,
when parts of the urlgrabber code were copied to avoid dependency
on python-urlgrabber.
Looking at how 'fo' is used, an alternative would be rename it to
'output', so let's make codespell and ourselves happier with less
lint errors.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Ubuntu 20.04 has a new installer, which is yet not supported by
virt-install / osinfo-db, and this made ubuntu switch their URLs
for the old installer to current/legacy-images/... instead of
current/images/...
Let's adapt URL detect so it can deal with this new "legacy"
style.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
The builtin rng backend uses getrandom syscall to generate random, no
external rng source needed, introduced from libvirt v6.1.0.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Han Han <hhan@redhat.com>
Add support for the tpm-spapr device model for pSeries VMs.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Rather than build a guest and installer instance depending on where
we are in the UI, track each input property in an explicit class, so
we can rebuild the guest/installer on demand with data accumulated
up to that point.
This makes the flow easier to follow and simplifies a lot of hacks we
have to do when backing up through the wizard, because we are trying
to unwind changes from an existing object, rather than just blowing
it away and easily reassembling it with updated info.
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Replace the is_session and is_system distinction with variants
of is_privileged. This matches what libvirt uses internally, and
will help with supporting qemu:///embed at some point
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Rather than individual options for each possible hypervisor,
and annotations like 'remote' or 'session', just have it take a
fake URI to mock
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Googling for 'Graphics requested but DISPLAY is not set' shows there's
some confusion about virt-install's behavior in this area. This gives
more output in several related cases about what commands we are
running and the state of the VM
Signed-off-by: Cole Robinson <crobinso@redhat.com>