qemu displays and hangs with message 'booting from harddisk '

Refresh

April 2019

Views

61 time

2

I'm using Debian image with QEMU. Installation works well with below command.

ISO_FILE="debian-buster-DI-alpha5-amd64-xfce-CD-1.iso"
DISK_IMAGE="debian.img"
SPICE_PORT=5924

qemu-system-x86_64 \
    -cdrom "${ISO_FILE}" \
        -drive format=raw,if=pflash,file=/usr/share/ovmf/OVMF.fd,readonly \
        -drive file=${DISK_IMAGE:?} \
        -enable-kvm \
        -m 2G \
        -smp 2 \
        -cpu host \
        -vga qxl \
        -serial mon:stdio \
        -net user,hostfwd=tcp::2222-:22 \
        -net nic \
        -spice port=${SPICE_PORT:?},disable-ticketing \
        -device virtio-serial-pci \
        -device virtserialport,chardev=spicechannel0,name=com.redhat.spice.0 \
        -chardev spicevmc,id=spicechannel0,name=vdagent 

But when I start the image again with command like

DISK_IMAGE="debian.img"
SPICE_PORT=5924

qemu-system-x86_64 \
        -drive format=raw,if=pflash,file=/usr/share/ovmf/OVMF.fd,readonly \
        -drive file=${DISK_IMAGE:?} 
        -enable-kvm \
        -m 2G \
        -smp 2 \
        -cpu host \
        -vga qxl \
        -serial mon:stdio \
        -net user,hostfwd=tcp::2222-:22 \
        -net nic \
        -spice port=${SPICE_PORT:?},disable-ticketing \
        -device virtio-serial-pci \
        -device virtserialport,chardev=spicechannel0,name=com.redhat.spice.0 \
        -chardev spicevmc,id=spicechannel0,name=vdagent \
        -snapshot

QEMU stuck at booting from harddisk . Any thoughts on how resolve this and move forward?

0 answers