[Openstack-operators] Migration Openstack Instances and cloud-init

Michael Stang michael.stang at dhbw-mannheim.de
Tue Jul 5 12:00:53 UTC 2016


Hi Hamza,
 
thank you for your answere. I learnd much about the cloud-init in this process.
 
I found now a way to config this without maipulating the cloud.cfg on the
intance directly. I start the new instance from the copied snapshot with
user-data I can inject over the "configurations" tab of a new openstack
instance. I use the following config for this:
 

#cloud-config
password: <password_default_user>
chpasswd: { expire: False }
ssh_pwauth: True
preserve_hostname: True



I think I can do some more options which may be useful, but this works fine for
me by now :-)
 
Kind regards,
Michael
 

> Achi Hamza <h16mara at gmail.com> hat am 5. Juli 2016 um 12:36 geschrieben:
> 
>  Hi Michael,
>   
>  Yes, you can comment out the modules that you don't need.
>   
>  I don't think it is a good idea to completely disable cloud-init
> functionality. If you do so, the instances wouldn't be able to automatically
> set hostnames, disk resize, SSH keys injection and more other benefits.
>   
>  If you would like to use password for authentication you need to change the
> property lock_passwd: True to lock_passwd: False under the section system_info
> in the /etc/cloud/cloud.cfg config file.
>   
>  I do not actually know what process invokes cloud-init.
>   
>  I hope the above helps.
>   
>  Regards,
>  Hamza
> 
>  On 4 July 2016 at 08:31, Michael Stang <michael.stang at dhbw-mannheim.de
> mailto:michael.stang at dhbw-mannheim.de > wrote:
>    > >    Hi Hamza,
> >     
> >    thank you for your answere. So I have to comment out the modules i don't
> > want to run when I understand this right?
> >     
> >    Why are the changes made to the instance when I start a snapshot of the
> > instance and not every time when I start the instance itself? What event
> > triggers the cloud-init to make this changes?
> >     
> >    What would happen when I remove the cloud-init package, will the instance
> > still be working and what disadventages would I have then?
> >     
> >    Thank you and kind regards,
> >    Michael
> >     
> >     
> > 
> >     > > > Achi Hamza <h16mara at gmail.com mailto:h16mara at gmail.com > hat am 2.
> >     > > > Juli 2016 um 14:30 geschrieben:
> > > 
> > > 
> > >     Hi Michael,
> > >      
> > >     You can change this behavior in the /etc/cloud/cloud.cfg config file.
> > >      
> > >     Regards,
> > >     Hamza
> > > 
> > >     On 1 July 2016 at 07:02, Michael Stang <michael.stang at dhbw-mannheim.de
> > > mailto:michael.stang at dhbw-mannheim.de > wrote:
> > >       > > > >       Hi all,
> > > >        
> > > >       I tried to copy instances (based on the ubuntu cloud image) from
> > > > our production cloud to our test cloud according to this description
> > > >        
> > > > 
> > > >      http://docs.openstack.org/user-guide/cli_use_snapshots_to_migrate_instances.html
> > > >        
> > > >       but when I start the instance on the test cloud the root password
> > > > ist resetet and it seems that the cloud-init is invoked and change the
> > > > instance like it is the first start. Is there a way to prevent this
> > > > behaviour so the instance stays unchanged when I start it on the test
> > > > cloud?
> > > >        
> > > >       Thanks and kind regards,
> > > >       Michael
> > > > 
> > > >       _______________________________________________
> > > >       OpenStack-operators mailing list
> > > >       OpenStack-operators at lists.openstack.org
> > > > mailto:OpenStack-operators at lists.openstack.org
> > > > 
> > > >      http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators
> > > >     > > > 
> > >    > > 
> >     
> >    Viele Grüße
> > 
> >    Michael Stang
> >    Laboringenieur, Dipl. Inf. (FH)
> > 
> >    Duale Hochschule Baden-Württemberg Mannheim
> >    Baden-Wuerttemberg Cooperative State University Mannheim
> >    ZeMath Zentrum für mathematisch-naturwissenschaftliches Basiswissen
> >    Fachbereich Informatik, Fakultät Technik
> >    Coblitzallee 1-9
> >    68163 Mannheim
> > 
> >    Tel.: +49 (0)621 4105 - 1367
> >    michael.stang at dhbw-mannheim.de mailto:michael.stang at dhbw-mannheim.de
> >    http://www.dhbw-mannheim.de
> > 
> > 
> > 
> > 
> > 
> >  > 

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-operators/attachments/20160705/1cf6a0e6/attachment.html>


More information about the OpenStack-operators mailing list