Commit Graph

6648 Commits

Author SHA1 Message Date
Cole Robinson
908faaffee cli: --cpu: add topology.*
We already expose these via --vcpus, but that's for back compat. New
options are under --cpu at:

topology.sockets
topology.cores
topology.threads
2019-05-14 14:36:40 -04:00
Cole Robinson
a6b5f11f13 cli: --metadata: add genid= and genid_enable=
The latter is for triggering <genid/> bool XML, which tells libvirt
to auto-allocate a UUID. The cli isn't really XML conformant but
I can't think of anything better that is self advertising
2019-05-14 14:36:40 -04:00
Cole Robinson
7083294e2c cli: --sysinfo: Add oemStrings.entry[0-9]* 2019-05-14 14:36:40 -04:00
Cole Robinson
d16425aa8f cli: --sysinfo: Add chasis suboptions
Add the following --sysinfo suboptions:

- chassis.manufacturer
- chassis.version
- chassis.serial
- chassis.asset
- chassis.sku
2019-05-14 14:36:40 -04:00
Cole Robinson
773625bfab cli: --boot: add initarg[0-9]*=X
We keep the old initargs="string" support as well, but also advertise the
explict XML list support
2019-05-14 14:36:40 -04:00
Cole Robinson
e5480829b6 cli: --boot: Add explicit boot[0-9].dev config
We keep the old bootorder support as well, but also advertise the
explict XML list support
2019-05-14 14:36:40 -04:00
Pavel Hrdina
c11d6ba4d7 domcapabilities: detect MDS new vulnerability
There is a new security feature 'md-clear' that mitigates recent CPU
Microarchitectural Store Buffer Data vulnerability.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2019-05-14 20:11:39 +02:00
Pavel Hrdina
d8789a124f man: improve sysinfo description
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2019-05-14 19:55:18 +02:00
Pavel Hrdina
897578aee2 cli: fix sysinfo type parsing
If the optstr is "host" or "emulate" the optdict['type'] was already set
to the proper value so that condition is useless and we should set the
default optdict['type'] only if there was no type specified by user,
otherwise it is overwrite by our 'smbios' default.

In addition if invalid type is specified let libvirt to do the error
checking.

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

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2019-05-14 19:55:18 +02:00
Cole Robinson
c31443a810 cli: Add driver.ats= and driver.iommu for virtio devices
This is shared XML schema used by multiple devices that support virtio
2019-05-14 12:45:57 -04:00
Cole Robinson
2344de6f38 cli: device: Add boot.loadparm= 2019-05-14 12:33:07 -04:00
Cole Robinson
13dbc715be cli: Add common device options for --memdev and chardevices
They both can handle explicit address config and alias config, so
wire it up
2019-05-14 12:25:00 -04:00
Cole Robinson
0e8e3c0bbf cli: device: add alias.name= 2019-05-14 12:23:00 -04:00
Cole Robinson
0eb2b167f9 cli: device: Add address.zpci.uid and address.zpci.fid 2019-05-14 12:20:53 -04:00
Cole Robinson
afce300084 cli: Centralize boot.order and address option registering
We will use this as an entry point for future additions.
2019-05-14 12:16:13 -04:00
Cole Robinson
ca0f9e18cc cli: Add --serial target.model.name=
This maps to XML like:

  <serial>
    <target>
      <model name='X'/>
    </target>
  </serial>
2019-05-14 11:57:50 -04:00
Cole Robinson
bf2fe0790e cli: Add --serial target.port= option
This maps to the XML like:

  <serial>
    <target port='X'/>
  </serial>
2019-05-14 11:57:50 -04:00
Cole Robinson
0f81eff588 clitest: Remove long option newline escaping
Apparently we don't actually need it
2019-05-14 11:57:50 -04:00
Cole Robinson
f3fd6d200b cli: --smartcard: support database= and certificate[0-9]*=
For mode=host-certificates config
2019-05-14 11:57:50 -04:00
Cole Robinson
c0ddb86918 tests: clitest: define XML generated from compare tests
All our virt-install/virt-clone compare tests aren't actually
attempting to define the XML, meaning we could be generating bogus
output. Enable it, then fix the fallout, mostly some places we are
triggering libvirt XML validation
2019-05-14 11:57:50 -04:00
Cole Robinson
5e98bfba80 tests: clitest: Break up test run() function 2019-05-14 11:57:50 -04:00
Cole Robinson
c85bb61559 devices: char: Wire up seclabels in CharSource
And expose the config options on the command line for all CharSource
users
2019-05-14 11:57:50 -04:00
Cole Robinson
569533b187 devices: Add DeviceSeclabel
Hoist it out of DeviceDisk, so we can eventually share it with
CharSource as well
2019-05-14 11:57:50 -04:00
Cole Robinson
dc945dc4b9 cli: --disk: alias seclabel* to source.seclabel*
Missed it in the previous conversion
2019-05-14 11:57:50 -04:00
Cole Robinson
423b084e02 cli: Share char source arguments among all CharSource users
Add char source arguments to all users:

--serial
--parallel
--console
--channel
--smartcard
--rng
--redirdev

Not all source options apply to all types, but libvirt doesn't
really discriminate, so we should do the same.
2019-05-14 11:57:50 -04:00
Cole Robinson
354dc4df4a cli: --rng: use predictable cli subarg names
To match the XML schema, rename these subarguments and add aliases
to preserve compatibility:

