Commit Graph

1483 Commits

Author SHA1 Message Date
Cole Robinson
4c3c53f773 virtManager: Remove network portgroup UI
portgroups are a way to group logical chunks of settings inside
a <network> object. They are a quite advanced feature that I expect
many few users are using, and the ones that are using it are certainly
advanced enough to edit the XML directly.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:39:34 -05:00
Cole Robinson
4fce7dde9a virtManager: Remove LXC idmap UI
This is pretty obscure, and requires a large amount of UI surface
to handle correctly. Users can use the XML editor if they know they
need or want this.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:39:32 -05:00
Cole Robinson
137b73df75 virtManager: Only allow editing disk bus for new VM
This was proposed here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html

"""
* disk: bus editing: maybe keep this for the customize wizard, but
it should go away for existing disks, changing it for an existing VM is
definitely a 'shoot yourself in the foot' type of thing for most users
"""

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:39:18 -05:00
Cole Robinson
7547905d79 virtManager: Remove max memory UI and memory hotplug support
This was proposed here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html

"""
* UI maxmem and maxcpu notions, and related memballoon and cpu hotplug
operations. These have been in the UI forever but I'm not sure people
actually use them. cpu hotplug has always been a mess, and unless the
user plans ahead by setting a high maxmem value ballooning is only good
for reducing memory. These all sound like advanced usage to me that
just confuses the typical usecase of adding more mem or vcpus to an
offline VM. And the hotplug operations with virsh are simple to invoke.
So I'd like to drop this from the UI
"""

The remaining field sets both max and current memory in the
inactive XML

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:24:22 -05:00
Cole Robinson
0335c9ce62 virtManager: Remove maximum VCPUS API and VCPU hotplug
This was proposed here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html

"""
* UI maxmem and maxcpu notions, and related memballoon and cpu hotplug
operations. These have been in the UI forever but I'm not sure people
actually use them. cpu hotplug has always been a mess, and unless the
user plans ahead by setting a high maxmem value ballooning is only good
for reducing memory. These all sound like advanced usage to me that
just confuses the typical usecase of adding more mem or vcpus to an
offline VM. And the hotplug operations with virsh are simple to invoke.
So I'd like to drop this from the UI
"""

The remaining UI field now sets both maximum and current VCPU
allocation.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:24:20 -05:00
Cole Robinson
b4b497e28f virtManager: Remove network virtualport UI
This was proposed here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html

"""
* network virtualport configuration: this is some really obscure
stuff for configuring VEPA for macvtap devices. I don't think it gets
any usage in practice. I think a smaller subset of this UI is shared
with openswitch config but I believe it's just a single field, we
could keep that even though I don't think many people use it either
"""

This removes it all. The openvswitch piece was not properly wired
up anyways, since it requires setting virtualport type for a bridge.
For users that know they need that, they can add it via the XML
editor.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:22:18 -05:00
Cole Robinson
3c861131dd virtManager: error: Break long lines in error dialogs
Errors from libvirt can be super long, and stretch out the dialog like
crazy.

This causes some changes in test suite output, so adjust tests to
match

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:21:59 -05:00
Cole Robinson
a162a3b845 virtManager: Remove disk driver_io UI
This was proposed here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html

The default driver_io value we use seems to be sufficient. It's very
rare to hear that users need to change the value to something
different, and if they do, they are advanced enough users that can
edit the XML directly IMO.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-25 14:30:07 -05:00
Cole Robinson
2367e70efa virtManager: Remove magic spapr-* device handling
We have lots of spapr-* pretty printing and some magic handling
spread around the codebase. These devices have fallen out of favor
and are rarely used, so drop the special handling

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-25 14:30:07 -05:00
Cole Robinson
79fe886ac8 virtManager: Remove disk format/driver_type UI
This was proposed here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html

"""
* disk: storage format: this was from before the days when we
storage-ified everything and we could get the disk format wrong, telling
qemu it has a raw image when it's qcow2. shouldn't be needed anymore for
normal virt usage
"""

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-25 14:30:07 -05:00
Cole Robinson
1066867583 virtManager: Remove disk serial UI
This was proposed here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html

