diff --git a/emhttp/plugins/dynamix.vm.manager/VMMachines.page b/emhttp/plugins/dynamix.vm.manager/VMMachines.page index aacae9398..e425dd086 100644 --- a/emhttp/plugins/dynamix.vm.manager/VMMachines.page +++ b/emhttp/plugins/dynamix.vm.manager/VMMachines.page @@ -507,6 +507,7 @@ $(function() {
_(VM Name)_:
_(Snapshot Name)_:
+_(Snapshot Method)_:
_(Remove Images)_:
_(Remove Meta)_:
diff --git a/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php b/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php index 0f28aaa8a..61feb45ad 100644 --- a/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php +++ b/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php @@ -1621,7 +1621,6 @@ private static $encoding = 'UTF-8'; $dom = $lv->domain_get_info($res); $state = $lv->domain_state_translate($dom['state']); $vmxml = $lv->domain_get_xml($res) ; - file_put_contents("/tmp/cloningxml" ,$vmxml) ; ## Remove before stable. $storage = $lv->_get_single_xpath_result($vm, '//domain/metadata/*[local-name()=\'vmtemplate\']/@storage'); if (empty($storage)) $storage = "default" ; # if VM running shutdown. Record was running. @@ -1709,7 +1708,6 @@ private static $encoding = 'UTF-8'; write("addLog\0".htmlspecialchars("Creating new XML $clone")); $xml = $lv->config_to_xml($config, true) ; - file_put_contents("/tmp/clonexml" ,$xml) ; ## Remove before stable. $rtn = $lv->domain_define($xml) ; return($rtn) ; @@ -1934,7 +1932,6 @@ private static $encoding = 'UTF-8'; if (!empty($lv->domain_get_ovmf($res))) $nvram = $lv->nvram_create_snapshot($lv->domain_get_uuid($vm),$name) ; $xmlfile = $dirpath."/".$name.".running" ; - file_put_contents("/tmp/xmltst", "$xmlfile" ) ;## Remove before stable. if ($state == "running") exec("virsh dumpxml '$vm' > ".escapeshellarg($xmlfile),$outxml,$rtnxml) ; $output= [] ; @@ -2017,7 +2014,6 @@ private static $encoding = 'UTF-8'; if ($method == "ZFS") $xml = $snapslist[$snap]['xml']; else $xml = custom::createXML('domain',$xmlobj)->saveXML(); if (!strpos($xml,'domain_define($xml); - file_put_contents("/tmp/xmlrevert", "$xml" ) ;## Remove before stable. if ($new) $arrResponse = ['success' => true] ; else $arrResponse = ['error' => $lv->get_last_error()] ; } @@ -2028,15 +2024,13 @@ private static $encoding = 'UTF-8'; if ($diskname == "hda" || $diskname == "hdb") continue ; $path = $disk["source"]["@attributes"]["file"] ; if (is_file($path) && $action == "yes") if (!$dryrun) unlink("$path") ;else echo "unlink $path\n"; - file_put_contents("/tmp/rmvsnaps",$path,FILE_APPEND); $item = array_search($path,$snapslist[$snap]['backing']["r".$diskname]) ; $item++ ; while($item > 0) { if (!isset($snapslist[$snap]['backing']["r".$diskname][$item])) break ; $newpath = $snapslist[$snap]['backing']["r".$diskname][$item] ; - file_put_contents("/tmp/rmvsnaps",$newpath,FILE_APPEND); - if (is_file($newpath) && $action == "yes") if (!$dryrun) unlink("$newpath"); else echo "unlink $newpath\n"; + if (is_file($newpath) && $action == "yes") if (!$dryrun) unlink("$newpath"); else echo "unlink $newpath\n"; $item++ ; } } @@ -2102,7 +2096,6 @@ private static $encoding = 'UTF-8'; $xmlobj = custom::createArray('domain',$xml) ; $xml = custom::createXML('domain',$xmlobj)->saveXML(); if (!strpos($xml,'domain_define($xml) ; diff --git a/emhttp/plugins/dynamix/nchan/vm_dashusage b/emhttp/plugins/dynamix/nchan/vm_dashusage index adda168a4..57a506c32 100755 --- a/emhttp/plugins/dynamix/nchan/vm_dashusage +++ b/emhttp/plugins/dynamix/nchan/vm_dashusage @@ -78,7 +78,6 @@ while (true) { } $echo = json_encode($echo); - file_put_contents("/tmp/vm_dashusage", $echo); $md5_new = md5($echo,true); if ($md5_new !== $md5_old) { $md5_old = publish('vm_dashusage',$echo)!==false ? $md5_new : -1;