mirror of
https://github.com/unraid/webgui.git
synced 2026-01-05 00:59:48 -06:00
Fix for snapshot removal if active volume and vm has spaces in name.
This commit is contained in:
@@ -1647,7 +1647,9 @@ private static $encoding = 'UTF-8';
|
||||
If option to edit, show VMUpdate
|
||||
*/
|
||||
$snaps = getvmsnapshots($vm);
|
||||
if (count($snaps) ) {write("addLog\0".htmlspecialchars(_("Clone of VM not currently supported if it has snapshots"))); $arrResponse = ['error' => _("Clone of VM not currently supported if it has snapshots")]; return false ;}
|
||||
if (is_array($snaps)) {
|
||||
if (count($snaps) ) {write("addLog\0".htmlspecialchars(_("Clone of VM not currently supported if it has snapshots"))); $arrResponse = ['error' => _("Clone of VM not currently supported if it has snapshots")]; return false ;}
|
||||
}
|
||||
$uuid = $lv->domain_get_uuid($clone) ;
|
||||
write("addLog\0".htmlspecialchars(_("Checking if clone exists")));
|
||||
if ($uuid) { $arrResponse = ['error' => _("Clone VM name already inuse")]; return false ;}
|
||||
@@ -2251,7 +2253,7 @@ private static $encoding = 'UTF-8';
|
||||
foreach($disks as $disk) {
|
||||
$file = $disk["file"] ;
|
||||
$output = array() ;
|
||||
exec("qemu-img info --backing-chain -U $file | grep image:",$output) ;
|
||||
exec("qemu-img info --backing-chain -U \"$file\" | grep image:",$output) ;
|
||||
foreach($output as $key => $line) {
|
||||
$line=str_replace("image: ","",$line) ;
|
||||
$output[$key] = $line ;
|
||||
|
||||
Reference in New Issue
Block a user