"""
* disk: serial: I know this is useful in some cases but seems quite
obscure. I think the XML editor is fine unless there's some common
usecase I'm missing
"""

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-25 13:45:43 -05:00
Cole Robinson
bd82ef6529 virtManager: Remove spice tlsport UI
This was discussed here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html

tlsPort is an advanced config feature. With the XML editing support,
it's less important to have this as a first class UI element. Users
that know they need this setting can set it directly in the XML

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-24 17:04:29 -05:00
Cole Robinson
ee9f93074b Remove virt-convert
This was raised here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html

Quoting from that:

"""
virt-convert takes an ovf/ova or vmx file and spits
out libvirt XML. It started as a code drop a long time ago that could
translate back and forth between vmx, ovf, and virt-image, a long dead
appliance format. In 2014 I converted it to do vmx -> libvirt and ovf ->
libvirt which was a CLI breaking change, but I never heard a peep of a
complaint. It doesn't seem to do a particularly thorough job at its
intended goal, I've seen 2-3 bug reports in the past 5 years and
generally it doesn't seem to have any users. Let's kill it. If anyone
has the desire to keep it alive it could live as a separate project
that's a wrapper around virt-install but there's no compelling reason to
keep it in virt-manager.git IMO
"""

Nothing has changed since then, so here is the removal.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-24 17:04:29 -05:00
Cole Robinson
cdbc3f56e6 cli: kill --graphics keymap=local, and hostkeymap module
Removing this was discussed here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html

This is the old default, where we would try to determine a static
keymap value from host graphics config files, and set that in the
XML.

We haven't defaulted to this for a long time, setting a static keymap
is suboptimal generally, and the file parsing code is not up to date
for modern host config. So let's remove it

The hostkeymap module is now unused, so remove it and all the custom
testing for it.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-24 17:04:29 -05:00
Cole Robinson
7251ea25c2 virtManager: Remove graphics keymap UI
Removing this was discussed here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html

For a decade, qemu and xen and virt-manager work together to
make setting a manual keymap redundant. Advertising it in the UI does
more harm than good, because users may think they need to specify
one when in the vast majority of cases it will give worse behavior.

With the XML editing UI, users still have a way to do this by hand
if they really know what they are doing.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-24 17:04:29 -05:00
Cole Robinson
188fd4adb1 cli: Drop keymap santizing
We shouldn't be validating against a static list of keymaps,
instead we should let libvirt or the hypervisor throw and error.

Also the accompanying code is about to be removed.

It's possible this will break command line usage for some users, like
if they were passing keymap=US and depending on our logic to lower()
it for them. I think this should be rare, and IMO it's acceptable to
tell users to just fix their command line, which should work correctly
with older versions too, so it should be a one time fix.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-24 17:04:29 -05:00
Cole Robinson
670e2fe11a tests: uitests: Fix for latest storage delete changes
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-24 15:39:41 -05:00
Cole Robinson
33eabb2a17 tests: clitest: Add --unattended reg-login= coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-24 11:34:48 -05:00
Cole Robinson
5e63e87a8a cli: Default lxc:/// memory to 1024, and print it
My previous patch was misguided as pointed out by Pavel:
https://github.com/virt-manager/virt-manager/issues/73#issuecomment-574680435

And it was setting incorrect memory, which I missed because the tests
are busted here. Add a hack to work around that

Bump up the default to 1024, and print it, so the user can tell if
the default is not to their liking

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-15 11:07:42 -05:00
Cole Robinson
e4f68764b0 virt-install: Set default memory to appease lxc:///
AFAICT the driver doesn't really do anything with it, but libvirt
XML requires it. So just default to --memory 64

Fixes: #73

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-14 13:10:03 -05:00
Cole Robinson
637781fca2 cli: Add --serial type= arg, with back compat alias char_type
'type' is the expected naming here

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-12-24 12:02:53 -05:00
Cole Robinson
78ad233653 tests: abide logging options for clitests
We need to restore logging after calling the cli tools. Centralize
the logging reset behavior since we need that too

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-12-11 17:57:28 -05:00
Pavel Hrdina
39366c37f6 controller: don't set default controller index
Libvirt is able to figure this out and it will make usage of the CLI
options more user-friendly.

