Comment 9 for bug 1377308

Revision history for this message
Scott Moser (smoser) wrote :

ok. so i can reproduce this on both arm64 and ppc64el.
On ppc64el, both on trusty and on utopic.
Adding '-initrd <extracted-initramfs>' fixes the problem.

Heres an improved copy/paste to recreate. It does *not* fail on (arch=amd64).

arch=ppc64el
rel=trusty
tgz_url=http://cloud-images.ubuntu.com/$rel/current/${rel}-server-cloudimg-${arch}.tar.gz
tgz=${tgz_url##*/}
qemu=qemu-system-${arch}
[ "$arch" = "amd64" ] && qemu="qemu-system-x86_64"
[ "$arch" = "ppc64el" ] && qemu="qemu-system-ppc64"

[ -f "$tgz" ] || { wget "${tgz_url}" -O "$tgz.part" && mv "$tgz.part" "$tgz"; }

mkdir -p dist
( cd dist && ls *$rel*$arch*.img 2>/dev/null ) || tar -C dist -Sxvzf "$tgz"
dist_disk=$(echo dist/*$rel*$arch*.img)
kernel=$(echo dist/*$rel*$arch*vmlinu?*)

cat > user-data <<EOF
#cloud-config
password: passw0rd
chpasswd: { expire: False }
ssh_pwauth: True
EOF
echo "instance-id: $(uuidgen || echo i-abcdefg)" > meta-data
cloud-localds seed.img user-data meta-data

qemu-img create -f qcow2 -b "$dist_disk" disk.img

# on intel:
$qemu -enable-kvm \
   -net nic -net user,hostfwd=tcp::2222-:22 \
   -drive file=disk.img,if=virtio -drive file=seed.img,if=virtio \
   -kernel "${kernel}" -append "root=/dev/vda ro" -curses

# on ppc64el
$qemu -m 1G -enable-kvm -machine pseries,usb=off -device spapr-vscsi \
   -device spapr-vlan,netdev=net00 -netdev type=user,id=net00 \
   -drive file=disk.img,if=virtio -drive file=seed.img,if=virtio \
   -kernel "$kernel" -append "root=/dev/vda console=hvc0 ro --verbose" \
   -display none -nographic