Not sure I want to go down that route if we can avoid it. Instead
just fold the full_id support into the existing option handling.
Streamline the OSVariantData usage throughout the cli tools
Replace the unreleased --os-variant OSNAME,install=location with just
--install OSNAME
Unwind the --unattended dependency on upfront --os-variant while
we are at it, since they are all intertwined. Now we can just do:
virt-install --install OSNAME
and
virt-install --install OSNAME --unattended
We set this to True in virt-install, which will cause an explicit
error to be thrown if some part of the cli parser tries to access
osinfo before it's been set, because then we have a circular dependency
between cli config -> installer -> osinfo -> cli config
Having this at set_uefi time complicates the domain XML building
machinery, where we don't want things to have osinfo access.
Rearrange it so that editing cases call this explicitly, and
the XML builder just deals with it at the set_defaults time
Add an explicit no_install to Installer to encode that the user is
not expecting an install phase. Use that to determine later if any
install options were specified. This saves later code from having
to deal with installer=None, and is the basis for further clarifications
This reverts commit 66fe00ddee.
Turns out it's not that simple. Indeed libvirt sets the default
when no <vcpus> XML is present, but if you do --vcpus cpuset=X
libvirt will error that there's no vcpu value set. So for back
compat and generate safety let's keep setting it.
It's hard to validate whether something like --extra-args or
--initrd-inject is supported based on the command line arguments. It's
easier to let the installer.py figure it out because it's the
authoritative source
--install kernel_args=X acts like --extra-args. If
kernel_args_overwrite=yes is also specified, it overwrites whatever
default kernel args we would have used for the install method.
Handling this is a bit different from other bits, because:
1) the <device> editing paradigm is unique. We need to replace the
device in line in the XML which is a new operation
2) the New VM customize pattern is tricky and needs lots of
special handling
The XML editor ui is a two tabbed notebook, one 'Details' tab
and one 'XML' tab. The latter has a gtksourceview and allows editing
the raw libvirt XML for whatever the selected object is.
API users will programmatically insert the xmleditor notebook into
their UI, with the existing UI under the details tab.
It was disabled with commit 2aca20141e back in 2015, but
these days we have it enabled for all other architectures and
there doesn't seem to be a good reason for s390x to keep being
the outlier.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
This uses the same logic as virt-manager. The name is mostly
derived from --os-variant naming, but we have fallback defaults too.
Print the name to stdout so users are informed about what we are
doing.
This puts all the default resource setting in one place, and the
only place that was depending on it, as virt-manager explicitly sets
the values on its own. This will be used in future patches to add
more default setup and report the values to the user