@@ -17,16 +17,17 @@ $ wget https://github.com/dfinity/AMDSEV/releases/download/snp-release-<date>/sn
17
17
$ tar xvf snp-release-<date>.tar.gz
18
18
```
19
19
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:
21
21
```
22
22
$ cd snp-release-<date>
23
23
$ sudo ./install.sh
24
24
```
25
25
* 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:
27
27
```
28
28
$ 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
30
31
31
32
$ sudo dmesg | grep -i -e sev -e ccp -e rmp
32
33
[ 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
54
55
Y
55
56
```
56
57
== Prepare Guest
57
- * Install these utils
58
+ * Install these utils:
58
59
```
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
60
61
```
61
- * Get an ubuntu image
62
+ * Get an ubuntu image:
62
63
```
63
64
$ wget https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img
64
65
```
65
- * Create QCOW2 image
66
+ * Create QCOW2 image:
66
67
```
67
68
$ sudo qemu-img create -b focal-server-cloudimg-amd64.img -f qcow2 -F qcow2 sev-guest.qcow2 100G
68
69
```
69
- * Create a cloud-init config file that sets a default password
70
+ * Create a cloud-init config file that sets a default password:
70
71
```
71
72
$ cat >cloud-config <<EOF
72
73
#cloud-config
77
78
78
79
$ sudo cloud-localds user-data.img cloud-config
79
80
```
80
- * Launch a (non-SNP) guest VM
81
+ * Launch a (non-SNP) guest VM:
81
82
```
82
83
sudo ./launch-qemu.sh -hda sev-guest.qcow2 -config user-data.img
83
84
```
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")
86
86
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:
88
88
```
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!
90
91
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
92
93
```
93
94
* Shutdown the VM
94
- * Launch the SNP guest VM
95
+ ** To exit VM use `Ctrl-]`
96
+ * Launch the SNP guest VM:
95
97
```
96
- sudo ./launch_qemu.sh -hda sev-guest.qcow2 -sev-snp
98
+ $ sudo ./launch_qemu.sh -hda sev-guest.qcow2 -sev-snp
97
99
```
98
- * Verify that SNP is enabled on the VM
100
+ * Verify that SNP is enabled on the VM:
99
101
```
100
102
$ dmesg | grep -i snp
101
103
AMD Memory Encryption Features active: SEV SEV-ES SEV-SNP
0 commit comments