How to make login and everything else persistant.?

After installing on a VM I’m able to login with my rsa_id no problem, but after a reboot the OS boots to a different login screen and i can no longer ssh into the box.

What needs to be configured so i can just log in and all my changes will be persistent after i log out?

How do you configure the login and service setting to be persistent. The documentation says in order to have console changes take effect I must reboot, after rebooting I’m locked out. The documentation also mentions saving a login password in the cloug-config with your ssh keys but i cant find any examples of the proper format for saving login passwords?

Obviously I need help/advice/links/ in order to configure RancherOS to the point where changes are saved and persistant. Any advice would be really appropriated.

Sorry if this has already been asked and answered, i really don’t like to bug anyone for help with this sort of thing but I’ve been at it for two days and still nothing. So I figured I should either just quit all together or ask for some guidance.

Thanks for any advice/links/help everyone


1 Like

This may not be exactly the answer you are looking for, but here is a link to persisting data (during upgrades) :

By default, Rancher uses it’s own MySQL DB within the rancher-server container. When the container gets restarted, the data in that DB will be lost.

You can do two things to get around this:

  • mount the DB volume
  • use an external DB

Documentation on how to do both of those are in the docs:

Ok, thanks for the advise guys.

If you get a chance and your feeling generous can you share your cloud-config.yml or rancher.yml files with us? I think my main problem is the initial configuration of those two files, becuase after I log out of my first ssh login session the next time I try to log in the login screen is different and my rsa_id doesn’t work. What needs to be in the cloud-config.yml besides the ssh-rsa public key? I was hoping Denise would educate me on the how to configure the yml files properly but hes probably busy dealing with bigger issues.

Anyone willing to share their cloud-config.yml and rancher.yml or even some examples of what’s typical configured in those file would be doing myself and the forum a great service. It would also help clean up the forum a bit by cutting down in random post about install/config. I looked threw the whole forum before posting any questions and didn’t find a single example of proper cloud-config.yml and what needs to be in the file in order to configure RancherOS properly. I’ve read all the documentation and its kind of hit or miss. References to commands and other info that no longer relivent and other info reffering to future features without stating they’re no currently suported.

Anyways, I can’t wait to get up and running on RancherOS, fedora-atomic is nice but I’ve got big plans for RancherOS/RancherVM/Rancher.


@chinch: Both @tdensmore and @philpowell are providing documentation/advice on how to get the persistent data in Rancher, but from what I read, you’re looking on how to do it for RancherOS.

If you’re using v0.3.3, there was no persistent console, which may be part of the issue you are facing, but I don’t think so. We are really close to releasing v0.4.0 of RancherOS, which is a HUGE refactoring and will hopefully improve the user experience and usability of Rancher OS.

With that being said, a simple cloud-config.yml for RancherOS should allow you to log in to Rancher if you pass it in either using user-data or during rancheros-install


Some basic questions I need to understand to help you troubleshoot a bit more:

  • When you say "install on VM and log in with your rsa_id, that sounds like you ran rancheros-install with a cloud-config and were able to ssh in. Can you confirm that or did you log in using the rancher/rancher username/password?
  • Where are you installing your VM? Note: RancherOS doesn’t support additional users/passwords, it’s really only the rancher user and any SSH keys that you add to it. So I’m not too sure where you might have read about login passwords as I would like to update the RancherOS docs if you read that.

Password login works if you boot from iso / ipxe and could be set as kernel param

kernel ... rancher.password=rancher

During install you have to set pubkeys with the cloud-config file! If pubkeys are missing you can boot from iso / ipxe and reconfigure / reinstall RancherOS with the login above (rancher / rancher).

Hi Denise, thanks for the reply! I know you’ve got to be awfully busy over there and I really appriatiate the help. Your were right they were linking info for rancher, i knew that and disregaurded. I’m also sorry to bug you with my issues installing.

Here’s where I’m at:

  1. boot rancherOS iso in VM

  2. log in with rancher/rancher

  3. scp the cloud-config.yml that I created only containing ssh-rsa public key

  4. install to disk with rancher-install -f -c cloud-config.yml -d /dev/sda

  5. reboot VM post install

  6. ssh into VM running fresh install of rancherOS with 'ssh -i /path/to/ssh/id_rsa rancher@

Now I’m logged in to the new install and everything great, but I think I need additional network configuration because after a reboot rancherOS boots with a “cleaner” boot sequence and login screen that I’ve never seen before. When I try to ssh I again its not accepted and as expected I can’t login with rancher/rancher because thats no longer hard coded into the OS.

I’ve been digging around most of the day and found a few examples of people including all of their desired network config in the initial cloud-config.yml. I’m also wondering if I should use the write_to_disk option and write my cloud-config.yml to disk and possible all of my network config the first time I ssh into the box?

Any help/advice would be amazing and if you don’t get around to it I understand. You guys sure must be busy over there inventing all this future tech. Highly anticipating the V4 realease.

Thanks again Denise!

Hey Denise, I just got a chance to attempt another install. I included my network config details along with my ssh-rsa keyin the initial cloud-config.yml that and it worked beautifly! Im up and running and reboots no longer permanently lock me out, couldnt be happier!!

Here’s what my cloud-config.yml looks like in case anyones interested:

  - ssh-rsa xxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

hostname: rancher

        dhcp: false
        mtu: 1500

Must have been some wonkey network issues on my end, probably a dhcp issue. Thanks for all your help and advice!!!


The yaml format of my cloud-config.yml didnt translate very well in my example above but im sure anyone interested can figure it out from here. If not or your struggling like I was feel free to write me and ill do what i can to help.

@chinch Edited your post to fix it… You can put pre-formatted content into forum posts by adding 3 backticks before and after the content, or using the </> button in the toolbar of the text field.

Wow, that looks great!

Thanks for the tip, that will come in very handy!!