mirror of
https://github.com/unraid/webgui.git
synced 2026-05-01 07:19:32 -05:00
Add QEMU arg Support
This commit is contained in:
@@ -1300,7 +1300,9 @@ private static $encoding = 'UTF-8';
|
||||
'pci' => $arrOtherDevices,
|
||||
'nic' => $arrNICs,
|
||||
'usb' => $arrUSBDevs,
|
||||
'shares' => $lv->domain_get_mount_filesystems($res)
|
||||
'shares' => $lv->domain_get_mount_filesystems($res),
|
||||
'qemucmdline' => getQEMUCmdLine($strDOMXML),
|
||||
'clocks' => getClocks($strDOMXML)
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1447,6 +1449,23 @@ private static $encoding = 'UTF-8';
|
||||
$memorybacking = $memoryBacking->memoryBacking ;
|
||||
return json_encode($memorybacking); ;
|
||||
}
|
||||
function getClocks($xml) {
|
||||
$clocks = new SimpleXMLElement($xml);
|
||||
$clocks = $clocks->clock ;
|
||||
return json_encode($clocks); ;
|
||||
}
|
||||
|
||||
function getQEMUCmdLine($xml) {
|
||||
$x = strpos($xml,"<qemu:commandline>", 0) ;
|
||||
if ($x === false) return null ;
|
||||
$y = strpos($xml,"</qemu:commandline>", 0) ;
|
||||
$z=$y ;
|
||||
while ($y!=false) {
|
||||
$y = strpos($xml,"<qemu:commandline>", $z +19) ;
|
||||
if ($y != false) $z =$y ;
|
||||
}
|
||||
return substr($xml,$x, ($z + 19) -$x) ;
|
||||
}
|
||||
|
||||
function getchannels($res) {
|
||||
global $lv ;
|
||||
|
||||
Reference in New Issue
Block a user