Commit Graph

27 Commits

Author SHA1 Message Date
Jonathon Jongsma 44355e5ed0 virt-install: add support for qemu-vdagent channel
This allows support for host/guest clipboard sharing when using vnc
guests (and possibly other graphics types in the future). This channel
is similar to the spicevmc channel, but it contains a couple additional
options to enable/disable clipboard sharing and specify the mouse mode.
In the case of spice, these settings are specified on the 'graphics'
element, but for qemu-vdagent, they are specified on the channel. For
example:

   --channel=qemu-vdagent,source.clipboard.copypaste=on,source.mouse.mode=client

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
2022-06-13 13:49:08 -04:00
Cole Robinson 22478f307d virt-install: Add --cloud-init clouduser-ssh-key=
This sets the sshkey for the default cloud-init username

Resolves: https://github.com/virt-manager/virt-manager/issues/307

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-03-01 14:29:46 -05:00
Cole Robinson c8afd1f51e virt-install: Rename --cloud-init ssh-key -> root-ssh-key
Originally we thought it would be for the clouduser, but then
we changed it, and now it's ambiguous. Rename it to make the
usage clear, and add an alias to keep any users working

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-03-01 14:29:46 -05:00
Cole Robinson d6b74a83d1 cli: Add xpath.* subargs to XML options
This adds the power of --xml to individual device options. For example
this makes it easier to make custom XML changes for a single --disk
device from both virt-install and virt-xml

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-27 11:46:54 -05:00
Cole Robinson 2a3ff3609b Use pcie_root_ports for arm and riscv machvirt
Libvirt defaults to PCIe for arm32/aarch64 and riscv -M virt too.

Rename q35_pcie_root_ports to num_pcie_root_ports and extend the
logic to those archs too

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-26 14:11:56 -05:00
Cole Robinson cd5c34a3f3 cli: Add basic --audio type=XXX,id=Y support
Closes: #264

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-24 14:18:41 -05:00
Cole Robinson 363fca413c virt-install: Require --osinfo for non-x86 HVM case too
It's generally not as valuable for non-x86 where we don't have the
history of supporting non-virtio OSes, but as time goes on it will
likely become more relevant for non-x86 arches, so let's make this
change now to get ahead of it.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-20 11:40:35 -05:00
Cole Robinson 6ddcb23d9a man: virt-install: Update --controller docs
Drop type value lists, add example invocations, document
q35_pcie_root_ports

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-20 10:40:58 -05:00
Cole Robinson d70d4e6e7a devices: tpm: Rework defaults
The code previously was just encoding the same defaults as libvirt,
which doesn't really add anything.

Instead, let's prefer type='emulator' model='tpm-crb', which
gives the most modern virtualization friendly config. When we don't
know if that will work, we mostly leave things up to libvirt to fill
in.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-19 08:36:28 -05:00
Cole Robinson 26ecf8a5e3 virt-install: Make missing --osinfo fatal for most cases
This was previously discussed here:
https://listman.redhat.com/archives/virt-tools-list/2020-September/msg00017.html

For the x86 + hvm case, failure to specify an --osinfo/--os-variant
OS, and failure to detect an OS from install media, will now throw
a big error:

```
--os-variant/--osinfo OS name is required, but no value was
set or detected.

This is now a fatal error. Specifying an OS name is required
for modern, performant, and secure virtual machine defaults.

If you expected virt-install to detect an OS name from the
install media, you can set a fallback OS name with:

  --osinfo detect=on,name=OSNAME

You can see a full list of possible OS name values with:

   virt-install --osinfo list

If your Linux distro is not listed, try one of generic values
such as: linux2020, linux2018, linux2016

If you just need to get the old behavior back, you can use:

  --osinfo detect=on,require=off

Or export VIRTINSTALL_OSINFO_DISABLE_REQUIRE=1
```

The thread goes into more detail, but basically, for x86 VMs at least,
it's unlikely you will _ever_ want the default 'generic' behavior,
which gives gives no virtio, no PCIe, no usb3, IDE disks, slow
network devices, etc.

Many people use virt-install in scripts and CI, and this may now
cause breakage. The environment variable is there to help them
get things back to normal as quick as possible, but it will still
noisy up their logs with the warning to hopefully get them to make
a useful change to their virt-install invocations.

This is limited to x86, since that's where most of our defaults
historically differ, and where we can depend on libosinfo to give
the most accurate device info. This may be relevant to change for
other KVM architectures in the future.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-16 12:25:13 -05:00
Cole Robinson 9c54c116fa cli: Recommend --osinfo more over --os-variant
We are about to change the some defaults around os handling. Let's
start recommending the nicer named --osinfo more, since new error
messages are going to promote it a bit as well

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-12 11:53:09 -05:00
Cole Robinson 96a40b1143 cli: Add `--os-variant list` option to print OS name values
The canonical tool for this is `osinfo-query os`, which we still
reference in the man pages and in the list output.

