Menu="OtherSettings" Title="VM Manager" Icon="icon-virtualization" Tag="columns" --- "._('Your hardware does not have Intel VT-x or AMD-V capability').". "._('This is required to create VMs in KVM').". "._('Please disable the VM function').". "; echo " "._('View the Docs for more information')."

"; } function scan($area, $text) { return strpos($area,$text)!==false; } function detect(&$bootcfg, $bootenv, $key) { if ($bootenv === 'syslinux') { $size = count($bootcfg); $menu = $i = 0; $value = ''; // find the default section while ($i < $size) { if (scan($bootcfg[$i],'label ')) { $n = $i + 1; // find the current requested setting while (!scan($bootcfg[$n],'label ') && $n < $size) { if (scan($bootcfg[$n],'menu default')) $menu = 1; if (scan($bootcfg[$n],'append')) foreach (explode(' ',$bootcfg[$n]) as $cmd) if (scan($cmd,$key)) {$value = explode('=',$cmd)[1]; break;} $n++; } if ($menu) break; else $i = $n - 1; } $i++; } } elseif ($bootenv === 'grub') { $menu_entries = []; // find the current boot entry foreach ($bootcfg as $line) { if (preg_match('/set default=(\d+)/', $line, $match)) { $bootentry = (int)$match[1]; break; } } // split boot entries foreach ($bootcfg as $line) { if (strpos($line, 'menuentry ') === 0) { $in_menuentry = true; $current_entry = $line . "\n"; } elseif ($in_menuentry) { $current_entry .= $line . "\n"; if (trim($line) === "}") { $menu_entries[] = $current_entry; $in_menuentry = false; } } } // search in selected menuentry $menuentry = explode("\n", $menu_entries[$bootentry]); foreach (explode(' ', $menu_entries[$bootentry]) as $cmd) { if (scan($cmd,$key)) { $value = explode('=',$cmd)[1]; break; } } } return trim($value); } if (is_file('/boot/syslinux/syslinux.cfg')) { $bootcfg = file('/boot/syslinux/syslinux.cfg',FILE_IGNORE_NEW_LINES+FILE_SKIP_EMPTY_LINES); $bootenv = 'syslinux'; } elseif (is_file('/boot/grub/grub.cfg')) { $bootcfg = file('/boot/grub/grub.cfg',FILE_IGNORE_NEW_LINES+FILE_SKIP_EMPTY_LINES); $bootenv = 'grub'; } $arrValidNetworks = getValidNetworks(); $pcie_acs_override = detect($bootcfg, $bootenv, 'pcie_acs_override'); $vfio_allow_unsafe = detect($bootcfg, $bootenv, 'allow_unsafe_interrupts'); $bgcolor = strstr('white,azure',$display['theme']) ? '#f2f2f2' : '#1c1c1c'; $started = $var['fsState']=='Started'; $libvirt_up = $libvirt_running=='yes'; $libvirt_log = file_exists("/var/log/libvirt/libvirtd.log"); ?>
_(Enable VMs)_: : _(One or more paths do not exist)_ (_(view)_) :vms_enable_help: _(Disable Autostart/Start option for VMs)_: : :vms_disable_help:
get_connect_information()?> _(Libvirt version)_: : _(QEMU version)_: : _(Libvirt storage location)_: : :vms_libvirt_volume_help: _(Libvirt vdisk size)_: : _(GB)_ :vms_libvirt_vdisk_size_help: _(Libvirt storage location)_: : _(Modify with caution: unable to validate path until Array is Started)_ _(Path does not exist)_ :vms_libvirt_location_help: _(Default VM storage path)_: : _(Modify with caution: unable to validate path until Array is Started)_ _(Path does not exist)_ :vms_libvirt_storage_help: _(Default ISO storage path)_: : _(Modify with caution: unable to validate path until Array is Started)_ _(Path does not exist)_ :vms_libvirt_iso_storage_help:
_(Default Windows VirtIO driver ISO)_ (_(optional)_): : placeholder="_(Click to Select)_" pattern="^[^\\]*\.(iso|ISO)$">  _(Remove)_ _(Download)_ :vms_virtio_driver_help:
_(Default network source)_: : :vms_network_source_help: _(Upon host shutdown)_: : :vms_host_shutdown_help: _(VM shutdown time-out)_: : (int)$var['shutdownTimeout']):?> _(exceeds Disk Shutdown)_ s _(time-out)_ (_(edit)_) :vms_shutdown_timeout_help: _(Console Options)_: : :vms_console_help: _(Show RDP menu option)_: : :vms_rdpopt_help: _(Show VM Usage)_: : :vms_usage_help: _(VM Usage refresh timer(seconds))_: : :vms_usage_timer_help: _(PCIe ACS override)_: : *_(Setting disabled in **safe mode**)_* :vms_acs_override_help: _(VFIO allow unsafe interrupts)_: : *_(Setting disabled in **safe mode**)_* :vms_vfio_interupts_help:
    :
:vms_libvirt_log_help:
_(Libvirt volume info)_
_(btrfs filesystem show)_: : ".shell_exec("btrfs filesystem show /etc/libvirt").""?>
_(btrfs scrub status)_: : ".implode("\n", $scrub_status).""?>   : :vms_scrub_help:   : :vms_cancel_help: