QCOW2

Wynona Stacy Lockwood stacy at guppylog.com
Sat Dec 21 23:53:27 UTC 2019


On Fri, Dec 20, 2019 at 5:39 AM Alfredo De Luca <alfredo.deluca at gmail.com>
wrote:

> Hi Wynona.  Thanks for that. What I want to do actually is join 2 qcow2
> onto one then boot that disk in an Openstack.
> So I was guessing if there is a qemu flag to do so.
>
> I have
> PRIMARY-DISK.qcow2
> AUXILIARY-DISK.qcow2
>
> cheers
>
>
> On Thu, Dec 19, 2019 at 11:52 PM Wynona Stacy Lockwood <stacy at guppylog.com>
> wrote:
>
>>
>>
>> On Thu, Dec 19, 2019 at 2:51 AM Alfredo De Luca <alfredo.deluca at gmail.com>
>> wrote:
>>
>>> Hi all.
>>> Just a quick one. I need to merge 2 qcow2 in one. Any idea?
>>>
>>>
>>> --
>>> *Alfredo*
>>>
>>
>> To do this cleanly, enlarge one of the qcow2 files to an
>> appropriate size, then mount both in a VM, and rsync the contents to the
>> enlarged disk. Assuming there are no collisions, you should be fine.
>>
>> Resize the image with qemu-img resize image.qcow2 +SIZE. where SIZE is
>> the size (e.g. 10G for 10 gibibytes). Do that from the KVM server when the
>> qcow2 is either unmounted, preferably with the VM in question off.
>>
>
I am unaware of that being possible, which makes sense when you think about
it. That file is a virtual disk. That means it contains all the things
you'd expect to find on a physical disk, including inodes, etc. How would
you merge that without lots of collisions in both real and metadata?
Another option of course is to create a 3rd disk that is large enough and
rsync the contents of both into that, but then you have to deal with
getting it to boot. Good luck.

-- 
Wynona Stacy Lockwood
stacy at guppylog.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20191221/210182ad/attachment.html>


More information about the ubuntu-users mailing list