From cd3bdde29335e115dc90318deecc5e2e424c66b5 Mon Sep 17 00:00:00 2001 From: SimonFair <39065407+SimonFair@users.noreply.github.com> Date: Sat, 10 Sep 2022 16:39:20 +0100 Subject: [PATCH] Fix no cdrom boot order and update ELEC templates to set boot order = 1 --- plugins/dynamix.vm.manager/include/libvirt.php | 7 ++++++- plugins/dynamix.vm.manager/templates/LibreELEC.form.php | 4 +++- plugins/dynamix.vm.manager/templates/OpenELEC.form.php | 4 +++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/plugins/dynamix.vm.manager/include/libvirt.php b/plugins/dynamix.vm.manager/include/libvirt.php index f51c793ad..6143cd7c0 100644 --- a/plugins/dynamix.vm.manager/include/libvirt.php +++ b/plugins/dynamix.vm.manager/include/libvirt.php @@ -245,6 +245,9 @@ if (!empty($disk['bus'])) { $arrReturn['bus'] = $disk['bus']; } + if (!empty($disk['boot'])) { + $arrReturn['boot'] = $disk['boot']; + } } } @@ -474,7 +477,9 @@ if ($media['cdrombus'] == 'scsi') { $needSCSIController = true; } - $mediaboot = "" ; + if ($cdromboot > 0) { + $mediaboot = "" ; + } $mediastr = " diff --git a/plugins/dynamix.vm.manager/templates/LibreELEC.form.php b/plugins/dynamix.vm.manager/templates/LibreELEC.form.php index 6f9b5eed6..8361095bd 100644 --- a/plugins/dynamix.vm.manager/templates/LibreELEC.form.php +++ b/plugins/dynamix.vm.manager/templates/LibreELEC.form.php @@ -230,7 +230,8 @@ 'size' => '', 'driver' => 'raw', 'dev' => 'hda', - 'readonly' => 1 + 'readonly' => 1, + 'boot' => 1 ] ], 'gpu' => [ @@ -440,6 +441,7 @@ $hdrXML = "\n"; // XML encoding declaratio +
diff --git a/plugins/dynamix.vm.manager/templates/OpenELEC.form.php b/plugins/dynamix.vm.manager/templates/OpenELEC.form.php index 4895d6ba7..a470d0228 100644 --- a/plugins/dynamix.vm.manager/templates/OpenELEC.form.php +++ b/plugins/dynamix.vm.manager/templates/OpenELEC.form.php @@ -230,7 +230,8 @@ 'size' => '', 'driver' => 'raw', 'dev' => 'hda', - 'readonly' => 1 + 'readonly' => 1, + 'boot' => 1 ] ], 'gpu' => [ @@ -440,6 +441,7 @@ $hdrXML = "\n"; // XML encoding declaratio +