Hi all,

I'm a teaching assistant for an operating systems class and we've been using
an ancient version of qemu to do some of our
lab assignments (v0.9.something).  We've been relying on a qcow2 qemu image
that we created a while back.  Recently, I've been trying to get the labs
working with the latest version of qemu and have run into a few problems.

First, i found that our old qcow2 image does not work with qemu v0.12.5.  I
get an error saying that SaveVM 2 version is obsolete.  To get around this,
i decided to simply rebuild the image file, but i ran into a really strange
problem: whenever i reload the qcow2 image and try to run some commands, a
lot of white space gets printed to the screen instead of the expected
output.  After running several commands, qemu starts printing text from the
boot process to stdout in qemu.

I've tried creating the image with qemu versions 0.10.6 and 0.11.1 and the
process works correctly with no unusual behavior.  Would anyone happen to
know why version 0.12.5 would create this odd behavior?

To help diagnose the problem, i run these commands to create the image:
qemu-img create -f qcow2 cs111snap.qcow2 512M
mv cs111snap.qcow2 /usr/local/share/qemu
qemu -m 128 -hda /usr/local/share/qemu/cs111snap.qcow2 -cdrom
/usr/local/share/qemu/cs111.iso -tftp /tmp/cs111_keith16400 -redir
tcp:2222::22

I give live nousb acpi=off as boot options
once booted, i run the following in qemu
  sudo -i
  passwd (set to something simple)
  mknod /dev/fd0 b 2 0
Outside of qemu i then run
  scp -p -P2222 -o"UserKnownHostsFile false" go-in-qemu r...@localhost
:/root/go
  to copy over a setup script that we have
Then in qemu again i run
ifconfig eth0 down; clear; echo "If using ./run-qemu, simply press Enter to
load your code."; echo; history -c
and end with ". go" and unentered command
I then save the image by hitting ctrl+alt+2, typing "savevm osp" and then
"quit"

I reload the image with the following command
qemu -m 128 -hda /usr/local/share/qemu/cs111snap.qcow2 -cdrom
/usr/local/share/qemu/cs111.iso -loadvm osp -tftp /tmp/cs111_keith16100
-redir tcp:2222::22

After running this last command, qemu loads up and has "
If using ./run-qemu, simply press Enter to load your code.
> . go
printed to the screen.  After i hit enter, a lot of white space gets
printed, instead of some echo output that i expect from the go script.  Note
that this happens regardless of what is in the go script (I've tried it with
just a simple echo statement).

I should note that cs111.iso is a copy of Debian.

Again, this whole process works correctly with older versions of qemu, but
not with version 0.12.5.

if anyone has any insights to the problem, I would greatly appreciate any
suggestions

Thanks!
--Keith

Reply via email to