Merge pull request #1457 from SimonFair/Disable-VM-Manager-Autostart

Create VM autostart disable option
This commit is contained in:
tom mortensen
2023-10-12 12:51:13 -07:00
committed by GitHub
3 changed files with 17 additions and 1 deletions

View File

@@ -1581,6 +1581,10 @@ Make sure any newly entered values represent the selected temperature unit.
Stopping the VM Manager will first attempt to shutdown all running VMs. After 60 seconds, any remaining VM instances will be terminated.
:end
:vms_disable_help:
Stop VMs from Autostarting when VM Manager starts.
:end
:vms_libvirt_volume_help:
This is the libvirt volume.
:end

View File

@@ -99,6 +99,14 @@ _(Enable VMs)_:
:vms_enable_help:
_(Disable Autostart VMs)_:
: <select id="DISABLE" name="DISABLE">
<?= mk_option(htmlspecialchars($domain_cfg['DISABLE']), 'no', _('No'))?>
<?= mk_option(htmlspecialchars($domain_cfg['DISABLE']), 'yes', _('Yes'))?>
</select>
:vms_disable_help:
<?if ($hardware):?>
<div class="advanced" markdown="1">
<?if ($libvirt_up):?>

View File

@@ -1,3 +1,7 @@
#!/bin/bash
source /boot/config/domain.cfg
if [ $DISABLE == "yes" ]
then
exit ;
fi
eval exec /usr/bin/qemu-system-x86_64 $(/usr/local/emhttp/plugins/dynamix.vm.manager/scripts/qemu.php "$@")