From 03346f4709d5c82766c825e4d13b98913d178a94 Mon Sep 17 00:00:00 2001
From: SimonFair <39065407+SimonFair@users.noreply.github.com>
Date: Sat, 5 Oct 2024 07:57:19 +0100
Subject: [PATCH 1/4] Update virtiofsd.php
---
emhttp/plugins/dynamix.vm.manager/scripts/virtiofsd.php | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/emhttp/plugins/dynamix.vm.manager/scripts/virtiofsd.php b/emhttp/plugins/dynamix.vm.manager/scripts/virtiofsd.php
index 9d4945ab6..b19348cf8 100755
--- a/emhttp/plugins/dynamix.vm.manager/scripts/virtiofsd.php
+++ b/emhttp/plugins/dynamix.vm.manager/scripts/virtiofsd.php
@@ -27,7 +27,9 @@
}
# Check if options file exists. Each option should be on a new line.
if (is_file($file)) $options = explode("\n",file_get_contents($file)) ; else $options = ['--syslog','--inode-file-handles=mandatory','--announce-submounts'];
- $options[] = "--fd=".$argoptions['fd'];
+ if (isset($argoptions['fd'])) {
+ $options[] = "--fd=".$argoptions['fd'];
+}
if (isset($argoptions['o'])) {
$virtiofsoptions = explode(',',$argoptions["o"]);
From 9a502776a1c323b4fc8b994c26292d1f6eb24da3 Mon Sep 17 00:00:00 2001
From: SimonFair <39065407+SimonFair@users.noreply.github.com>
Date: Sun, 6 Oct 2024 11:17:19 +0100
Subject: [PATCH 2/4] Add virtio gu(2d) as an option of template.
---
emhttp/plugins/dynamix.vm.manager/include/VMMachines.php | 3 ++-
.../plugins/dynamix.vm.manager/include/libvirt_helpers.php | 3 ++-
emhttp/plugins/dynamix.vm.manager/sheets/VMMachines.css | 7 +++++++
3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/emhttp/plugins/dynamix.vm.manager/include/VMMachines.php b/emhttp/plugins/dynamix.vm.manager/include/VMMachines.php
index 846cbe874..6a3ad0e9c 100644
--- a/emhttp/plugins/dynamix.vm.manager/include/VMMachines.php
+++ b/emhttp/plugins/dynamix.vm.manager/include/VMMachines.php
@@ -273,7 +273,8 @@ foreach ($vms as $vm) {
if ($snap['parent'] == "" || $snap['parent'] == "Base") $j++;
$steps[$j] .= $snap['name'].';';
}
- echo "| ",_('Snapshots')," | | ",_('Date/Time')," | ",_('Type (Method)')," | ",_('Parent')," | ",_('Memory')," |
";
+ echo "
";
+ echo "| ",_('Snapshots')," | ",_('Description')," | ",_('Date/Time')," | ",_('Type (Method)')," | ",_('Parent')," | ",_('Memory')," |
";
echo "";
foreach ($steps as $stepsline) {
$snapshotlist = explode(";",$stepsline);
diff --git a/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php b/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php
index 59c77cbd2..b095cb8b1 100644
--- a/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php
+++ b/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php
@@ -1115,7 +1115,8 @@ private static $encoding = 'UTF-8';
$arrValidVNCModels = [
'cirrus' => 'Cirrus',
'qxl' => 'QXL (best)',
- 'vmvga' => 'vmvga'
+ 'vmvga' => 'vmvga',
+ 'virtio' => 'Virtio(2d)'
];
return $arrValidVNCModels;
diff --git a/emhttp/plugins/dynamix.vm.manager/sheets/VMMachines.css b/emhttp/plugins/dynamix.vm.manager/sheets/VMMachines.css
index 60eee293c..3d929863a 100644
--- a/emhttp/plugins/dynamix.vm.manager/sheets/VMMachines.css
+++ b/emhttp/plugins/dynamix.vm.manager/sheets/VMMachines.css
@@ -13,6 +13,13 @@ table.domdisk thead tr th:nth-child(1){padding-left:72px}
table.domdisk tbody tr td:nth-child(1){padding-left:72px}
table.domdisk tbody tr:nth-child(even){background-color:transparent!important}
table.domdisk tbody tr:nth-child(4n-1){background-color:transparent!important}
+table.snap thead tr th:nth-child(1){width:56%!important}
+table.snap thead tr th:nth-child(1){width:20%!important}
+table.snap thead tr th:nth-child(n+2){width:8%!important}
+table.snap thead tr th:nth-child(1){padding-left:72px}
+table.snap tbody tr td:nth-child(1){padding-left:72px}
+table.snap tbody tr:nth-child(even){background-color:transparent!important}
+table.snap tbody tr:nth-child(4n-1){background-color:transparent!important}
table.snapshot{margin-top:0}
table tbody td{line-height:normal}
i.mover{margin-right:8px;display:none}
From 082d7d842bc94259e0a7b0e592d21f901abeea2c Mon Sep 17 00:00:00 2001
From: SimonFair <39065407+SimonFair@users.noreply.github.com>
Date: Sun, 6 Oct 2024 11:26:34 +0100
Subject: [PATCH 3/4] Revert "Add virtio gu(2d) as an option of template."
This reverts commit 9a502776a1c323b4fc8b994c26292d1f6eb24da3.
---
emhttp/plugins/dynamix.vm.manager/include/VMMachines.php | 3 +--
.../plugins/dynamix.vm.manager/include/libvirt_helpers.php | 3 +--
emhttp/plugins/dynamix.vm.manager/sheets/VMMachines.css | 7 -------
3 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/emhttp/plugins/dynamix.vm.manager/include/VMMachines.php b/emhttp/plugins/dynamix.vm.manager/include/VMMachines.php
index 6a3ad0e9c..846cbe874 100644
--- a/emhttp/plugins/dynamix.vm.manager/include/VMMachines.php
+++ b/emhttp/plugins/dynamix.vm.manager/include/VMMachines.php
@@ -273,8 +273,7 @@ foreach ($vms as $vm) {
if ($snap['parent'] == "" || $snap['parent'] == "Base") $j++;
$steps[$j] .= $snap['name'].';';
}
- echo "";
- echo "| ",_('Snapshots')," | ",_('Description')," | ",_('Date/Time')," | ",_('Type (Method)')," | ",_('Parent')," | ",_('Memory')," |
";
+ echo "| ",_('Snapshots')," | | ",_('Date/Time')," | ",_('Type (Method)')," | ",_('Parent')," | ",_('Memory')," |
";
echo "";
foreach ($steps as $stepsline) {
$snapshotlist = explode(";",$stepsline);
diff --git a/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php b/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php
index b095cb8b1..59c77cbd2 100644
--- a/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php
+++ b/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php
@@ -1115,8 +1115,7 @@ private static $encoding = 'UTF-8';
$arrValidVNCModels = [
'cirrus' => 'Cirrus',
'qxl' => 'QXL (best)',
- 'vmvga' => 'vmvga',
- 'virtio' => 'Virtio(2d)'
+ 'vmvga' => 'vmvga'
];
return $arrValidVNCModels;
diff --git a/emhttp/plugins/dynamix.vm.manager/sheets/VMMachines.css b/emhttp/plugins/dynamix.vm.manager/sheets/VMMachines.css
index 3d929863a..60eee293c 100644
--- a/emhttp/plugins/dynamix.vm.manager/sheets/VMMachines.css
+++ b/emhttp/plugins/dynamix.vm.manager/sheets/VMMachines.css
@@ -13,13 +13,6 @@ table.domdisk thead tr th:nth-child(1){padding-left:72px}
table.domdisk tbody tr td:nth-child(1){padding-left:72px}
table.domdisk tbody tr:nth-child(even){background-color:transparent!important}
table.domdisk tbody tr:nth-child(4n-1){background-color:transparent!important}
-table.snap thead tr th:nth-child(1){width:56%!important}
-table.snap thead tr th:nth-child(1){width:20%!important}
-table.snap thead tr th:nth-child(n+2){width:8%!important}
-table.snap thead tr th:nth-child(1){padding-left:72px}
-table.snap tbody tr td:nth-child(1){padding-left:72px}
-table.snap tbody tr:nth-child(even){background-color:transparent!important}
-table.snap tbody tr:nth-child(4n-1){background-color:transparent!important}
table.snapshot{margin-top:0}
table tbody td{line-height:normal}
i.mover{margin-right:8px;display:none}
From ed7219d9c7683787386ceb697a032cd0f06e102a Mon Sep 17 00:00:00 2001
From: SimonFair <39065407+SimonFair@users.noreply.github.com>
Date: Sun, 6 Oct 2024 11:29:57 +0100
Subject: [PATCH 4/4] Add virtio gpu option.
---
emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php b/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php
index 59c77cbd2..afaa9c5d3 100644
--- a/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php
+++ b/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php
@@ -1115,6 +1115,7 @@ private static $encoding = 'UTF-8';
$arrValidVNCModels = [
'cirrus' => 'Cirrus',
'qxl' => 'QXL (best)',
+ 'virtio' => 'Virtio(2d)',
'vmvga' => 'vmvga'
];