Skip to content

Commit fa310d8

Browse files
committed
Merge branch 'andrew/sev-snp-directions-follow-up' into 'master'
Touch-up SEVSNP test doc See merge request dfinity-lab/public/ic!12594
2 parents 483675a + 26034d1 commit fa310d8

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

ic-os/docs/SEVSnpTest.adoc

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,17 @@ $ wget https://github.com/dfinity/AMDSEV/releases/download/snp-release-<date>/sn
1717
$ tar xvf snp-release-<date>.tar.gz
1818
```
1919

20-
* Install the linux kernel by running the install script in the release directory
20+
* Install the linux kernel by running the install script in the release directory:
2121
```
2222
$ cd snp-release-<date>
2323
$ sudo ./install.sh
2424
```
2525
* Reboot the machine and (if needed) choose the SNP host kernel from the grub menu
26-
* Run the following commands to verify that the SNP is enabled on the host
26+
* Run the following commands to verify that the SNP is enabled on the host:
2727
```
2828
$ uname -r
29-
5.17.0-rc6-snp-guest-dfa5ba8348e4
29+
6.1.0-rc4-snp-host-93fa8c5918a4
30+
# command will output the SNP host kernel you downloaded
3031

3132
$ sudo dmesg | grep -i -e sev -e ccp -e rmp
3233
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.14.0-rc2-snp-host-6d4469b86f90 root=/dev/mapper/vgroot-lvroot ro mem_encrypt=on kvm_amd.sev=1 amd_iommu=on
@@ -54,19 +55,19 @@ $ cat /sys/module/kvm_amd/parameters/sev_snp
5455
Y
5556
```
5657
== Prepare Guest
57-
* Install these utils
58+
* Install these utils:
5859
```
59-
$ sudo apt install libvirt-daemon-system virtinst qemu-utils cloud-image-utils
60+
$ sudo apt install -y libvirt-daemon-system virtinst qemu-utils cloud-image-utils libsnappy-dev
6061
```
61-
* Get an ubuntu image
62+
* Get an ubuntu image:
6263
```
6364
$ wget https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img
6465
```
65-
* Create QCOW2 image
66+
* Create QCOW2 image:
6667
```
6768
$ sudo qemu-img create -b focal-server-cloudimg-amd64.img -f qcow2 -F qcow2 sev-guest.qcow2 100G
6869
```
69-
* Create a cloud-init config file that sets a default password
70+
* Create a cloud-init config file that sets a default password:
7071
```
7172
$ cat >cloud-config <<EOF
7273
#cloud-config
@@ -77,25 +78,26 @@ EOF
7778

7879
$ sudo cloud-localds user-data.img cloud-config
7980
```
80-
* Launch a (non-SNP) guest VM
81+
* Launch a (non-SNP) guest VM:
8182
```
8283
sudo ./launch-qemu.sh -hda sev-guest.qcow2 -config user-data.img
8384
```
84-
** Login with password specified in cloud-config (for this example “ubuntu/password”
85-
** To exit VM use `Ctrl-]`
85+
** Login with password specified in cloud-config (for this example, "ubuntu/password")
8686

87-
* Download the https://github.com/dfinity/AMDSEV/releases[latest Guest kernel] from the DFINITY Github and install it:
87+
** Download the https://github.com/dfinity/AMDSEV/releases[latest Guest kernel] from the DFINITY Github and install it:
8888
```
89-
wget https://github.com/dfinity/AMDSEV/releases/download/snp-release-2023-05-24/linux-image-6.1.0-rc4-snp-guest-93fa8c5918a4_6.1.0-rc4-snp-guest-93fa8c5918a4-1_amd64.deb
89+
$ wget https://github.com/dfinity/AMDSEV/releases/download/snp-release-2023-05-24/linux-image-6.1.0-rc4-snp-guest-93fa8c5918a4_6.1.0-rc4-snp-guest-93fa8c5918a4-1_amd64.deb
90+
# Assure you are downloading the latest version!
9091

91-
sudo dpkg -i linux-image-6.1.0-rc4-snp-guest-93fa8c5918a4_6.1.0-rc4-snp-guest-93fa8c5918a4-1_amd64.deb
92+
$ sudo dpkg -i linux-image-6.1.0-rc4-snp-guest-93fa8c5918a4_6.1.0-rc4-snp-guest-93fa8c5918a4-1_amd64.deb
9293
```
9394
* Shutdown the VM
94-
* Launch the SNP guest VM
95+
** To exit VM use `Ctrl-]`
96+
* Launch the SNP guest VM:
9597
```
96-
sudo ./launch_qemu.sh -hda sev-guest.qcow2 -sev-snp
98+
$ sudo ./launch_qemu.sh -hda sev-guest.qcow2 -sev-snp
9799
```
98-
* Verify that SNP is enabled on the VM
100+
* Verify that SNP is enabled on the VM:
99101
```
100102
$ dmesg | grep -i snp
101103
AMD Memory Encryption Features active: SEV SEV-ES SEV-SNP

0 commit comments

Comments
 (0)