I’m not familiar with KVM, but on XenServer with NFS shared storage what I see is the following which may explain what you are seeing.
When I first use a template it is copied over from secondary to primary and the root disk for my new instance is created as a differencing VHD pointing to the template copy as the parent. All other instances that use that same template will simply create new child VHD files pointing to the original parent VHD. Assuming qcow2 files in CS with KVM are used in the same way, I think this may explain what you are seeing. With VHDs I can use the vhd-util command to scan files and see the parent child relationships. With qcow2 files give "qemu-img info" a try to see if it will give you similar info on the files in your primary store. Cheers, -Carlos On Aug 18, 2014, at 6:14 PM, Ivan Rodriguez <[email protected]> wrote: > Hi there, > > > One of our templates in secondary storage needs some minor changes, > I was able to track down the path from the secondary storage getting the > reference from > vm_template (unique_name) > > > Then look for the template id on the properties > > find . -name "*.properties" -exec grep -il > "2d1f46882-755a-3239-a9b8-019eca89e86b" {} \; > > I believe I have the right qcow2 image when I open it up with guestfish > I can see that is actually my template so I do my changes save the image > then provision a new vm from that template and my changues are not there so > I'm wondering if cloudstack is copying the template from secondary storage > into primary storage for fast provisioning. > > > Later on I bump into the script createvm.sh which is basically using > qemu-img to create the new root disk I've been checking this process and I > can't figure out who is actually provisioning the new root disk. > > I don't think is the secondary storage since it doesn't look like its > mounting primary storage, and also on the compute hypervisor side > it doesn't look like its mounting the secondary storage to copy the > template. > > Any advise will be really appreciate it. > > Also is there a place where internal process for cloudstack are explained ? > or you gotta jump in the source code and try to figure it out ? > > Pd. I know I can destroy the template and upload it again with the changes > but it would be nice if I can understand the cloudstack process. > > > Thanks in advance > Ivan
