More specific removal of driver type to prevent 'qcow2' revert to 'raw'

This commit is contained in:
bergware
2018-09-04 20:54:08 +02:00
parent 6168f97862
commit 79466d0a2d
@@ -1105,9 +1105,9 @@
if ($p2['bus'] && $p2['slot'] && $p2['function'] && $p2['bus']==$pci['bus'] && $p2['slot']==$pci['slot'] && $p2['function']==$function) unset($old['devices']['hostdev'][$k]);
}
}
// do not overwrite existing driver settings
// do not overwrite existing driver type settings
$disks = $new['devices']['disk'];
foreach ($disks as $key => $disk) unset($new['devices']['disk'][$key]['driver']);
foreach ($disks as $key => $disk) unset($new['devices']['disk'][$key]['driver']['@attributes']['type']);
// settings not in the GUI, but maybe customized
unset($new['memoryBacking'], $new['clock'], $new['features']);
// update parent arrays