Skip to content

Commit

Permalink
update site at 20240703-102518, machine LiaoSirui-MacMini.local
Browse files Browse the repository at this point in the history
  • Loading branch information
LiaoSirui committed Jul 3, 2024
1 parent 304a84a commit 1350514
Show file tree
Hide file tree
Showing 4 changed files with 141 additions and 8 deletions.
3 changes: 3 additions & 0 deletions 虚拟化技术/vmware/ESXi/ESXi调优.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- 更改电源策略

选择【管理】-【硬件】-【电源管理】-【更改策略】- 高性能
64 changes: 64 additions & 0 deletions 虚拟化技术/vmware/ESXi/ESXi镜像制作.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
## 制作过程

<https://github.com/soulteary/easy-ESXi-builder>

利用 VMware-PowerCLI 软件

```dockerfile
FROM python:3.7

RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple && pip install six psutil lxml pyopenssl --no-cache-dir

RUN wget "https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb" -O packages-microsoft-prod.deb && dpkg -i packages-microsoft-prod.deb && rm packages-microsoft-prod.deb

RUN sed -i -e "s/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/" /etc/apt/sources.list && apt-get update && apt-get install -y powershell

RUN curl -L 'https://developer.vmware.com/docs/17484/' \
-H 'authority: developer.vmware.com' \
-H 'accept: text/html' \
-H 'referer: https://developer.vmware.com/powercli/installation-guide' \
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36' \
--compressed \
-o VMware-PowerCLI-13.0.0-20829139.zip

SHELL ["/usr/bin/pwsh", "-c"]

RUN cd $($env:PSModulePath | awk -F ':' '{print $1}') && \
mv /VMware-PowerCLI-13.0.0-20829139.zip . && \
Expand-Archive ./VMware-PowerCLI-13.0.0-20829139.zip ./ && \
rm -rf ./VMware-PowerCLI-13.0.0-20829139.zip

ENTRYPOINT pwsh
```

- ESXi 的离线安装包,比如:`VMware-ESXi-8.0-20513097-depot.zip`
- ESXi 相关社区驱动,搭配自己的硬件使用,比如:
- ESXi 的 PCIe 社区网络驱动程序:[community-networking-driver-for-esxi](https://flings.vmware.com/community-networking-driver-for-esxi)
- ESXi 的 USB 社区网络驱动程序:[usb-network-native-driver-for-esxi](https://flings.vmware.com/usb-network-native-driver-for-esxi)
- ESXi 的 NVMe 社区驱动程序:[community-nvme-driver-for-esxi](https://flings.vmware.com/community-nvme-driver-for-esxi)

```
docker run --rm -it -v `pwd`:/data soulteary/easy-esxi-builder:2023.01.29
```

使用下面的命令,来添加基础镜像,和要附加到 ESXi 镜像中的驱动

```
# 加载基础镜像
Add-EsxSoftwareDepot /data/VMware-ESXi-8.0-20513097-depot.zip
# 加载社区 NVMe 驱动
Add-EsxSoftwareDepot /data/nvme-community-driver_1.0.1.0-3vmw.700.1.0.15843807-component-18902434.zip
# 加载社区 PCIe 驱动
Add-EsxSoftwareDepot /data/Net-Community-Driver_1.2.7.0-1vmw.700.1.0.15843807_19480755.zip
# 加载社区 USB 驱动
Add-EsxSoftwareDepot /data/ESXi800-VMKUSB-NIC-FLING-61054763-component-20826251.zip
# 如果你还需要更多驱动,参考上面的命令,继续操作即可
```

## 参考文档

- <https://soulteary.com/2023/01/29/how-to-easily-create-and-install-a-custom-esxi-image.html>
26 changes: 26 additions & 0 deletions 计算机操作系统/Linux内核/kudmp/crash分析.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
- `Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in`

```bash
crash> bt
PID: 2759 TASK: ffff8d8c4800a0e0 CPU: 1 COMMAND: "bpbkar"
#0 [ffff8d94a52d37b0] machine_kexec at ffffffff82c65754
#1 [ffff8d94a52d3810] __crash_kexec at ffffffff82d209a2
#2 [ffff8d94a52d38e0] panic at ffffffff833728ec
#3 [ffff8d94a52d3960] __stack_chk_fail at ffffffff82c9a5eb
#4 [ffff8d94a52d3970] kernel_rule_log_filter at ffffffffc078b623 [sysmon_edr] <<------
#5 [ffff8d94a52d3bb0] Kernel_Rule_Log_Proc at ffffffffc078b899 [sysmon_edr] <<------
#6 [ffff8d94a52d3ca0] wgs_check_file at ffffffffc078b9a4 [sysmon_edr] <<------
#7 [ffff8d94a52d3cf8] check_file_input at ffffffffc0788706 [sysmon_edr] <<------
#8 [ffff8d94a52d3d60] hook_security_inode_setattr at ffffffffc0788b12 [sysmon_edr] <<------
#9 [ffff8d94a52d3d80] security_inode_setattr at ffffffff82f0189f
#10 [ffff8d94a52d3da0] notify_change at ffffffff82e67a9b
#11 [ffff8d94a52d3de8] utimes_common at ffffffff82e7df99
#12 [ffff8d94a52d3e78] do_utimes at ffffffff82e7e165

crash> dis -rl ffffffffc078b623 | tail

crash> dis -rl ffffffff82c9a5eb

crash> mod -t
```

56 changes: 48 additions & 8 deletions 计算机操作系统/Linux内核/kudmp/crash工具.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,54 @@ crash vmcore /usr/lib/debug/lib/modules/<对应内核调试文件>/vmlinux

## 常用命令

| 命令 | 功能 | 示例 |
| ------------ | -------------------- | ------------------------------------------------------------ |
| `bt` | 打印函数调用栈 | displays a task's kernel-stack backtrace,可以指定进程号 `bt <pid>` |
| `log` | 打印系统消息缓冲区 | displays the kernel log_buf contents,如 `log \| tail -n 30` |
| `ps` | 显示进程的状态 | `>` 表示活跃的进程,如 `ps | grep RU` |
| `sys` | 显示系统概况 | |
| `kmem -i` | 显示内存使用信息 | |
| `dis <addr>` | 对给定地址进行反汇编 | |
查看系统中所有进程的信息

```bash
# crash /path/to/vmcore
crash> ps
```

查看进程的内存映射情况

```bash
# crash /path/to/vmcore
crash> vm
```

查看所有CPU的状态

```bash
# crash /path/to/vmcore
crash> cpu
```

查看内核模块信息

```bash
# crash /path/to/vmcore
crash> mod
```

查看某个函数的调用栈

```bash
# crash /path/to/vmcore
crash> bt func_name
```

列出所有可用的命令

```bash
# crash /path/to/vmcore
crash> help
```

分析崩溃发生的位置

```bash
# crash /path/to/vmcore
crash> bt -a
```

## 常见问题

Expand Down

0 comments on commit 1350514

Please sign in to comment.