2017年11月2日 星期四

CRITICAL_STRUCTURE_CORRUPTION on a VMWare virtual machine

From source: https://support.microsoft.com/en-us/help/2902739/stop-error-0x109-critical-structure-corruption-on-a-vmware-virtual-mac


Stop error 0x109: CRITICAL_STRUCTURE_CORRUPTION on a VMWare virtual machine

Symptoms

On a Windows Server Virtual Machine that is running VMWare ESXi 5.0.x, you receive a "CRITICAL_STRUCTURE_CORRUPTION" Stop error code that begins as follows:
Bugcheck code 00000109
Arguments a3a01f58`92797517 b3b72bde`e4f976b6 00000000`c0000103 00000000`00000007

Cause

This problem occurs because the system detects a Critical MSR modification, and then it crashes.

Resolution

To resolve this problem, go to the following VMWare website:
This is a known issue that affects ESXi 5.0.x. For more information, contact VMWare.

To work around this issue, manually create a CPUID mask for the affected virtual machines. To do this, follow these steps:
1.      Turn off the virtual machine.
2.      Right-click the virtual machine, and then click Edit Settings.
3.      Click the Options tab.
4.      Under Advanced, click CPUID Mask.
5.      Click Advanced.
6.      In the Register column, locate the edx register under Level 80000001.
7.      In the Value field, enter the following character string exactly:

----:0---:----:----:----:----:----:----
8.      Click OK two times.
The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, about the performance or reliability of these products.

More Information

0: kd> .bugcheck
Bugcheck code 00000109
Arguments a3a01f58`92797517 b3b72bde`e4f976b6 00000000`c0000103 00000000`00000007
0: kd> !sysinfo machineid
Machine ID Information [From Smbios 2.4, DMIVersion 0, Size=10150]
BiosMajorRelease = 4
BiosMinorRelease = 6
FirmwareMajorRelease = 0
FirmwareMinorRelease = 0
BiosVendor = Phoenix Technologies LTD
BiosVersion = 6.00
BiosReleaseDate = 07/09/2012
SystemManufacturer = VMware, Inc.
SystemProductName = VMware Virtual Platform
SystemVersion = None
BaseBoardManufacturer = Intel Corporation
BaseBoardProduct = 440BX Desktop Reference Platform
BaseBoardVersion = None
CRITICAL_STRUCTURE_CORRUPTION (109)

This Stop error is generated when the kernel detects that critical kernel code or data has been corrupted. Typically, any of the following situations can cause this corruption:
·        A driver inadvertently or deliberately modified critical kernel code or data. For more information, see Kernel patch protection for x64-based operating systems.
·        A developer tried to set a standard kernel breakpoint by using a kernel debugger that was not attached when the system was started. Standard breakpoints (bp) can be set only if the debugger is attached at startup. Processor breakpoints (ba) can be set at any time.
·        A hardware corruption occurred. For example, the kernel code or data might have been stored in memory that failed.

Arguments:
Arg1: a3a01f5892797517, Reserved
Arg2: b3b72bdee4f976b6, Reserved
Arg3: 00000000c0000103, Failure type-dependent information
Arg4: 0000000000000007, Type of corrupted region, can be 7: Critical MSR modification
Properties
Article ID: 2902739 - Last Review: Jan 31, 2014 - Revision: 1

2017年1月30日 星期一

關掉或開啟 selinux

原文 http://blog.xuite.net/tolarku/blog/195633562-CentOS+%E9%97%9C%E9%96%89+selinux
 
==暫時性的關掉或開啟 selinux==
$ getenforce
Enforcing
$ sudo setenforce 0
$ getenforce
Permissive
$ sudo setenforce 1
$ getenforce
Enforcing

==永久性的關掉 selinux==
 $ sudo vi /etc/sysconfig/selinux    
找到
SELINUX=enforcing
然後修改為
SELINUX=disabled
要重新開機 reboot / restart 後才會套用
 

==httpd 403 forbidden 錯誤
因為有使用 selinux 而你新增了一些檔案或目錄到「網頁目錄 /var/www/html」,明明檔案就存在,卻無法正常從瀏覽器觀看,這不是 file permission chmod 的問題,是 selinux 檔案 http 存取權限的問題,需要用
sudo restorecon -R -v /var/www/html/new_folder

CentOS 7 關閉防火牆及 SELinux

轉貼原文 https://www.phpini.com/linux/centos-7-disable-firewalld-selinux

CentOS 7 的 SELinux 及 Firewalld 防火牆都是安全相關的套件, RHEL 及 CentOS 均預設開啟, 但如果在開發或測試的機器上, 將它們關閉對除錯方便不少。
關閉 SELinux:
開啟檔案 /etc/selinux/config:
# vi /etc/selinux/config
找到以下一行:
SELINUX=enforce
改成:
SELINUX=disabled
另外將 “SELINUXTYPE=targeted” 加上註釋, 改成這樣:
# SELINUXTYPE=targeted
儲存後離開編輯器, 需要重新開機設定才會生效。
要檢查 SELinux 的狀態, 執行 sestatus 指令便可以看到:
# sestatus
關閉 Firewalld 防火牆:
關閉 Firewalld 防火牆指令:
# systemctl stop firewalld.service
設定下次開機不會啟動 Firewalld 防火牆
# systemctl disable firewalld.service