@@ -725,6 +741,7 @@
if (strpos($domain_cfg['DOMAINDIR'], dirname(dirname($arrDisk['new']))) === false ||
basename(dirname($arrDisk['new'])) != $arrConfig['domain']['name'] || (
basename($arrDisk['new']) != 'vdisk'.($i+1).'.img') && basename($arrDisk['new']) != 'vdisk'.($i+1).'.qcow2') {
+ if ($arrDisk['driver'] == "qcow2" && (basename($arrDisk['new']) == 'vdisk'.($i+1).'.qcow2')) $default_option = "auto"; else
$default_option = 'manual';
}
if (file_exists(dirname(dirname($arrDisk['new'])).'/'.$arrConfig['domain']['name'].'/vdisk'.($i+1).'.img') || file_exists(dirname(dirname($arrDisk['new'])).'/'.$arrConfig['domain']['name'].'/vdisk'.($i+1).'.qcow2')) {
@@ -784,6 +801,7 @@
?>
+
|
@@ -1003,6 +1021,7 @@
mk_dropdown_options($arrUnraidShares, $arrUnraidIndex);?>
+
|
@@ -1124,6 +1143,13 @@
?>
+
+ if ($arrGPU['id'] == 'virtual') {
+ ?>
+ |
+ } else {?>
+ |
+ }?>
+
|
@@ -1340,6 +1367,7 @@
|
+
|
| _(Network Source)_: |
@@ -1457,7 +1485,7 @@
| _(USB Devices)_: |
- |
+ |
@@ -1489,7 +1518,7 @@
| _(Other PCI Devices)_: |
- |
+
@@ -1561,7 +1592,7 @@
if ($arrConfig['qemucmdline'] == "") $qemurows = 2 ; else $qemurows = 15 ;
?>
|
- |
+
@@ -1583,6 +1614,7 @@
?>
+ | | |
$clockcount = 0 ;
if (!empty($arrClocks)) {
@@ -1646,6 +1678,8 @@
?>
+ | | |
+
| _(Grab)_: |
@@ -1779,6 +1813,19 @@
Click Create to generate the vDisks and return to the Virtual Machines page where your new VM will be created.
}?>
+
+
+
+
+ | _(Other XML)_: |
+
+ if ($arrConfig['qemucmdline'] == "") $qemurows = 2 ; else $qemurows = 15 ;
+ ?>
+
+ |
+
+
+
diff --git a/emhttp/plugins/dynamix.vm.manager/templates/Custom.formXML.php b/emhttp/plugins/dynamix.vm.manager/templates/Custom.formold.php
similarity index 94%
rename from emhttp/plugins/dynamix.vm.manager/templates/Custom.formXML.php
rename to emhttp/plugins/dynamix.vm.manager/templates/Custom.formold.php
index 03960f640..7fec53f24 100644
--- a/emhttp/plugins/dynamix.vm.manager/templates/Custom.formXML.php
+++ b/emhttp/plugins/dynamix.vm.manager/templates/Custom.formold.php
@@ -97,7 +97,7 @@
'protocol' => 'vnc',
'autoport' => 'yes',
'model' => 'qxl',
- 'keymap' => 'en-us',
+ 'keymap' => 'none',
'port' => -1 ,
'wsport' => -1,
'copypaste' => 'no'
@@ -291,12 +291,6 @@
$boolNew = true;
$arrConfig = $arrConfigDefaults;
$arrVMUSBs = getVMUSBs($strXML) ;
- $strXML = $lv->config_to_xml($arrConfig);
- $domXML = new DOMDocument();
- $domXML->preserveWhiteSpace = false;
- $domXML->formatOutput = true;
- $domXML->loadXML($strXML);
- $strXML= $domXML->saveXML();
}
// Add any custom metadata field defaults (e.g. os)
if (!$arrConfig['template']['os']) {
@@ -309,8 +303,11 @@
} else $arrClocks = $arrDefaultClocks['other'] ;
}
- if (strpos($arrConfig['template']['name'],"User-") !== false) $arrConfig['template']['name'] = str_replace("User-","",$arrConfig['template']['name']);
- $xml2 = build_xml_templates($strXML);
+ if (strpos($arrConfig['template']['name'],"User-") !== false) {
+ $arrConfig['template']['name'] = str_replace("User-","",$arrConfig['template']['name']);
+ unset($arrConfig['domain']['uuid']);
+ }
+ if ($usertemplate == 1) unset($arrConfig['domain']['uuid']);
?>
@@ -333,7 +330,6 @@
| _(Name)_: |
|
- |
@@ -344,7 +340,6 @@
| _(Description)_: |
|
- |
@@ -434,7 +429,6 @@
?>
-
|
@@ -477,7 +471,6 @@
?>
- |
@@ -514,7 +507,6 @@
?>
- |
@@ -542,7 +534,6 @@
-
|
@@ -661,7 +652,6 @@
|
-
|
| _(OS Install CDRom Bus)_: |
@@ -697,7 +687,6 @@
- |
@@ -737,7 +726,6 @@
if (strpos($domain_cfg['DOMAINDIR'], dirname(dirname($arrDisk['new']))) === false ||
basename(dirname($arrDisk['new'])) != $arrConfig['domain']['name'] || (
basename($arrDisk['new']) != 'vdisk'.($i+1).'.img') && basename($arrDisk['new']) != 'vdisk'.($i+1).'.qcow2') {
- if ($arrDisk['driver'] == "qcow2" && (basename($arrDisk['new']) == 'vdisk'.($i+1).'.qcow2')) $default_option = "auto"; else
$default_option = 'manual';
}
if (file_exists(dirname(dirname($arrDisk['new'])).'/'.$arrConfig['domain']['name'].'/vdisk'.($i+1).'.img') || file_exists(dirname(dirname($arrDisk['new'])).'/'.$arrConfig['domain']['name'].'/vdisk'.($i+1).'.qcow2')) {
@@ -797,7 +785,6 @@
?>
-
|
@@ -1017,7 +1004,6 @@
mk_dropdown_options($arrUnraidShares, $arrUnraidIndex);?>
-
|
@@ -1139,13 +1125,6 @@
?>
-
- if ($arrGPU['id'] == 'virtual') {
- ?>
- |
- } else {?>
- |
- }?>
-
|
@@ -1363,7 +1341,6 @@
|
-
|
| _(Network Source)_: |
@@ -1481,7 +1458,7 @@
| _(USB Devices)_: |
- | |
+
@@ -1514,7 +1490,7 @@
| _(Other PCI Devices)_: |
- |
-
@@ -1588,7 +1562,7 @@
if ($arrConfig['qemucmdline'] == "") $qemurows = 2 ; else $qemurows = 15 ;
?>
|
- |
+
@@ -1610,7 +1584,6 @@
?>
- | | |
$clockcount = 0 ;
if (!empty($arrClocks)) {
@@ -1658,6 +1631,133 @@
Windows and Hyperv Hpet:no Hypervclock: yes Pit no rtc no.
+
+ if (!isset($arrConfig['evdev'])) $arrConfig['evdev'][0] = ['dev'=>"",'grab'=>"",'repeat'=>"",'grabToggle'=>""];
+ foreach ($arrConfig['evdev'] as $i => $arrEvdev) {
+ $strLabel = ($i > 0) ? appendOrdinalSuffix($i + 1) : '';
+ ?>
+
+
+ | _(Evdev Device)_: |
+
+
+ |
+
+
+ | _(Grab)_: |
+
+
+ |
+
+
+
+ | _(Repeat)_: |
+
+
+ |
+
+
+
+ | _(Grab Toggle)_: |
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Event Devices
+ Evdev is an input interface built into the Linux kernel. QEMU’s evdev passthrough support allows a user to redirect evdev events to a guest. These events can include mouse movements and key presses. By hitting both Ctrl keys at the same time, QEMU can toggle the input recipient. QEMU’s evdev passthrough also features almost no latency, making it perfect for gaming. The main downside to evdev passthrough is the lack of button rebinding – and in some cases, macro keys won’t even work at all.
+ Optional items are normally only used for keyboards.
+
+
+ Device
+ Host device to passthrough to guest.
+
+
+
+ Grab
+ All grabs all input devices instead of just one
+
+
+
+ Repeat
+ Repeat with value 'on'/'off' to enable/disable auto-repeat events
+
+
+
+ GrabToggle
+ GrabToggle with values ctrl-ctrl, alt-alt, shift-shift, meta-meta, scrolllock or ctrl-scrolllock to change the grab key combination
+
+ Additional devices can be added/removed by clicking the symbols to the left.
+
+
+ }?>
+ }?>
+
+
@@ -1680,19 +1780,6 @@
Click Create to generate the vDisks and return to the Virtual Machines page where your new VM will be created.
}?>
-
-
-
-
- | _(Other XML)_: |
-
- if ($arrConfig['qemucmdline'] == "") $qemurows = 2 ; else $qemurows = 15 ;
- ?>
-
- |
-
-
-
@@ -1957,8 +2044,8 @@ $(function() {
$('.advancedview').change(function () {
if ($(this).is(':checked')) {
setTimeout(function() {
- var xmlPanelHeight = window.outerHeight - 550;
- if (xmlPanelHeight < 0) xmlPanelHeight = null;
+ var xmlPanelHeight = window.outerHeight;
+ if (xmlPanelHeight > 1024) xmlPanelHeight = xmlPanelHeight-550;
editor.setSize(null,xmlPanelHeight);
editor.refresh();
}, 100);
@@ -2468,7 +2555,8 @@ $(function() {
$('#vmform #domain_clock').val('localtime');
$("#vmform #domain_machine option").each(function(){
if ($(this).val().indexOf('i440fx') != -1) {
- $('#vmform #domain_machine').val($(this).val()).change();
+ var usertemplate = =$usertemplate?>;
+ if (usertemplate = 0) $('#vmform #domain_machine').val($(this).val()).change();
return false;
}
});
@@ -2477,7 +2565,8 @@ $(function() {
$('#vmform #clockoffset').val('utc');
$("#vmform #domain_machine option").each(function(){
if ($(this).val().indexOf('q35') != -1) {
- $('#vmform #domain_machine').val($(this).val()).change();
+ var usertemplate = =$usertemplate?>;
+ if (usertemplate = 0) $('#vmform #domain_machine').val($(this).val()).change();
return false;
}
});