Skip to content

Commit 3c21156

Browse files
authored
translated setup_ubuntu-host_vmware-vm_x86-64-kernel.md (#353)
* translated setup_ubuntu-host_vmware-vm_x86-64-kernel.md * add badge * Revise setup guide for Ubuntu host on VMware Updated the guide for setting up an Ubuntu host with a VMware virtual machine to improve clarity and consistency in language. * Fix spacing in CLA signing notice
1 parent 42fda08 commit 3c21156

2 files changed

Lines changed: 35 additions & 31 deletions

File tree

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,19 @@
88

99
请首先加入我们的[飞书群](https://applink.feishu.cn/client/chat/chatter/add_by_link?link_token=4e3g0475-2966-40c7-a713-3fcf43893a67),加群时请说明是“志愿者”。
1010

11+
[![加入飞书外部群](https://img.shields.io/badge/加入飞书外部群-HCTT%20SIG-0078d7?style=flat-square&labelColor=444444)](https://applink.feishu.cn/client/chat/chatter/add_by_link?link_token=4e3g0475-2966-40c7-a713-3fcf43893a67)
12+
1113
新加入的成员,请:
1214

1315
1. 修改你的飞书群昵称为“译者-YOUR_GITHUB_ID”。
14-
2. 请在开始贡献前[签署CLA](https://cla-assistant.io/hust-open-atom-club/TranslateProject)
16+
2. 请在开始贡献前[签署 CLA](https://cla-assistant.io/hust-open-atom-club/TranslateProject)
1517
3. 阅读 [WIKI](https://github.com/hust-open-atom-club/TranslateProject/wiki/) 了解如何开始。
1618
4. 遇到不解之处,请在飞书群内发问。
1719

1820
对于前端开发者,本仓库基于前端框架 `Astro`,若希望本地运行代码,请查看 [pages/README.md](./pages/README.md)
1921

2022
## 如何开始
2123

22-
**注意**,请在开始贡献前[签署 CLA](https://cla-assistant.io/hust-open-atom-club/TranslateProject),否则 PR 无法被合并。
24+
**注意**,请在开始贡献前[ 签署CLA ](https://cla-assistant.io/hust-open-atom-club/TranslateProject),否则 PR 无法被合并。
2325

2426
请阅读 [WIKI](https://github.com/hust-open-atom-club/TranslateProject/wiki/)。如需要协助,请在群内发问。
Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,42 @@
11
---
2-
status: collected
2+
status: translated
33
title: "Setup: Ubuntu host, VMware vm, x86-64 kernel"
44
author: Syzkaller Community
55
collector: jxlpzqc
66
collected_date: 20240314
7+
translator: yinchunyuan
8+
translated_date: 20251127
79
link: https://github.com/google/syzkaller/blob/master/docs/linux/setup_ubuntu-host_vmware-vm_x86-64-kernel.md
810
---
911

10-
# Setup: Ubuntu host, VMware vm, x86-64 kernel
12+
# 设置:Ubuntu 主机,VMware 虚拟机,x86-64 内核
1113

12-
These are the instructions on how to fuzz the x86-64 kernel in VMware Workstation with Ubuntu on the host machine and Debian Bullseye in the virtual machines.
14+
本文描述如何在 VMware Workstation 中使用 Ubuntu 主机和 Debian Bullseye 虚拟机
15+
对 x86-64 内核进行模糊测试。
1316

14-
In the instructions below, the `$VAR` notation (e.g. `$GCC`, `$KERNEL`, etc.) is used to denote paths to directories that are either created when executing the instructions (e.g. when unpacking GCC archive, a directory will be created), or that you have to create yourself before running the instructions. Substitute the values for those variables manually.
17+
在这个指南下,`$VAR` 符号(例如 `$GCC``$KERNEL` 等)表示目录路径,这些目录要么是在执行指南时创建的(比如,解压 GCC 归档文件时会创建一个目录),要么是你必须在运行指南前自己创建。请手动替换这些变量的值。
1518

16-
## GCC and Kernel
19+
## GCC 和内核
1720

18-
You can follow the same [instructions](/docs/linux/setup_ubuntu-host_qemu-vm_x86-64-kernel.md) for obtaining GCC and building the Linux kernel as when using QEMU.
21+
你可以按照与使用 QEMU 时相同的[指令](/docs/linux/setup_ubuntu-host_qemu-vm_x86-64-kernel.md) 来获得 GCC 并构建 Linux 内核。
1922

20-
## Image
23+
## 镜像
2124

22-
Install debootstrap:
25+
安装 debootstrap
2326

2427
``` bash
2528
sudo apt-get install debootstrap
2629
```
2730

28-
To create a Debian Bullseye Linux user space in the $USERSPACE dir do:
31+
为了创建一个在 $USERSPACE 目录中的 Debian Bullseye Linux 用户空间,请执行:
2932
```
3033
sudo mkdir -p $USERSPACE
3134
sudo debootstrap --include=openssh-server,curl,tar,gcc,libc6-dev,time,strace,sudo,less,psmisc,selinux-utils,policycoreutils,checkpolicy,selinux-policy-default,firmware-atheros,open-vm-tools --components=main,contrib,non-free bullseye $USERSPACE
3235
```
3336

34-
Note: it is important to include the `open-vm-tools` package in the user space as it provides better VM management.
37+
注意:在用户空间中有 `open-vm-tools` 包很重要,因为这个包可以提供更好的虚拟机管理。
3538

36-
To create a Debian Bullseye Linux VMDK do:
39+
为了创建 Debian Bullseye Linux VMDK,请执行;
3740

3841
```
3942
wget https://raw.githubusercontent.com/google/syzkaller/master/tools/create-gce-image.sh -O create-gce-image.sh
@@ -42,12 +45,12 @@ chmod +x create-gce-image.sh
4245
qemu-img convert disk.raw -O vmdk disk.vmdk
4346
```
4447

45-
The result should be `disk.vmdk` for the disk image and `key` for the root SSH key. You can delete `disk.raw` if you want.
48+
磁盘镜像的结果应为 `disk.vmdk`,根 SSH 密钥的结果应为 `key`。你可以随时删除 disk.raw
4649

47-
## VMware Workstation
50+
## VMware 工作站
4851

49-
Open VMware Workstation and start the New Virtual Machine Wizard.
50-
Assuming you want to create the new VM in `$VMPATH`, complete the wizard as follows:
52+
打开 VMware 工作站并启动新建虚拟机向导。
53+
假如你想在 `$VMPATH` 中创建新的虚拟机,按照以下步骤完成向导:
5154

5255
* Virtual Machine Configuration: Custom (advanced)
5356
* Hardware compatibility: select the latest version
@@ -62,40 +65,40 @@ Assuming you want to create the new VM in `$VMPATH`, complete the wizard as foll
6265
* Existing Disk File: enter the path of `disk.vmdk` created above
6366
* Select "Customize Hardware..." and remove the "Printer" device if you have one. Add a new "Serial Port" device. For the serial port connection choose "Use socket (named pipe)" and enter "serial" for the socket path. At the end it should look like this:
6467

65-
![Virtual Machine Settings](vmw-settings.png?raw=true)
68+
![设置虚拟机](vmw-settings.png?raw=true)
6669

67-
When you complete the wizard, you should have `$VMPATH/debian.vmx`. From this point onward, you no longer need the Workstation UI.
70+
当你完成向导后,你应该有 `$VMPATH/debian.vmx`。从现在开始,你不再需要工作站用户界面了。
6871

69-
Starting the Debian VM (headless):
72+
启动 Debian 虚拟机(无头模式):
7073
``` bash
7174
vmrun start $VMPATH/debian.vmx nogui
7275
```
7376

74-
Getting the IP address of the Debian VM:
77+
获得 Debian 虚拟机的 IP 地址:
7578
``` bash
7679
vmrun getGuestIPAddress $VMPATH/debian.vmx -wait
7780
```
7881

79-
SSH into the VM:
82+
通过 SSH 登入虚拟机:
8083
``` bash
8184
ssh -i key root@<vm-ip-address>
8285
```
8386

84-
Connecting to the serial port of the VM (after it is started):
87+
连接虚拟机的串行端口(在它启动后):
8588
``` bash
8689
nc -U $VMPATH/serial
8790
```
8891

89-
Stopping the VM:
92+
关闭虚拟机:
9093
``` bash
9194
vmrun stop $VMPATH/debian.vmx
9295
```
9396

94-
If all of the above `vmrun` commands work, then you can proceed to running syzkaller.
97+
如果以上所有的 `vmrun` 命令都可以正常工作,接下来可继续运行 syzkaller
9598

9699
## syzkaller
97100

98-
Create a manager config like the following, replacing the environment variables $GOPATH, $KERNEL and $VMPATH with their actual values.
101+
创建一个如下所示的管理器配置,将环境变量 $GOPATH, $KERNEL $VMPATH 替换为它们的实际值。
99102

100103
```
101104
{
@@ -114,15 +117,14 @@ Create a manager config like the following, replacing the environment variables
114117
}
115118
```
116119

117-
Run syzkaller manager:
120+
运行 syzkaller 管理器:
118121

119122
``` bash
120123
mkdir workdir
121124
./bin/syz-manager -config=my.cfg
122125
```
123126

124-
Syzkaller will create full clone VMs from the `base_vmx` VM and then use ssh to copy and execute programs in them.
125-
The `base_vmx` VM will not be started and its disk will remain unmodified.
127+
Syzkaller 将会从 `base_vmx` 虚拟机中创建完整的克隆虚拟机,然后使用 ssh 来复制并且在其中执行程序。
128+
`base_vmx` 虚拟机将不会工作,并且它的磁盘将保持未修改状态。
126129

127-
If you get issues after `syz-manager` starts, consider running it with the `-debug` flag.
128-
Also see [this page](/docs/troubleshooting.md) for troubleshooting tips.
130+
如果你在 `syz-manager` 启动后遇到问题,考虑使用 `-debug` 标志运行它。同时也可以在 [这个页面](/docs/troubleshooting.md) 查找解决问题的方法。

0 commit comments

Comments
 (0)