rancher / os

Tiny Linux distro that runs the entire OS as Docker containers
https://rancher.com/docs/os/v1.x/en/
Apache License 2.0
6.44k stars 655 forks source link

failed to install rancheros on VirtualBox #88

Closed terry-fei closed 9 years ago

terry-fei commented 9 years ago

first, the rancheros-install is not exist, i pull it from /scripts/dockerimages/scripts/rancheros-install then, i use sudo rancheros-install -d /dev/sda -c ./cloud_data.yml -v v0.1.2 -t generic it show me The file /dev/sda1 is not exist and no size was specified

ibuildthecloud commented 9 years ago

Sorry about that. We're just about to cut a release of RancherOS that includes this script but we merged the README to master. So the docs are not in sync with the latest release.

retrohacker commented 9 years ago

Good to know! I thought I was loosing my mind. :smile:

cloudnautique commented 9 years ago

@ifeiteng do you have any more of the output you'd be willing to share via a gist or something? Also, did you attach a disk to the VM? What type?

ricardo-cloudster commented 9 years ago

Any ETA on the new release? Or any other way to install on vbox/vmware?

cloudnautique commented 9 years ago

@fernando-cloudster Soon!

If you are feeling adventurous: rancherio/os-installer outlines the processes.

ricardo-cloudster commented 9 years ago

Hah! here I go :D thanks!

ricardo-cloudster commented 9 years ago

Guess I'll join the OP on waiting, unless anybody got some ideas for me.

The steps to install on the disk were actually really easy, I was expecting a lot of pain :dancers:

sudo system-docker run --privileged --net=host -it --entrypoint=/scripts/set-disk-partitions rancher/os-installer:v0.1.2 /dev/sda
sudo system-docker run --privileged --net=host -it --volumes-from=user-volumes rancher/os-installer:v0.1.2 -d /dev/sda -t generic -c /opt/cloud 

and boom its installed, so I guess the issue is in my cloud-init file.

#cloud-config
users:
  - name: myuser
    passwd: $1$cccIdjm...(generated with openssl passwd -1)
    groups:
      - sudo
      - docker
      - rancher
    ssh-authorized-keys:
      - ssh-rsa AAAAB3NzaC1...(my pubkey)

any ideas on what I did wrong?

cloudnautique commented 9 years ago

@fernando-cloudster We support a limited subset of cloud-init at the moment: https://github.com/rancherio/os#cloud-init

Glad the raw container worked for you. The wrapper script adds some safety guards... like warning you its going to format/partition your disk :)

ricardo-cloudster commented 9 years ago

@cloudnautique I tried using only

#cloud-config
ssh_authorized_keys:
  - ssh-rsa aasd.. myuser@box

but what do I ssh into the box as? ssh myuser@rancherip? (tried root/rancher, no luck)

I have the feeling I should be going to sleep cause I might be missing something really stupid :)

cloudnautique commented 9 years ago

No, the process isn't documented all that well... and the guts are even less so :)

It is very particular about where the file needs to be. The wrapper will make this easier, the file needs to called: user_config.yml It needs to be in an /opt or /home path because those are sharable between the console container where the user is and system containers. So, to emulate the wrapper behavior, create -c /opt/user_config.yml

I believe what is happening, is that the file is being copied, but not being loaded because of the name... based on your command a few posts ago... it looks like your using -c /opt/cloud

If it loads, then the keys are added to the rancher user.

ricardo-cloudster commented 9 years ago

Yup, did all that, no luck for me :) I'll wait for the installer I guess. Thanks for trying @cloudnautique

ibuildthecloud commented 9 years ago

Release ETA is "very soon." You can try the rc build from releases

ibuildthecloud commented 9 years ago

As of release v0.2.1 installation to disk is now supported. It's documented at https://github.com/rancherio/os#installing-to-disk