For example if users wants to add a new pcie-root-port to existing VM
they have to figure out the latest controller index and call it like
this:

    virt-xml \
        --add-device \
        --controller pci,model=pcie-root-port,index=$nextIndex \
        $VM

After this change it will be simply:

    virt-xml \
        --add-device \
        --controller pci,model=pcie-root-port \
        $VM

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-12-04 12:38:28 +01:00
Cole Robinson
7fee1a2814 cli: Fix --cloud-init and --unattended 'none' handling
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-11-25 14:19:09 -05:00
Cole Robinson
da996317f8 cli: cloudinit: default to --autoconsole text with --cloud-init
Cloud images all work nicely with text output, and it's likely
the preferred native way to connect to the guest vs graphical.
Plus it simplifies generated password copy+paste

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-11-25 14:03:49 -05:00
Cole Robinson
c5da0d7b07 virt-install: Don't pause for cloudinit pass if stdin is closed
Like if run in a script without any stdin open. Have the test suite
actually hit this path

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-11-25 14:03:49 -05:00
Cole Robinson
e488696cef cli: Add explicit --autoconsole option
Allows the user to override our implicit '--autoconsole default'
handling

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-11-25 06:22:14 -05:00
Cole Robinson
4ef519229d virt-install: Drop warning about '--console none'
This should be rarely if ever used, don't warn the user about this
case

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-11-24 17:25:51 -05:00
Cole Robinson
ed6436e455 tests: Move cloudinit test data to its own sub directory
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-11-21 17:38:46 -05:00
Cole Robinson
89fc06f642 cli: Add --cloud-init meta-data=/path/to/meta-data
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-11-21 17:34:39 -05:00
Cole Robinson
e1bd5f92cf cli: Add --cloud-init user-data=/path/to/user-data
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-11-20 17:47:34 -05:00
AthinaPl
b4daeba6b5 cloudinit: Add ssh-key=/path/to/key cli option
Login to VM with:
ssh root@vm_ip_address

Signed-off-by: AthinaPl <athina.plaskasoviti@gmail.com>
2019-11-20 16:41:10 -05:00
Athina Plaskasoviti
7a2c53612f cloudinit: Add root-password-generate=yes|no instead of root-password=xxxx
Now --cloud-init defaults to root-password-generate=yes,disable=yes.
Option for plaintext password given through the cli is completely removed.

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Signed-off-by: Athina Plaskasoviti <athina.plaskasoviti@gmail.com>
2019-11-20 16:41:10 -05:00
Athina Plaskasoviti
050d4dd62a cloudinit: Add cli option root-password-file=/path/to/file
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Signed-off-by: Athina Plaskasoviti <athina.plaskasoviti@gmail.com>
2019-11-20 16:41:10 -05:00
Athina Plaskasoviti
db0e524e8d cloudinit: Add basic testing for cli option --cloud-init
Tests now cover default --cloud-init behavior, and
root-password=(generate and given password),disable=no.

Signed-off-by: Athina Plaskasoviti <athina.plaskasoviti@gmail.com>
2019-11-20 16:41:10 -05:00
Fabiano Fidêncio
54edd0a0a6 unattended: Never use "root" as user-login
When running virt-install as root, user-login would be automatically set
to "root", causing an installation failure in the most part of the
distros (if not all of them).

In order to avoid such failures, let's raise a runtime error in case the
user-login used is "root".

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2019-11-20 16:04:09 -05:00
Cole Robinson
5d8bd316c1 tests: test_urls: Reset cached guest os_variant before short circuit test
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-11-12 16:16:55 -05:00
Fabiano Fidêncio
cdcec1fb03 unattended: Add option to set the user-login
Let's allow setting the login of the guest user.

