Skip to contentSkip to conversation

updating the base image for all clones which have been running for months

question Zhang Haoyu 3 participants 5 messages Nov 3, 2014 – Nov 7, 2014 KVM

lore
Share & tools
lore
#0 lore raw

Hi, all

I used base image A to clone so many vm,
after running for months, each vm has its own private applications and data, which maybe different from each other.
Now, I want to install some applications for all of the clones, what should I do?

Can I rebase image A to B which have the applications to be installed, then change the base image to B for all clones?
I don't think it can work, the clone images maybe corrupted latter. If the clone image's space is not enough, what will happen? Any ideas?

My bad idea is to push the applications from center to each clone's guest-agent, which is responsible to install the applications.

Thanks,
Zhang Haoyu

#1 lore raw

Am 03.11.2014 um 13:04 hat Zhang Haoyu geschrieben:

Quoted 7 lines

Hi, all

I used base image A to clone so many vm,
after running for months, each vm has its own private applications and data, which maybe different from each other.
Now, I want to install some applications for all of the clones, what should I do?

Install the applications on each clone separately, or use some other method to make it available (like installing on a shared network resource).

Quoted 2 lines

Can I rebase image A to B which have the applications to be installed, then change the base image to B for all clones?

The problem is that rebase works on the block level, not on the file system level. Changing the backing file won't produce a correctly working guest, it causes file system corruption.

Kevin

#2 lore raw

Re: [question] updating the base image for all clones which havebeen running for months

Quoted 8 lines
Quoted 7 lines

Hi, all

I used base image A to clone so many vm,
after running for months, each vm has its own private applications and data, which maybe different from each other.
Now, I want to install some applications for all of the clones, what should I do?

Quoted 4 lines

Install the applications on each clone separately, or use some other method to make it available (like installing on a shared network resource).

Could you detail "installing on a shared network resource"?

Thanks,
Zhang Haoyu

Quoted 5 lines
Quoted 2 lines

Can I rebase image A to B which have the applications to be installed, then change the base image to B for all clones?

The problem is that rebase works on the block level, not on the file system level.

Yes, this is the point.

Quoted 4 lines

Changing the backing file won't produce a correctly working guest, it causes file system corruption.

Kevin

#3 lore raw

Re: [Qemu-devel] [question] updating the base image for all clones which havebeen running for months

Quoted 7 lines · Zhang Haoyu
Quoted 7 lines
Quoted 7 lines

Hi, all

I used base image A to clone so many vm,
after running for months, each vm has its own private applications and data, which maybe different from each other.
Now, I want to install some applications for all of the clones, what should I do?

How would you do it for bare metal? Do the same for your guests.

Quoted 6 lines
Quoted 5 lines

Install the applications on each clone separately, or use some other method to make it available (like installing on a shared network resource).

Could you detail "installing on a shared network resource"?

Set up a network file system, like NFS or gluster, install your software on the shared file system, and then make each guest mount the shared file system in order to use the software. The same as you would on bare metal.

Signature · 2 lines
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org
#4 lore raw
In reply to Zhang Haoyu
Quoted 10 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

Hi, all

I used base image A to clone so many vm,
after running for months, each vm has its own private applications and data, which maybe different from each other.
Now, I want to install some applications for all of the clones, what should I do?

How would you do it for bare metal? Do the same for your guests.

For bare-metal, I use manager to push the applications to each host-agent which is running in each host, the host-agent is responsible to install the applications.

Thanks,
Zhang Haoyu

Quoted 11 lines
Quoted 6 lines
Quoted 5 lines

Install the applications on each clone separately, or use some other method to make it available (like installing on a shared network resource).

Could you detail "installing on a shared network resource"?

Set up a network file system, like NFS or gluster, install your software on the shared file system, and then make each guest mount the shared file system in order to use the software. The same as you would on bare metal.