prefs: Allow changing the default VM CPU mode/model config

Add a preference for changing the default CPU mode/model. The options are:

- default (whatever virt-manager chooses as the default)
- hypervisor default (no <cpu> block, what we've always done)
- nearest host cpu model (just the 'model' from caps->host->cpu)
- copy host cpu (the entire <cpu> block from caps->host)

The setting only applies to KVM guests, not tested with anything else.
The default is left as is for now (hypervisor default).

copy host CPU will one day use mode='host-model', when it does what
we want. At that point we will probably make it the default
This commit is contained in:
Cole Robinson
2014-01-17 15:32:40 -05:00
parent b215b27854
commit 7003a3a528
5 changed files with 232 additions and 125 deletions

View File

@@ -207,6 +207,13 @@
<summary>Use selected format for new VM storage</summary>
<description>Use selected format when creating new disk images in new VM wizard</description>
</key>
<key name="cpu-default" type="s">
<default>'default'</default>
<summary>CPU setting to use for new VMs</summary>
<description>CPU setting to use for new VMs. Limited to VMs matching the host architecture. Possible values: default (virt-manager default), hv-default (qemu's default), host-cpu-model (just the model, not the additional features), host-model (libvirt's host-model setting).</description>
</key>
</schema>
<schema id="org.virt-manager.virt-manager.paths"