From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9BZK-0003RD-6D for qemu-devel@nongnu.org; Mon, 21 Jul 2014 07:15:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X9BZC-0004nh-MZ for qemu-devel@nongnu.org; Mon, 21 Jul 2014 07:15:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40528) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9BZC-0004na-DI for qemu-devel@nongnu.org; Mon, 21 Jul 2014 07:15:38 -0400 Message-ID: <1405941327.27264.3.camel@nilsson.home.kraxel.org> From: Gerd Hoffmann Date: Mon, 21 Jul 2014 13:15:27 +0200 In-Reply-To: <53C99774.1070206@redhat.com> References: <20140717192204.GL2424@work-vm> <20140718171409.GD10517@work-vm> <53C97FAB.9020500@redhat.com> <53C99774.1070206@redhat.com> Content-Type: multipart/mixed; boundary="=-c99TyHvUBk5bshZCorBw" Mime-Version: 1.0 Subject: Re: [Qemu-devel] status for rc3/release List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Peter Maydell , quintela@redhat.com, aik@ozlabs.ru, "Dr. David Alan Gilbert" , QEMU Developers , amit.shah@redhat.com --=-c99TyHvUBk5bshZCorBw Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit On Fr, 2014-07-18 at 23:53 +0200, Paolo Bonzini wrote: > Il 18/07/2014 22:12, Paolo Bonzini ha scritto: > > Il 18/07/2014 19:14, Dr. David Alan Gilbert ha scritto: > >> * Dr. David Alan Gilbert (dgilbert@redhat.com) wrote: > >> (confirmed by running each twice) > >> and : > >> b18a990c - good > >> cab00a5aa - good > >> > >> This is squashfs on a livecd falling apart after migration. > > > > Can you give precise reproduction instructions before leaving? Which OS > > is being installed? > > Got it now from your other message, it's Fedora 20 live. I guess it's > just about migrating the image while it's loading and/or running. Yep. I have a script[1] doing ping-pong live migration on localhost. To check out live migration issues I either use a live iso, or do a fresh install of the guest triggering the issues, with ping-pong live migration already running during the install. Any attempt to install fedora doesn't come very far, neither from iso nor via pxe from network, with all sorts of strange guest behavior (anaconda crashing or reporting corrupted repodata for example). Dave found squashfs errors in the guests kernel log, which explains why anaconda is crashing. cheers, Gerd [1] attached. --=-c99TyHvUBk5bshZCorBw Content-Type: application/x-shellscript; name="migrate-loop" Content-Disposition: attachment; filename="migrate-loop" Content-Transfer-Encoding: 7bit #!/bin/sh # args mode="${1-vnc}" speed="${2-128M}" down="${3-0.2}" # setup name="${0##*/}" live="/vmdisk/iso/Fedora-Live-Desktop-x86_64-20-1.iso" #live="/mort/distiso/microsoft/en_windows_server_2012_r2_x64_dvd_2707946.iso" #live="/mort/distiso/microsoft/en_windows_7_ultimate_x64_dvd_x15-65922.iso" disk="/vmdisk/ext/migrate-loop.img" type="raw" size="32G" opts="format=${type},cache=none,aio=native" #qemu="/usr/libexec/qemu-kvm" qemu="qemu-rhev" ###################################################################### # create work dir WORK="${TMPDIR-/tmp}/${0##*/}-$$" mkdir "$WORK" || exit 1 trap 'rm -rf "$WORK"' EXIT if test ! -f "$disk"; then qemu-img create -f "$type" "$disk" "$size" fi ###################################################################### function run_qemu() { local sport="$1" local mon="$2" local lport="$3" args="$args -m 2G" args="$args -smp 2" args="$args -name $name" args="$args -nodefaults" args="$args -enable-kvm" args="$args -boot menu=on" case "$mode" in vnc) args="$args -vga std" args="$args -vnc localhost:$(( ${sport} - 5900 ))" ;; spice | switchhost) args="$args -vga qxl" args="$args -spice port=${sport},disable-ticketing,seamless-migration=off" ;; seamless) args="$args -vga qxl" args="$args -spice port=${sport},disable-ticketing,seamless-migration=on" ;; *) echo "unknown mode: $mode" exit 1 ;; esac args="$args -drive if=none,id=live,readonly,media=cdrom,file=${live}" args="$args -drive if=none,id=disk,${opts},file=${disk}" args="$args -chardev socket,id=mon,path=$mon,server,nowait" args="$args -mon chardev=mon" args="$args -serial stdio" args="$args -net user,bootfile=http://192.168.2.14/tftpboot/pxelinux.0" args="$args -net nic,model=virtio" args="$args -device ide-hd,bus=ide.0,drive=disk,bootindex=1" args="$args -device ide-cd,bus=ide.1,drive=live,bootindex=2" # args="$args -device intel-hda" # args="$args -device hda-duplex" args="$args -device AC97" if test "$lport" != ""; then args="$args -incoming tcp:0:${lport}" fi # xterm -geometry 80x24 -title "$name [ $qemu ]" \ # -e $qemu $args (set -x; $qemu $args) } function run_view() { local sport="$1" local vuri case "$mode" in vnc) vuri="vnc://localhost:${sport}" ;; spice | switchhost | seamless) vuri="spice://localhost:${sport}" ;; *) echo "unknown mode: $mode" exit 1 ;; esac (set -x; remote-viewer ${vuri}) } function do_migrate() { local mon="$1" local uri="$2" (echo "migrate_set_speed $speed"; sleep 1) | nc -U ${mon} > /dev/null (echo "migrate_set_downtime $down"; sleep 1) | nc -U ${mon} > /dev/null (echo "migrate -d $uri"; sleep 1) | nc -U ${mon} > /dev/null while true; do (echo "info migrate"; sleep 1) | nc -U ${mon} \ | sed -e 's/\r//' > $WORK/info status=$( awk '/Migration status/ { print $3 }' $WORK/info ) todo=$( awk '/remaining ram/ { print $3 }' $WORK/info ) total=$( awk '/total ram/ { print $3 }' $WORK/info ) case "$status" in active) echo "# $status, $(( $todo * 100 / $total ))% left" ;; completed) echo "# $status" break; ;; *) echo "unknown status: $status" echo "--" cat $WORK/info echo "--" break; ;; esac done (echo "quit"; sleep 1) | nc -U ${mon} > /dev/null } ###################################################################### # check for stale processes hanging around ps ax | grep -v egrep | egrep -e "qemu-(kvm|system)" && exit 1 count=0 sport=12345 lport=23456 dmon="$WORK/mon-$sport-$lport" run_qemu ${sport} ${dmon} & sleep 1 run_view ${sport} & sleep 1 while true; do smon="$dmon" count=$(( $count + 1 )) sport=$(( $sport + 1 )) lport=$(( $lport + 1 )) dmon="$WORK/mon-$sport-$lport" if ps ax | grep -v egrep | egrep -e "qemu-(kvm|system)"; then true # ok else echo "# qemu dead, exiting" break fi sleep 16 echo "#" echo "# migrate [ $mode mode ] #$count ... " run_qemu ${sport} ${dmon} ${lport} & sleep 1 if test "$mode" = "switchhost" -o "$mode" = "seamless"; then (echo "client_migrate_info spice localhost ${sport}"; sleep 1) \ | nc -U ${smon} else run_view ${sport} & fi do_migrate "$smon" "tcp:localhost:${lport}" sleep 1 done wait --=-c99TyHvUBk5bshZCorBw--