qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] "Hot" resizing QCow2 image using a simple python script


From: Kevin Wolf
Subject: Re: [Qemu-devel] "Hot" resizing QCow2 image using a simple python script
Date: Tue, 29 Dec 2009 21:49:30 +0100
User-agent: KMail/1.9.5

Am Dienstag, 29. Dezember 2009 14:07 schrieb Laurent Coustet:
> Hi,
> 
> I just wrote a small python script that helps resizing a QCow2 image 
> without rewriting it.
> 
> I'm sure that's not the correct way to do it, but it seems to work well.
> 
> Beware this script DO NOT SUPPORT SHRINKING !! It do not check any error 
> case, so; use at your own risks !

You need to really resize the L1 table and not just extend the l1_size in the 
qcow2 header. And don't use the script with snapshots. VM state is saved 
after the end of the virtual disk, so if you extend the disk it might overlap 
the VM state (you would need to move the VM state to make it safe with 
snapshots).

The right way would be a patch to qemu rather than an external python script 
anyway. Doing it correctly would probably even be easier this way because 
things like a function for growing the L1 table already exist.

Kevin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]