From 7d9f6e4a382d99e01b07ba91734a34b42f6bedef Mon Sep 17 00:00:00 2001 From: SimonFair <39065407+SimonFair@users.noreply.github.com> Date: Wed, 15 Oct 2025 12:54:35 +0100 Subject: [PATCH 1/3] Fix: set cd bus to sata for Win 11 --- .../include/libvirt_helpers.php | 4 ++++ .../dynamix.vm.manager/templates/Custom.form.php | 16 ++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php b/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php index 15e5378c9..379ff8628 100644 --- a/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php +++ b/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php @@ -200,6 +200,10 @@ class Array2XML { 'vcpus' => 2, 'vcpu' => [0,1], ], + 'media' => [ + 'cdrombus' => 'sata', + 'driversbus' => 'sata' , + ], 'disk' => [ [ 'size' => '64G' diff --git a/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php b/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php index c5eb5b66e..bb6c0667e 100644 --- a/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php +++ b/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php @@ -2491,14 +2491,14 @@ $(function() { } }); - $("#vmform #domain_machine").change(function changeMachineEvent(){ - // Cdrom Bus: select IDE for i440 and SATA for q35 - if ($(this).val().indexOf('i440fx') != -1) { - $('#vmform .cdrom_bus').val('ide'); - } else { - $('#vmform .cdrom_bus').val('sata'); - } - }); +// $("#vmform #domain_machine").change(function changeMachineEvent(){ +// // Cdrom Bus: select IDE for i440 and SATA for q35 +// if ($(this).val().indexOf('i440fx') != -1) { +// $('#vmform .cdrom_bus').val('ide'); +// } else { +// $('#vmform .cdrom_bus').val('sata'); +// } +// }); $("#vmform #domain_ovmf").change(function changeBIOSEvent(){ // using OVMF - disable vmvga vnc option From ca917c94cba094874b92f346ea9ad0de4562af6a Mon Sep 17 00:00:00 2001 From: SimonFair <39065407+SimonFair@users.noreply.github.com> Date: Wed, 15 Oct 2025 16:25:43 +0100 Subject: [PATCH 2/3] remove code no longer required. --- .../plugins/dynamix.vm.manager/templates/Custom.form.php | 9 --------- 1 file changed, 9 deletions(-) diff --git a/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php b/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php index bb6c0667e..899629d90 100644 --- a/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php +++ b/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php @@ -2491,15 +2491,6 @@ $(function() { } }); -// $("#vmform #domain_machine").change(function changeMachineEvent(){ -// // Cdrom Bus: select IDE for i440 and SATA for q35 -// if ($(this).val().indexOf('i440fx') != -1) { -// $('#vmform .cdrom_bus').val('ide'); -// } else { -// $('#vmform .cdrom_bus').val('sata'); -// } -// }); - $("#vmform #domain_ovmf").change(function changeBIOSEvent(){ // using OVMF - disable vmvga vnc option if ($(this).val() != '0' && $("#vmform #vncmodel").val() == 'vmvga') { From 0420111f92fe0a3f416472f921b02048a3b51e9f Mon Sep 17 00:00:00 2001 From: SimonFair <39065407+SimonFair@users.noreply.github.com> Date: Wed, 15 Oct 2025 17:04:19 +0100 Subject: [PATCH 3/3] Revert mk_options change. --- emhttp/plugins/dynamix/include/Helpers.php | 1 - 1 file changed, 1 deletion(-) diff --git a/emhttp/plugins/dynamix/include/Helpers.php b/emhttp/plugins/dynamix/include/Helpers.php index 5c3dfacc5..61a84cab9 100644 --- a/emhttp/plugins/dynamix/include/Helpers.php +++ b/emhttp/plugins/dynamix/include/Helpers.php @@ -180,7 +180,6 @@ function my_error($code) { } function mk_option($select, $value, $text, $extra="") { - $text = htmlspecialchars($text); return ""; }