However, we are about to make missing --os-variant fatal for common
usage, and I don't want to force users to install an extra tool just
to figure out what an acceptable --os-variant value is.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-12 11:53:09 -05:00
Cole Robinson 9c6efdc1d5 man: virt-install: Use osuosl.org for debian URL example
https:// needs to link to the exact site, not the debian.org redirect,
otherwise we get browser cert warnings

Fixes: #360

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-02-09 11:11:29 -05:00
Jonathon Jongsma 17cd4477b8 man: fix default value for filesystem accessmode option
Commit 85307b9bd2 changed the default
value for 'accessmode' from 'passthrough' to 'mapped', but forgot to
update the documentation in the man page.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
2022-02-09 11:05:01 -05:00
Daniel P. Berrangé 9a578e1ac5 virtinst: prefer cores when exposing topology to the guest
In real world silicon though it is rare to have high socket/die counts,
but common to have huge core counts.

Some OS will even refuse to use sockets over a certain count.

Thus we prefer to expose cores to the guest rather than sockets as the
default for missing fields.

This matches a recent change made in QEMU for new machine types

  commit 4a0af2930a4e4f64ce551152fdb4b9e7be106408
  Author: Yanan Wang <wangyanan55@huawei.com>
  Date:   Wed Sep 29 10:58:09 2021 +0800

    machine: Prefer cores over sockets in smp parsing since 6.2

Closes: https://github.com/virt-manager/virt-manager/issues/155
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-01-20 14:16:38 -05:00
Daniel P. Berrangé 95eb8dda9b virtinst: add missing 'dies' parameter for --vcpus
Although using --cpu topology.XXX is the preferred way to set topology,
it is still possible via the --vcpus parameter. For consistency, this
should support the full set of parameters, so dies needs to be added.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2022-01-20 14:16:38 -05:00
Matt Graham c51ebdd76a Fix typo 2022-01-12 13:29:30 -05:00
lisongmin 7da5daff92 cli: --cloud-init add network-config option 2021-10-04 16:31:39 -04:00
a1346054 fa78a0c3f2 misc: trim excess whitespace 2021-10-04 16:26:08 -04:00
a1346054 0d71a9a7fd misc: fix spelling 2021-10-04 16:26:08 -04:00
Hugues Fafard 20d2376b18 cli: --shmem: added support for shared memory devices
This includes support for the following suboptions:
* name              (<shmem name=X>)
* role              (<shmem role=X>)
* model.type        (<shmem><model type=X/>)
* size              (<shmem><size>X)
* size.unit         (<shmem><size unit=X/>)
* server.path       (<shmem><server path=X/>)
* msi.vectors       (<shmem><msi vectors=X/>)
* msi.ioeventfd     (<shmem><msi ioeventfd=X/>)
2021-07-27 15:55:00 -04:00
Cole Robinson f793986378 urlfetcher: Add xorriso ISOReader implementation
xorisso is the still maintained isoinfo alternative, and may be
the only iso reading tool in RHEL9, so we need to support it.
Make it the default for our spec file and test suite too

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-05-22 14:56:10 -04:00
Cole Robinson 9c13d2f878 Remove use of problematic terminology
Following kernel recommendation here:
https://lkml.org/lkml/2020/7/4/229

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-23 14:33:17 -04:00
Cole Robinson a242894182 cli: Add --os-variant require=on|off
If specified, this errors if no OS name was detected or manually set.
So --os-variant detect=on,require=on will error if no OS is detected.

name= can be used as a fallback, so test and document this case

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-14 20:36:12 -04:00
Cole Robinson 17f47a44c5 cli: --os-variant: add explicit suboptions
This adds the following --os-variant suboptions

* name=, short-id=
* id=
* detect=on|off

Functionally this does not change behavior, just adds explicit
sub options for behavior we already support

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-14 20:15:20 -04:00
Cole Robinson 67703ec7a5 cli: Add --osinfo as alternate name for --os-variant
The --os-variant option naming is pretty crappy and mostly a historical
artifact. Ideally this would be named just `--os` but I'm afraid that
would cause confusion with libvirt's <os> XML

Add --osinfo as an alternate commandline naming. If we ever want to
transition documented use of --os-variant it will help to have the
alternative around for a few releases

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-14 18:12:41 -04:00
Cole Robinson 65a39a7495 man: Convert .pod files to .rst
Used pod2rst for the initial conversion but a lot of manual fixup
afterwards.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-13 09:58:39 -04:00