webGui: add vm shutdown time-out option

This commit is contained in:
Eric Schultz
2016-11-24 10:30:59 -06:00
parent 6a8a449aac
commit e7949fde51
2 changed files with 16 additions and 0 deletions
@@ -228,6 +228,19 @@ foreach ($arrSyslinuxCfg as &$strSyslinuxCfg) {
<p>More optional selections are present when virtual bridges are created under network settings.</p>
<p>NOTE: You can also specify a network bridge on a per-VM basis.</p>
</blockquote>
<dl>
<dt>VM shutdown time-out:</dt>
<dd>
<input type="number" name="TIMEOUT" value="<?=$domain_cfg['TIMEOUT']?>" class="narrow">
<?if (!empty($var['shutdownTimeout']) && !empty($domain_cfg['TIMEOUT']) && (int)$domain_cfg['TIMEOUT'] > (int)$var['shutdownTimeout']):?>
<span id="arraystopped"><i class="fa fa-warning icon warning"></i> exceeds Disk Shutdown <?=$var['shutdownTimeout']?>s time-out (<a href="/Settings/DiskSettings">edit</a>)</span>
<?endif;?>
</dd>
</dl>
<blockquote class="inline_help">
<p>When shutting down the server, this defines how long to wait in seconds for <em>graceful</em> VM shutdown before forcing shutdown to continue.</p>
<p>NOTE: It's recommended to shut down guest VMs from within the VM.</p>
</blockquote>
<dl>
<dt>Enable PCIe ACS Override:</dt>
<dd>
@@ -466,6 +466,9 @@
if (!empty($domain_cfg['MEDIADIR'])) {
$domain_cfg['MEDIADIR'] = rtrim($domain_cfg['MEDIADIR'], '/') . '/';
}
if (empty($domain_cfg['TIMEOUT'])) {
$domain_cfg['TIMEOUT'] = 60;
}
$domain_bridge = (!($domain_cfg['BRNAME'])) ? 'virbr0' : $domain_cfg['BRNAME'];
$msg = (empty($domain_bridge)) ? "Error: Setup Bridge in Settings/Network Settings" : false;