[ovirt-users] cloud-init and sealing of template

Shahar Havivi shaharh at redhat.com
Wed Dec 2 08:01:50 UTC 2015


On 02.12.15 08:43, Gianluca Cecchi wrote:
> On Wed, Dec 2, 2015 at 8:18 AM, Shahar Havivi <shaharh at redhat.com> wrote:
> 
> > On 01.12.15 17:26, Gianluca Cecchi wrote:
> > >
> > > OK, I'm trying using classic network instead of NetworkManager.
> > > But right before running the "make template" action, do I have to run any
> > > of "sys-unconfig" and/or "virt-sysprep" tools?
> > No you don't need to run this tools.
> >
> 
>  OK. Understood.
> 
> 
> 
> > >
> > > It remains open the question about how to properly seal a RHEL 7 /
> > CentOS 7
> > What do you mean by sealing?
> >
> >
> I mean what are the correct modifications t apply to the OS, before makeing
> it a template and then create a VM from that template using cloud-init.
> For example:
> a NetworkManager enabled configuration for ifcfg-eth0 file is somethng like
> that on RH EL 7:
> 
> TYPE=Ethernet
> BOOTPROTO=none
> DEFROUTE=yes
> IPV4_FAILURE_FATAL=no
> IPV6INIT=no
> IPV6_AUTOCONF=yes
> IPV6_DEFROUTE=yes
> IPV6_PEERDNS=yes
> IPV6_PEERROUTES=yes
> IPV6_FAILURE_FATAL=no
> NAME=eth0
> UUID=5a656c34-e4ba-44a1-8079-d2c797e6a8f4
> DEVICE=eth0
> ONBOOT=yes
> IPADDR=10.4.4.29
> PREFIX=24
> GATEWAY=10.4.4.250
> DNS1=10.4.1.11
> DNS2=10.4.1.12
> DOMAIN="mysearchdomain1.com mysearchdomain2.com"
> 
> While an old style (managed by classic "network" service) entry sholud be
> something like:
> 
> DEVICE=eth0
> TYPE=Ethernet
> BOOTPROTO=static
> ONBOOT=yes
> IPADDR=10.4.4.29
> PREFIX=24
> GATEWAY=10.4.4.250
> 
> Do I have to make any modification in both case to ifcfg-eth0 just before
> making template or should I leave the original VM values inside?
> Does cloud-init provided by oVirt with the values I put inside the GUI
> during VM creation replace files using something like "sed" command or does
> it run any network-config operating system commands?
> Gianluca
You are using a static IP which can be a problem on creating multiple VMs.
In this case you will need to run cloud-init on each created VM with a new
static IP or DHCP.





More information about the Users mailing list