mirror of
https://github.com/unraid/webgui.git
synced 2026-05-08 05:12:14 -05:00
VM manager: fix increasing vdisk size
This commit is contained in:
@@ -56,7 +56,7 @@ if ($_GET['refresh']) {
|
||||
if ($subaction) {
|
||||
$vm = $lv->domain_get_name_by_uuid($uuid);
|
||||
if ($subaction == 'disk-resize') {
|
||||
$capacity = str_replace(["KB","MB","GB","TB","PB"," ",","], ["K","M","G","T","P","",""], strtoupper($_POST['cap']));
|
||||
$capacity = str_replace(["KB","MB","GB","TB","PB"," ",","], ["K","M","G","T","P","",""], strtoupper($_GET['cap']));
|
||||
$oldcap = str_replace(["KB","MB","GB","TB","PB"," ",","], ["K","M","G","T","P","",""], strtoupper($_GET['oldcap']));
|
||||
if (substr($oldcap,0,-1) < substr($capacity,0,-1)){
|
||||
shell_exec("qemu-img resize -q ".escapeshellarg($_GET['disk'])." ".escapeshellarg($capacity));
|
||||
|
||||
Reference in New Issue
Block a user