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] 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