sandia-minimega / minimega

minimega
GNU General Public License v3.0
148 stars 66 forks source link

Can't boot from disk with qemu 3.1.0 #1354

Closed floren closed 5 years ago

floren commented 5 years ago

Describe your environment

  1. minimega version 2b719e8449f0d2625a64c039c01a294237020e59
  2. Linux distro/version: Debian Stable 10
  3. Go compiler version: 1.12
  4. VM types: KVM

Describe the bug I have a minimega script which works on my laptop running qemu 2.8.1 but not on my new desktop, which runs qemu 3.1.0. When I attempt to boot, I see the following error:

mm

The QEMU commands look like this:

qemu-system-x86_64 -enable-kvm -name 5 -m 2048 -nographic -vnc unix:/tmp/minimega/5/vnc -smp 4 -qmp unix:/tmp/minimega/5/qmp,server -vga std -rtc clock=vm,base=utc -usb -device usb-ehci,id=ehci -device usb-tablet,bus=usb-bus.0 -pidfile /tmp/minimega/5/qemu.pid -k en-us -cpu host -net none -S -drive media=cdrom -drive file=/tmp/minimega/5/disk-0.qcow2,media=disk,if=ide,cache=unsafe -device pci-bridge,id=pci.1,chassis_nr=1 -netdev tap,id=mega_tap6,script=no,ifname=mega_tap6 -device driver=e1000,netdev=mega_tap6,mac=00:de:ad:be:ef:01,bus=pci.1,addr=0x1 -device virtio-serial-pci,id=virtio-serial0,bus=pci.1,addr=0x2 -chardev socket,id=charvserialCC,path=/tmp/minimega/5/cc,server,nowait -device virtserialport,bus=virtio-serial0.0,chardev=charvserialCC,id=charvserialCC,name=cc -uuid 37b398ab-7e74-4434-811d-eaa4f24a117b

To Reproduce The script below is what I'm running, stripped down:

vm kill all
vm flush
dnsmasq kill all
tap delete all

vm config vcpu 4

# set up network
tap create gravnet ip 10.0.0.254/16
dnsmasq start 10.0.0.254 10.0.0.2 10.0.0.30
#frontends
dnsmasq configure 0 ip 00:ca:fe:ba:be:01 10.0.0.1
dnsmasq configure 0 ip 00:ca:fe:ba:be:02 10.0.0.2

vm config disk /home/john/gravwell-testbed/debian.qc2                                                 

vm config net gravnet,00:ca:fe:ba:be:01
vm launch kvm frontend0

vm config net gravnet,00:ca:fe:ba:be:02
vm launch kvm frontend1

vm start all

Expected behavior VMs boot on my laptop, show the screenshotted error on my desktop.

jcrussell commented 5 years ago

Can you try copying the disk and booting with snapshot false?

floren commented 5 years ago

It's dumber than I thought... it appears that the original image became corrupt on my laptop in such a way that scp cannot read it from the disk, but qemu can boot from it. Luckily I appear to have had a backup. Closing this because the problem seems to be on my end.