launch-victim.sh (680B)
1#!/bin/sh 2 3set -ex 4 5gitroot=$(git rev-parse --show-toplevel) 6cd "$gitroot/qemu" 7 8if [ ! -e cmdline ]; then 9 echo "Missing qemu/cmdline.." 10 exit 1 11fi 12 13if [ ! -e guest_encrypted.qcow2 ]; then 14 echo "Copying disk.." 15 rsync -a --info=progress2 guest.qcow2 guest_encrypted.qcow2 16fi 17 18sudo LIBVIRT_DEBUG=1 virsh net-start default 2>&1 | grep -i warning || true 19 20sudo PREFIX=$gitroot/AMDSEV $gitroot/AMDSEV/launch-qemu.sh \ 21 -hda guest_encrypted.qcow2 \ 22 -console serial \ 23 -vnc 1 \ 24 -mem 2024 \ 25 -smp 1,cores=1,threads=1 \ 26 -allow-debug \ 27 -initrd initrd.img-5.19.0-rc6-snp-guest-d9bd54fea4d2 \ 28 -kernel vmlinuz-5.19.0-rc6-snp-guest-d9bd54fea4d2 \ 29 -append "$(cat cmdline)" \ 30 -sev-snp 31