mirror of
https://github.com/unraid/webgui.git
synced 2026-04-23 18:48:49 -05:00
Changed logic of checking for VM capability in Info page.
This gets rid of extraneous syslog message: Feb 21 14:43:33 develop64 kernel: kvm: already loaded the other module
This commit is contained in:
@@ -69,11 +69,16 @@ if (strpos($cpumodel,'@')===false) {
|
||||
<div><span style="width:90px; display:inline-block"><strong>HVM:</strong></span>
|
||||
<?
|
||||
// Check for Intel VT-x (vmx) or AMD-V (svm) cpu virtualzation support
|
||||
// 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');
|
||||
|
||||
// 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');
|
||||
}
|
||||
}
|
||||
|
||||
// Check for Intel VT-x (vmx) or AMD-V (svm) cpu virtualzation support
|
||||
$strCPUInfo = file_get_contents('/proc/cpuinfo');
|
||||
|
||||
Reference in New Issue
Block a user