Skip to content

Commit b7a226f

Browse files
committed
content: Add guest setup section
Add documentation of how to login to RISC-V guest, enable ssh daemon and install upstream kernel. Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
1 parent c752d93 commit b7a226f

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

src/virtualization/cloud-hypervisor/heterogeneous-runner.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,3 +126,43 @@ AIA. With this script in place, you can start VM with command:
126126
```sh
127127
bash start-riscv64.sh
128128
```
129+
130+
### Guest
131+
132+
You may now login into VM booted with user name and password being both
133+
`ubuntu`. After you have logged in, you will need to execute
134+
`sudo systemctl enable --now ssh` to make it standby, then you can ssh into this
135+
VM with `ssh ubuntu@localhost -p 12055`.
136+
137+
#### Kernel
138+
139+
As mentioned previously, the kernel shipped with Ubuntu 24.04.1 LTS is
140+
insufficient to develop type II hypervisors meet RVA23 standards. We will need
141+
to manually replace the kernel from upstream kernel source:
142+
143+
```sh
144+
sudo apt update
145+
sudo DEBIAN_FRONTEND="noninteractive" apt-get install --no-install-recommends -y \
146+
git python3 python3-pip ninja-build build-essential pkg-config curl bc jq \
147+
libslirp-dev libfdt-dev libglib2.0-dev libssl-dev libpixman-1-dev \
148+
flex bison
149+
150+
git clone --depth 1 --branch v6.11 https://github.com/torvalds/linux.git
151+
pushd linux
152+
make defconfig
153+
# Enable kvm module instead of inserting manually
154+
sed -i "s|^CONFIG_KVM=.*|CONFIG_KVM=y|g" .config
155+
# Build kernel
156+
make -j$(nproc)
157+
# Install kernel
158+
sudo make headers_install
159+
sudo make modules_install
160+
# You might need to repeat this step, it somehow fails while installing for the
161+
# first time, retry should fix it. (PRs are welcome to explain why this happens)
162+
sudo make install
163+
sudo update-grub
164+
popd
165+
```
166+
167+
After kernel is properly installed, you may power it off and start it again with
168+
AIA enabled.

0 commit comments

Comments
 (0)