VM: upon editing vm allow adding vdisk after having none

This commit is contained in:
Eric Schultz
2018-10-20 12:03:09 -05:00
parent 789f5b6eff
commit 92f335ae94

View File

@@ -1127,7 +1127,7 @@
if (!$old['devices']['hostdev']) unset($old['devices']['hostdev']);
if (!$new['devices']['hostdev']) unset($new['devices']['hostdev']);
// remove existing auto-generated settings
unset($old['cputune']['vcpupin'],$old['devices']['graphics'],$old['devices']['video'],$old['devices']['disk'],$old['devices']['interface'],$old['cpu']['@attributes']);
unset($old['cputune']['vcpupin'],$old['devices']['graphics'],$old['devices']['video'],$old['devices']['disk'],$old['devices']['interface'],$old['cpu']['@attributes'],$old['os']['boot']);
// set namespace
$new['metadata']['vmtemplate']['@attributes']['xmlns'] = 'unraid';
}