-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SEV-SNP Cannot boot guest ubuntu:24.04 to install #233
Comments
I have the same issue with Ubuntu 22.04, and I am just running |
Try adding console=ttyS0,115200n8 to the command line of the "Try or Install Ubuntu Server" grub entry. |
Hi @ghe0 I have solved this problem by following steps for guest VM:
./usr/local/bin/qemu-img create -f qcow2 ubuntu-24.04.qcow2 50G
cp ./usr/local/share/qemu/OVMF_VARS.fd OVMF_VARS.fd
ISO_LOCATION="/media/isos/ubuntu-24.04.1-live-server-amd64.iso"
DISK_LOCATION="/var/kvm/machines/ubuntu-24.04.qcow2"
virt-install \
--name U2404 \
--ram 8192 \
--disk path=$DISK_LOCATION,size=50 \
--boot loader=/usr/share/OVMF/OVMF_CODE_4M.fd,loader.secure='no',loader.type=pflash,nvram=/var/lib/libvirt/qemu/nvram/U2404.fd \
--vcpus 2 \
--os-variant ubuntu24.04 \
--network bridge=virbr0 --graphics none --console pty,target_type=serial \
--location $ISO_LOCATION,kernel=casper/vmlinuz,initrd=casper/initrd \
--extra-args 'console=ttyS0,115200n8' Which can automatically install the iso, otherwise you will be stuck during the installation process. When installation is done.
./launch-qemu.sh -hda ubuntu-24.04.qcow2 -sev-snp After CVM is launched, you should be able to replace the guest kernel just as what you did for the host kernel. After updating the guest kernel to sev kernel, all done. You can also boot CVM by: /home/ziyi/AMDSEV/usr/local/bin/qemu-system-x86_64 \
-enable-kvm \
-cpu EPYC-v4 \
-machine q35 \
-smp 4,maxcpus=255 \
-m 2048M,slots=5,maxmem=10240M \
-no-reboot \
-bios /home/ziyi/AMDSEV/usr/local/share/qemu/OVMF.fd \
-drive file=/var/kvm/machines/ubuntu-24.04.qcow2,if=none,id=disk0,format=qcow2 \
-device virtio-scsi-pci,id=scsi0,disable-legacy=on,iommu_platform=true \
-device scsi-hd,drive=disk0 \
-machine memory-encryption=sev0,vmport=off \
-object memory-backend-memfd,id=ram1,size=2048M,share=true,prealloc=false\
-machine memory-backend=ram1 \
-object sev-snp-guest,id=sev0,policy=0xb0000,cbitpos=51,reduced-phys-bits=1 \
-nographic \
-monitor pty \
-monitor unix:monitor,server,nowait \ |
This did the trick. Thank you! @haruki3hhh thank you for the steps. I saw you were also using the console arg. I believe that's what was causing the terminal monitor to get stuck. |
Hi,
I try to build the SEV-SNP env in my machine.
In host, I think the env is built successfully:
Then I try follow the steps here:
https://github.com/AMDESE/AMDSEV?tab=readme-ov-file#ubuntu18-prep-vm
ubuntu-24.04.1-live-server-amd64.iso
I downloaded from: https://releases.ubuntu.com/24.04/But the screen stuck in here:
The qemu CMD running is:
Could you help me about it?
Appreciate!
The text was updated successfully, but these errors were encountered: