* Migration issue - disk image was not updated.
@ 2011-07-18 13:08 sirmax
2011-07-18 14:39 ` Stefan Hajnoczi
0 siblings, 1 reply; 4+ messages in thread
From: sirmax @ 2011-07-18 13:08 UTC (permalink / raw)
To: kvm
Hi!
I have the following issue during live migration without shared storage:
Node A with VM started:
VM_IMAGE="/usr/local/virtual/img/win-xp-test-migrate.img"
VM_NAME="win-xp-test-m"
DEV0="kvm_m1"
/usr/bin/tunctl -b -u root -t ${DEV0}
/sbin/ifconfig ${DEV0} up
screen -dmS $VM_NAME \
TMPDIR=/var/tmp/ /usr/bin/kvm \
-hda $VM_IMAGE \
-net nic -net tap,ifname=${DEV0},script=no,downscript=no \
-boot c \
-vnc :15 \
-usbdevice tablet \
-usb \
-monitor tcp:127.0.0.1:4415,server,nowait \
-monitor unix:/tmp/${VM_NAME}.fifo,server,nowait
Node B with VM started:
VM_IMAGE="/usr/local/virtual/img/win-xp-test-migrate.img"
VM_NAME="win-xp-test-m"
DEV0="kvm_m1"
TMPDIR="/var/tmp/" /usr/bin/kvm \
-hda $VM_IMAGE \
-net nic -net tap,ifname=${DEV},script=no,downscript=no \
-boot c \
-vnc :15 \
-usbdevice tablet \
-usb \
-snapshot \
-monitor tcp:127.0.0.1:4415,server,nowait \
-monitor unix:/tmp/${VM_NAME}.fifo,server,nowait \
-incoming tcp:172.16.253.1:9999
When I tried to migrate VM from Node A to node B with the following
command: migrate -d -b tcp:172.16.253.1:9999
migration was completed w/o errors, but VM started on node B
did not see disk ${VM_IMAGE}
As I can see using lsof tool, disk was migrated into tmp file
/var/tmp/vl.75BIcF :
lsof
<skipped>
qemu-syst 21377 root 11u REG 9,3 21478375424 4057182
/var/tmp/vl.75BIcF (deleted)
and ${VM_IMAGE} was not updated
Could you please explain me what is wrong in my configuration?
Regrads,
----------------------------------------------------------
Max Mazur
Email: sirmax@noname.com.ua
ICQ: 99610406
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Migration issue - disk image was not updated.
2011-07-18 13:08 Migration issue - disk image was not updated sirmax
@ 2011-07-18 14:39 ` Stefan Hajnoczi
2011-07-18 15:07 ` Avi Kivity
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Hajnoczi @ 2011-07-18 14:39 UTC (permalink / raw)
To: sirmax; +Cc: kvm
On Mon, Jul 18, 2011 at 2:08 PM, sirmax <sirmax@noname.com.ua> wrote:
> Node B with VM started:
>
> VM_IMAGE="/usr/local/virtual/img/win-xp-test-migrate.img"
> VM_NAME="win-xp-test-m"
> DEV0="kvm_m1"
>
> TMPDIR="/var/tmp/" /usr/bin/kvm \
> -hda $VM_IMAGE \
> -net nic -net tap,ifname=${DEV},script=no,downscript=no \
> -boot c \
> -vnc :15 \
> -usbdevice tablet \
> -usb \
> -snapshot \
> -monitor tcp:127.0.0.1:4415,server,nowait \
> -monitor unix:/tmp/${VM_NAME}.fifo,server,nowait \
> -incoming tcp:172.16.253.1:9999
The -snapshot command works by creating a temporary qcow2 image file
based on the disk image. In your case the effect is something like:
qemu-img create -f qcow2 -o backing_file=$VM_IMAGE /tmp/...
This temporary file is now your disk image. All write operations from
the guest will touch the temporary file and *not* the base image
($VM_IMAGE).
When you combine -snapshot with live migration QEMU creates the
temporary image before performing the block migration. Therefore the
block migration copies over all data into the temporary file (doh!).
Seems like a special case to me that would need to be carefully fixed
by performing snapshotting after block migration.
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Migration issue - disk image was not updated.
2011-07-18 14:39 ` Stefan Hajnoczi
@ 2011-07-18 15:07 ` Avi Kivity
2011-07-18 19:38 ` sirmax
0 siblings, 1 reply; 4+ messages in thread
From: Avi Kivity @ 2011-07-18 15:07 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: sirmax, kvm
On 07/18/2011 05:39 PM, Stefan Hajnoczi wrote:
> On Mon, Jul 18, 2011 at 2:08 PM, sirmax<sirmax@noname.com.ua> wrote:
> > Node B with VM started:
> >
> > VM_IMAGE="/usr/local/virtual/img/win-xp-test-migrate.img"
> > VM_NAME="win-xp-test-m"
> > DEV0="kvm_m1"
> >
> > TMPDIR="/var/tmp/" /usr/bin/kvm \
> > -hda $VM_IMAGE \
> > -net nic -net tap,ifname=${DEV},script=no,downscript=no \
> > -boot c \
> > -vnc :15 \
> > -usbdevice tablet \
> > -usb \
> > -snapshot \
> > -monitor tcp:127.0.0.1:4415,server,nowait \
> > -monitor unix:/tmp/${VM_NAME}.fifo,server,nowait \
> > -incoming tcp:172.16.253.1:9999
>
> The -snapshot command works by creating a temporary qcow2 image file
> based on the disk image. In your case the effect is something like:
> qemu-img create -f qcow2 -o backing_file=$VM_IMAGE /tmp/...
>
> This temporary file is now your disk image. All write operations from
> the guest will touch the temporary file and *not* the base image
> ($VM_IMAGE).
>
> When you combine -snapshot with live migration QEMU creates the
> temporary image before performing the block migration. Therefore the
> block migration copies over all data into the temporary file (doh!).
>
> Seems like a special case to me that would need to be carefully fixed
> by performing snapshotting after block migration.
>
Why? It seems to me -snapshot means "don't write into this image".
What I'd expect is that all data be written into the temporary image,
perhaps with the optimization that unchanged data is taken from the
backing file.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Migration issue - disk image was not updated.
2011-07-18 15:07 ` Avi Kivity
@ 2011-07-18 19:38 ` sirmax
0 siblings, 0 replies; 4+ messages in thread
From: sirmax @ 2011-07-18 19:38 UTC (permalink / raw)
To: Avi Kivity; +Cc: Stefan Hajnoczi, kvm
On Mon, 18 Jul 2011, Avi Kivity wrote:
> On 07/18/2011 05:39 PM, Stefan Hajnoczi wrote:
>> On Mon, Jul 18, 2011 at 2:08 PM, sirmax<sirmax@noname.com.ua> wrote:
>> > Node B with VM started:
>> >
>> > VM_IMAGE="/usr/local/virtual/img/win-xp-test-migrate.img"
>> > VM_NAME="win-xp-test-m"
>> > DEV0="kvm_m1"
>> >
>> > TMPDIR="/var/tmp/" /usr/bin/kvm \
>> > -hda $VM_IMAGE \
>> > -net nic -net tap,ifname=${DEV},script=no,downscript=no \
>> > -boot c \
>> > -vnc :15 \
>> > -usbdevice tablet \
>> > -usb \
>> > -snapshot \
>> > -monitor tcp:127.0.0.1:4415,server,nowait \
>> > -monitor unix:/tmp/${VM_NAME}.fifo,server,nowait \
>> > -incoming tcp:172.16.253.1:9999
>>
>> The -snapshot command works by creating a temporary qcow2 image file
>> based on the disk image. In your case the effect is something like:
>> qemu-img create -f qcow2 -o backing_file=$VM_IMAGE /tmp/...
>>
>> This temporary file is now your disk image. All write operations from
>> the guest will touch the temporary file and *not* the base image
>> ($VM_IMAGE).
>>
>> When you combine -snapshot with live migration QEMU creates the
>> temporary image before performing the block migration. Therefore the
>> block migration copies over all data into the temporary file (doh!).
>>
>> Seems like a special case to me that would need to be carefully fixed
>> by performing snapshotting after block migration.
>>
>
> Why? It seems to me -snapshot means "don't write into this image".
>
> What I'd expect is that all data be written into the temporary image, perhaps
> with the optimization that unchanged data is taken from the backing file.
>
> --
> error compiling committee.c: too many arguments to function
Thanks a lot for your help!
After I've removed "-snapshot" live migration was sucessfully finished!
VM migarted with about only 0.8 sec network downtime while switch re-learned
MAC-address on new port.
Regards,
-------
Max Mazur.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-07-18 19:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-18 13:08 Migration issue - disk image was not updated sirmax
2011-07-18 14:39 ` Stefan Hajnoczi
2011-07-18 15:07 ` Avi Kivity
2011-07-18 19:38 ` sirmax
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox