diff --git a/emhttp/plugins/dynamix.vm.manager/include/libvirt.php b/emhttp/plugins/dynamix.vm.manager/include/libvirt.php index 33e224e98..042a17ae0 100644 --- a/emhttp/plugins/dynamix.vm.manager/include/libvirt.php +++ b/emhttp/plugins/dynamix.vm.manager/include/libvirt.php @@ -910,9 +910,9 @@ } if ($gpu['multi'] == "on"){ - $newgpu_bus= 0x10; + $newgpu_bus= 0x07; if (!isset($multibus[$newgpu_bus])) { - $multibus[$newgpu_bus] = 0x10; + $multibus[$newgpu_bus] = 0x07; } else { #Get next bus $newgpu_bus = end($multibus) + 0x01; @@ -2004,8 +2004,17 @@ if (is_file($cfg)) unlink($cfg); if (is_file($xml)) unlink($xml); if (is_dir($dir) && $this->is_dir_empty($dir)) { - $error = my_rmdir($dir); - qemu_log("$domain","delete empty $dir $error"); + $result= my_rmdir($dir); + if ($result['type'] == "zfs") { + qemu_log("$domain","delete empty zfs $dir {$result['rtncode']}"); + if (isset($result['dataset'])) qemu_log("$domain","dataset {$result['dataset']} "); + if (isset($result['cmd'])) qemu_log("$domain","Command {$result['cmd']} "); + if (isset($result['output'])) { + $outputlogs = implode(" ",$result['output']); + qemu_log("$domain","Output $outputlogs end"); + } + } + else qemu_log("$domain","delete empty $dir {$result['rtncode']}"); } } diff --git a/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php b/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php index 58452f19e..54c0e3c15 100644 --- a/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php +++ b/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php @@ -317,6 +317,18 @@ } if ($usertemplate == 1) unset($arrConfig['domain']['uuid']); $xml2 = build_xml_templates($strXML); + #disable rename if snapshots exist + $snapshots = getvmsnapshots($arrConfig['domain']['name']) ; + if ($snapshots != null && count($snapshots) && !$boolNew) + { + $snaprenamehidden = ""; + $namedisable = "disabled"; + $snapcount = count($snapshots); + } else { + $snaprenamehidden = "hidden"; + $namedisable = ""; + $snapcount = "0"; + }; ?> @@ -336,10 +348,12 @@
| _(Name contains invalid characters or does not start with an alphanumberic for a ZFS storage location Only these special characters are valid Underscore (_) Hyphen (-) Colon (:) Period (.))_ | |||
|
+ id="snap-rename" class="orange-text"> _(Rename disabled, =$snapcount?> snapshot(s) exists.)_
+ _(Name contains invalid characters or does not start with an alphanumberic for a ZFS storage location Only these special characters are valid Underscore (_) Hyphen (-) Colon (:) Period (.))_ | |||
| _(Name)_: | -+ | type="text" name="domain[name]" id="domain_name" oninput="checkName(this.value)" class="textTemplate" title="_(Name of virtual machine)_" placeholder="_(e.g.)_ _(My Workstation)_" value="=htmlspecialchars($arrConfig['domain']['name'])?>" required /> |