mirror of
https://github.com/unraid/webgui.git
synced 2026-01-18 07:30:14 -06:00
Merge pull request #1180 from SimonFair/VM-Template-Fixes
Fix changing from passthru to custom CPU.
This commit is contained in:
@@ -1188,6 +1188,8 @@
|
||||
if (!$new['devices']['tpm']) unset($old['devices']['tpm']);
|
||||
// remove existing auto-generated settings
|
||||
unset($old['cputune']['vcpupin'],$old['devices']['video'],$old['devices']['disk'],$old['devices']['interface'],$old['devices']['filesystem'],$old['cpu']['@attributes'],$old['os']['boot'],$old['os']['loader'],$old['os']['nvram']);
|
||||
// Remove old CPU cache and features
|
||||
unset($old['cpu']['cache'], $old['cpu']['feature']) ;
|
||||
// set namespace
|
||||
$new['metadata']['vmtemplate']['@attributes']['xmlns'] = 'unraid';
|
||||
}
|
||||
|
||||
@@ -313,7 +313,7 @@
|
||||
<td>_(CPU Mode)_:</td>
|
||||
<td>
|
||||
<select name="domain[cpumode]" title="_(define type of cpu presented to this vm)_">
|
||||
<?mk_dropdown_options(['host-passthrough' => _('Host Passthrough').' (' . $strCPUModel . ')', 'emulated' => _('Emulated').' ('._('QEMU64').')'], $arrConfig['domain']['cpumode']);?>
|
||||
<?mk_dropdown_options(['host-passthrough' => _('Host Passthrough').' (' . $strCPUModel . ')', 'custom' => _('Emulated').' ('._('QEMU64').')'], $arrConfig['domain']['cpumode']);?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -543,7 +543,7 @@ $hdrXML = "<?xml version='1.0' encoding='UTF-8'?>\n"; // XML encoding declaratio
|
||||
<td>_(CPU Mode)_:</td>
|
||||
<td>
|
||||
<select name="domain[cpumode]" title="_(define type of cpu presented to this vm)_">
|
||||
<?mk_dropdown_options(['host-passthrough' => _('Host Passthrough').' (' . $strCPUModel . ')', 'emulated' => _('Emulated').' ('._('QEMU64').')'], $arrConfig['domain']['cpumode']);?>
|
||||
<?mk_dropdown_options(['host-passthrough' => _('Host Passthrough').' (' . $strCPUModel . ')', 'custom' => _('Emulated').' ('._('QEMU64').')'], $arrConfig['domain']['cpumode']);?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -542,7 +542,7 @@ $hdrXML = "<?xml version='1.0' encoding='UTF-8'?>\n"; // XML encoding declaratio
|
||||
<td>_(CPU Mode)_:</td>
|
||||
<td>
|
||||
<select name="domain[cpumode]" title="_(define type of cpu presented to this vm)_">
|
||||
<?mk_dropdown_options(['host-passthrough' => _('Host Passthrough').' (' . $strCPUModel . ')', 'emulated' => _('Emulated').' ('._('QEMU64').')'], $arrConfig['domain']['cpumode']);?>
|
||||
<?mk_dropdown_options(['host-passthrough' => _('Host Passthrough').' (' . $strCPUModel . ')', 'custom' => _('Emulated').' ('._('QEMU64').')'], $arrConfig['domain']['cpumode']);?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user