Using the user from the system is a quite good fallback, but would break
unattended installations when running virt-install as root. Thus, for
those cases, it makes sense to have the option of setting the user
login.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2019-11-12 16:07:07 -05:00
Cole Robinson
0e9905d057 uitests: Fix memory hotplug test with latest libvirt
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-11-12 14:23:08 -05:00
Cole Robinson
062ff8227a tests: Update output with latest libvirt
Which forces disk type='file' when <source> is missing

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-10-22 10:29:19 -04:00
Cole Robinson
4e07c3d8f3 Fix tests with latest osinfo-db
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-10-03 06:57:42 -04:00
Fabiano Fidêncio
d6d97c6587 osdict: Choose the most appropriate tree when a profile is set
As some OSes, as Fedora, have variants (which we rely to be standardised
on osinfo-db side), let's select the most appropriate variant according
to the selected profile of the unattended installation.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2019-09-11 16:22:40 -04:00
Fabiano Fidêncio
0f1acc9f8f osdict: Always return the most generic tree
Some OSes, as Fedora, have variants (which we rely to be standardised on
osinfo-db side), which we can use to return the most generic tree
possible, in case no profile is specified, in order to avoid failing to
install a "Workstation" system because a "Server" variant tree was used.

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

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2019-09-11 16:22:40 -04:00
Cole Robinson
0eb571f9e1 cli: Add --tpm backend.encryption.secret=
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-09-04 08:29:58 -04:00
Menno Lageman
0254558e6e cli: add --features kvm.hint-dedicated.state=
QEMU version 2.12.1 introduced a performance feature under commit
be7773268d98 ("target-i386: add KVM_HINTS_DEDICATED performance hint").
Support for this performance hint was added in libvirt 5.7.0 by commit
cb12c59dac04 ("qemu: support for kvm-hint-dedicated performance hint").

This patch extends virt-install's existing --features option to insert the
appropriate XML into the guest definition if this feature is specified
on the command line.

    E.g. --features='kvm.hint-dedicated.state=on' would result
    in the following XML:

      <features>
        ...
        <kvm>
          <hint-dedicated state='on'/>
        </kvm>
        ...
      </features>

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Menno Lageman <menno.lageman@oracle.com>
2019-09-03 14:04:18 -04:00
Cole Robinson
1f0c262051 cli: Add --controller driver.iothread
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-08-28 13:17:32 -04:00
Cole Robinson
cee3f6b48e cli: Add --disk driver.iothread
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-08-28 12:43:56 -04:00
Athina Plaskasoviti
2e49041d85 cli: Add --clock timer[0-9]*.catchup options
Added:
-timer[0-9]*.catchup.threshold
-timer[0-9]*.catchup.slew
-timer[0-9]*.catchup.limit

Catchup attributes need timer with assigned tickpolicy=catchup.

XML Mapping:

<clock>
  ...
  <catchup threshold="X" slew="X" limit="X"/>
  ...
</clock>

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Athina Plaskasoviti <athina.plaskasoviti@gmail.com>
2019-08-19 15:39:47 -04:00
Athina Plaskasoviti
cc60d558c0 cli: Add --cputune memorytune options
--memorytune[0-9]*.vcpus
--memorytune[0-9]*.node[0-9]*.id
--memorytune[0-9]*.node[0-9]*.bandwidth

XML Mapping:

<cputune>
  ...
  <memorytune vcpus="X">
    <node id="X" bandwidth="X"/>
  </memorytune>
  ...
</cputune>

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Athina Plaskasoviti <athina.plaskasoviti@gmail.com>
2019-08-19 15:39:47 -04:00
Athina Plaskasoviti
9cea262b85 cli: Add --cputune cachetune options
- cachetune[0-9]*.vcpus
- cachetune[0-9]*.cache[0-9]*.level
- cachetune[0-9]*.cache[0-9]*.id
- cachetune[0-9]*.cache[0-9]*.type
- cachetune[0-9]*.cache[0-9]*.size
- cachetune[0-9]*.cache[0-9]*.unit

XML Mapping:

<domain>
...
  <cputune>
  ...
    <cachetune vcpus="X">
      <cache level="X" id="X" type="X" size="X" unit="X"/>
    </cachetune>
  ...
  </cputune>
...
</domain>

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Athina Plaskasoviti <athina.plaskasoviti@gmail.com>
2019-08-19 15:39:47 -04:00