* backend_connect_host -> backend.source.connect_host
* backend_connect_service -> backend.source.connect_service
* backend_host -> backend.source.host
* backend_mode -> backend.source.mode
* backend_service -> backend.source.service
* backend_type -> backend.type
* rate_bytes -> rate.bytes
* rate_period -> rate.period

'type', and 'device' are kept as advertised options,
due to them being commonly specified and documented
2019-05-14 11:57:50 -04:00
Cole Robinson
fae52f4784 cli: char: use predictable cli subarg names
To match the XML schema, rename these subarguments and add aliases
to preserve compatibility:

* protocol -> protocol.type
* target_address -> target.address
* name -> target.name
* target_type -> target.type

'host', 'path', 'mode', and 'bind_host' are kept as advertised options,
due to them being commonly specified and documented
2019-05-14 11:57:50 -04:00
Cole Robinson
873a35dcee devices: char: move 'protocol' and 'log*' to CharSource
This violates our typical XML hierarchy, but that's how it's modeled
internally in libvirt, and these properties are shared among all
charsource users.
2019-05-14 11:57:50 -04:00
Cole Robinson
43a39dc158 devices: smartcard: Use CharSource
smartcard does the same internally for libvirt, so let's follow that
pattern, and fix the fallout
2019-05-14 11:57:50 -04:00
Cole Robinson
9d78759ac5 devices: redirdev: Use CharSource
redirdev does the same internally for libvirt, so let's follow that
pattern, and fix the fallout
2019-05-14 11:57:50 -04:00
Cole Robinson
6d46e37e09 devices: rng: Use CharSource
Re-use CharSource, just like libvirt does internally. Adjust all
callers to match. Rename type -> backend_model while we are here,
because type is ambiguous
2019-05-14 11:57:50 -04:00
Cole Robinson
b2b9d7d366 devices: char: Add CharSource
Move all ./source handling into CharSource, which will be reused by
other device classes as well. This requires us to add ../ handling
into our xmlapi xpath engine
2019-05-14 11:57:50 -04:00
Cole Robinson
1b3e8e1a32 addhardware: Remove supports_property usage
It's not a pattern I think is worth extending in the future, and
make internal refactorings more difficult. Drop it, and drop it
from tpm and char devices since it is now unused
2019-05-13 14:06:32 -04:00
Cole Robinson
e11ed3ce77 devices: char: Remove uncalled supports_property values 2019-05-13 13:43:25 -04:00
Cole Robinson
1bf970627e devices: tpm: Drop unnecessary defaults setting
Libvirt does the same for these two values, so don't bother duplicating
2019-05-13 13:43:25 -04:00
Cole Robinson
bd6f751657 details: Drop char supports_property usage
Whether we show something in the UI should be more dependent on
whether it's actually set in the XML, not some internal hardcoded
list which can go out of date.
2019-05-13 13:38:46 -04:00
Cole Robinson
0ec251dae4 devices: char: Drop default 'protocol' setting
In the cases we were doing this, libvirt already defaults to raw for us
2019-05-13 13:06:46 -04:00
Cole Robinson
68b4236262 devices: rng: Remove unused function supports_property 2019-05-13 13:01:18 -04:00
Cole Robinson
ba1764943b devices: char: drop tty fallback reading
This is only for ancient rhel5 era libvirt, We don't need it anymore
and it complicates XML handling
2019-05-13 12:36:17 -04:00
Cole Robinson
e6eb1d447b devices: char: Rename some properties to better match XML
* bind_port -> bind_service
* source_host -> connect_host
* source_port -> connect_service
2019-05-13 12:35:55 -04:00
Cole Robinson
a6495bb38f domain: virtinst: custom implement _redefine_xmlobj 2019-05-13 12:09:39 -04:00
Cole Robinson
cfa1a0569b create: Use self._guest less in install path
Pass it around to all the callbacks as needed. Makes the flow easier
to follow
2019-05-13 12:09:39 -04:00
Cole Robinson
a54b83072a addhardware: Remove unused is_customize_dialog 2019-05-13 12:09:39 -04:00
Cole Robinson
472cfbc2a7 xmlbuilder: Validate root element of object parsexml
Ensure that for example a DeviceDisk is actually passed <disk> XML
2019-05-13 12:09:39 -04:00
Cole Robinson
201dfdb23e netlist: Don't spam logs with errors on app shutdown 2019-05-13 12:08:55 -04:00
Cole Robinson
583dae7af5 details: Clarify config_apply variable names 2019-05-13 12:08:55 -04:00
Cole Robinson
a506e3c108 details: Have a separate hw column for unique key
Right now we overload the DEVICE column for non-device pages
like overview or memory. Add a separate column for KEY, and have
DEVICE==None for non-device pages
2019-05-13 12:08:55 -04:00
Cole Robinson
491da67cbf details: Add _make_hw_list_entry helper 2019-05-13 12:08:55 -04:00
Cole Robinson
03bddaaeb3 details: Hardcode list icon size
We use the same value everywhere, so don't include it in the model
2019-05-13 12:08:55 -04:00
Cole Robinson
f947afc3df details: split out a top level vmwindow
vmmVMWindow handles all the menuing, and coordinating between the
console, snapshots, and details panel. Simplifies the details
code a bit which will help when we add xmlediting
2019-05-13 12:08:55 -04:00