diff --git a/emhttp/plugins/dynamix.vm.manager/include/libvirt.php b/emhttp/plugins/dynamix.vm.manager/include/libvirt.php index 702c29264..dfe4b6780 100644 --- a/emhttp/plugins/dynamix.vm.manager/include/libvirt.php +++ b/emhttp/plugins/dynamix.vm.manager/include/libvirt.php @@ -843,7 +843,8 @@ if ($gpu['multi'] == "on"){ $newgpu_bus = dechex(hexdec($gpu_bus) + 0x20) ; - $strSpecialAddress = "
" ; + if ($machine_type == "pc") $newgpu_slot = "0x01" ; else $newgpu_slot = "0x00" ; + $strSpecialAddress = "" ; $multidevices[$gpu_bus] = "0x$gpu_bus" ; } @@ -874,7 +875,8 @@ if ($audio_function != 0) { if (isset($multidevices[$audio_bus])) { $newaudio_bus = dechex(hexdec($audio_bus) + 0x20) ; - $strSpecialAddressAudio = "" ; + if ($machine_type == "pc") $newaudio_slot = "0x01" ; else $newaudio_slot = "0x00" ; + $strSpecialAddressAudio = "" ; } } @@ -904,7 +906,8 @@ if ($pci_function != 0) { if (isset($multidevices[$pci_bus])) { $newpci_bus = dechex(hexdec($pci_bus) + 0x20) ; - $strSpecialAddressOther = "" ; + if ($machine_type == "pc") $newpci_slot = "0x01" ; else $newpci_slot = "0x00" ; + $strSpecialAddressOther = "" ; } } diff --git a/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php b/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php index fce31ea18..7cf94223d 100644 --- a/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php +++ b/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php @@ -1448,6 +1448,23 @@ private static $encoding = 'UTF-8'; return json_encode($memorybacking); ; } + function getClocks($xml) { + $clocks = new SimpleXMLElement($xml); + $clocks = $clocks->clock ; + return json_encode($clocks); ; + } + + function getQEMUCmdLine($xml) { + $x = strpos($xml,"