Menu="OtherSettings"
Title="VM Manager"
Icon="dynamix.vm.manager.png"
Markdown="false"
---
require_once('/usr/local/emhttp/plugins/dynamix.vm.manager/classes/libvirt.php');
require_once('/usr/local/emhttp/plugins/dynamix.vm.manager/classes/libvirt_helpers.php');
// Check for Intel VT-x (vmx) or AMD-V (svm) cpu virtualzation support
// If either kvm_intel or kvm_amd are loaded then Intel VT-x (vmx) or AMD-V (svm) cpu virtualzation support was found
$strLoadedModules = shell_exec("lsmod | grep '^kvm_\(amd\|intel\)'");
if (empty($strLoadedModules)) {
// Attempt to load either of the kvm modules to see if virtualzation hw is supported
exec('modprobe -a kvm_intel kvm_amd 2>/dev/null');
$strLoadedModules = shell_exec("lsmod | grep '^kvm_\(amd\|intel\)'");
if (!empty($strLoadedModules)) {
exec('modprobe -r kvm_intel kvm_amd 2>/dev/null');
} else {
?>