Hello List, are there any best practices of how to modify cloned Linux DomUs before starting them? i.e. I have a cloned debian lenny and need logfiles truncated, /etc/hosts modified and a different ip address configured. The Main focus is to create dummy-staging-VMs for our developers by snapshotting production-VMs. There is one way of how to achieve this via filesystem access: http://support.citrix.com/article/CTX117791 but kpartx doesn''t show any mappings in my setup (XCP 0.1.1) Any other ideas? Best regards, David _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
You can create a PBD, and plug it into Dom0. Then mount the partition in Dom0. Then unmount/unplug. On 21 June 2010 13:10, David Heidt <david@kulturbeutel.org> wrote:> Hello List, > > are there any best practices of how to modify cloned Linux DomUs before > starting them? > > i.e. I have a cloned debian lenny and need logfiles truncated, > /etc/hosts modified and a different ip address configured. > > The Main focus is to create dummy-staging-VMs for our developers by > snapshotting production-VMs. > > There is one way of how to achieve this via filesystem access: > http://support.citrix.com/article/CTX117791 > but kpartx doesn''t show any mappings in my setup (XCP 0.1.1) > > > Any other ideas? > > Best regards, > > David > > > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
David Markey schrieb:> You can create a PBD, and plug it into Dom0. Then mount the partition > in Dom0. Then unmount/unplug. >Thanks a lot, that was what I was looking for! David _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Good day. I spent some time on this problem and found three separate solution: 1) Use preseed/kickstart to create new VM by automated installation 2) Configure a ''mother'' VM (wich one is cloned) with script, reading data from xenstore/pvargs and setting up system. 3) Detach vdi from cloned VM, attach it to ''master'', perform configuration, reattach back to cloned VM After few tests I decide to use 1st method, as most puristic (new ssh keys, clean history, access log, etc). And, with debian preseed it does not take too much time: about 2 minutes on gigabit link to network storage. 21.06.10, 16:10, "David Heidt" <david@kulturbeutel.org>:> Hello List, > > are there any best practices of how to modify cloned Linux DomUs before > starting them? > > i.e. I have a cloned debian lenny and need logfiles truncated, > /etc/hosts modified and a different ip address configured. > > The Main focus is to create dummy-staging-VMs for our developers by > snapshotting production-VMs. > > There is one way of how to achieve this via filesystem access: > http://support.citrix.com/article/CTX117791 > but kpartx doesn''t show any mappings in my setup (XCP 0.1.1) > > > Any other ideas? > > Best regards, > > David > > > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users > >-- wBR,George. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Mon, 2010-06-21 at 13:13 +0100, David Markey wrote:> You can create a PBD, and plug it into Dom0. Then mount the partition > in Dom0. Then unmount/unplug.Another thing you can do is mount the partitions contained within a DomU image from the host OS. That way you could script the changes that have to be made in the cloned VM. I find this less tedious than actually having to boot up the DomU in order to make changes, which has already become tiresome with only a small number of test VMs. If we start creating dozens or hundreds of production VMs, having to boot each one and make the changes manually just isn''t going to work. Here''s a good explanation of how to mount the partitions from a DomU image: http://www.campworld.net/thewiki/pmwiki.php/Linux/DiskImagesHOWTO Using this info, I wrote myself a script that automatically does the mounting, even handling LVM partitions contained within the DomU image. Now I am working on a script to automatically make the necessary changes (changing host name, network configuration, etc.). This will take some doing to get going, but if this is something you are going to have to do repeatedly over time, it might be worth the initial effort. --Greg _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
George Shuklin wrote:> Good day. > > I spent some time on this problem and found three separate solution: > > 1) Use preseed/kickstart to create new VM by automated installation > 2) Configure a ''mother'' VM (wich one is cloned) with script, reading data from xenstore/pvargs and setting up system. > 3) Detach vdi from cloned VM, attach it to ''master'', perform configuration, reattach back to cloned VM > > After few tests I decide to use 1st method, as most puristic (new ssh keys, clean history, access log, etc). And, with debian preseed it does not take too much time: about 2 minutes on gigabit link to network storage. > > >Hello George, are these Methods suitable for the XEN Cloud Platform, too? If that''s a stupid question, please excuse me - I''m fairly new to XCP and i thought every DomU-Disk is a logical volume with its own partition table. if yes, I would be glad if you''d give me some more ideas about the 1st method. Many thanks in advance and best regards, David _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users