9 Replies Latest reply on Jan 23, 2017 3:43 PM by A L

    Getting Started

    A L Newbie

      Hi,

       

      I'm trying to get started with Openshift/Origin/Kubernetes.  I've downloaded `cdk-2.2.0.zip` and `rhel-cdk-kubernetes-7.2-29.x86_64.vagrant-virtualbox.box` from developers.redhat.com.

       

      When I try to vagrant up after the installation, I get stuck on "Configuring and enabling network interfaces...":

      me:~/cdk/components/rhel/rhel-ose $ vagrant up

      Bringing machine 'default' up with 'virtualbox' provider...

      ==> default: Importing base box 'cdkv2'...

      ==> default: Matching MAC address for NAT networking...

      ==> default: Setting the name of the VM: rhel-ose_default_1476736433516_4922

      ==> default: Clearing any previously set network interfaces...

      ==> default: Preparing network interfaces based on configuration...

          default: Adapter 1: nat

          default: Adapter 2: hostonly

      ==> default: Forwarding ports...

          default: 22 (guest) => 2222 (host) (adapter 1)

      ==> default: Running 'pre-boot' VM customizations...

      ==> default: Booting VM...

      ==> default: Waiting for machine to boot. This may take a few minutes...

          default: SSH address: 127.0.0.1:2222

          default: SSH username: vagrant

          default: SSH auth method: private key

          default: Warning: Remote connection disconnect. Retrying...

          default:

          default: Vagrant insecure key detected. Vagrant will automatically replace

          default: this with a newly generated keypair for better security.

          default:

          default: Inserting generated public key within guest...

          default: Removing insecure key from the guest if it's present...

          default: Key inserted! Disconnecting and reconnecting using new SSH key...

      ==> default: Machine booted and ready!

      ==> default: Registering box with vagrant-registration...

          default: Would you like to register the system now (default: yes)? [y|n]y

          default: username: me@email.com

          default: password:

      ==> default: Registration successful.

      ==> default: Checking for guest additions in VM...

          default: No guest additions were detected on the base box for this VM! Guest

          default: additions are required for forwarded ports, shared folders, host only

          default: networking, and more. If SSH fails on this machine, please install

          default: the guest additions and repackage the box to continue.

          default:

          default: This is not an error message; everything may continue to work properly,

          default: in which case you may ignore this message.

      ==> default: Configuring and enabling network interfaces...

       

      Any ideas how I can troubleshoot this?

       

      Thank you in advance for your time.

        • 1. Re: Getting Started
          Praveen Kumar Newbie

          Can you please provide some more details like which version of vagrant you are using and also run vagrant in debug mode so we can get some more data when it stuck there.

           

          To run vagrant in debug mode use below command.

          $ VAGRANT_LOG=debug vagrant up

          • 2. Re: Getting Started
            A L Newbie

            Thanks @kkumarpraveen.nitdgp, I didn't know how to view the vagrant logs.

             

            I'm on VirtualBox 5.0.24 r108355

             

            And here's the vagrant output with debug mode on:

             

            ==> default: Configuring and enabling network interfaces...                                                                                                                                                                       [0/2823]

            DEBUG ssh: Checking whether SSH is ready...

            DEBUG ssh: Re-using SSH connection.

            INFO ssh: SSH is ready!

            DEBUG ssh: Re-using SSH connection.

            INFO ssh: Execute:  (sudo=false)

            DEBUG ssh: Exit status: 0

            DEBUG guest: Searching for cap: configure_networks

            DEBUG guest: Checking in: redhat

            DEBUG guest: Found cap: configure_networks in redhat

            INFO guest: Execute capability: configure_networks [#<Vagrant::Machine: default (VagrantPlugins::ProviderVirtualBox::Provider)>, [{:type=>:static, :adapter_ip=>"10.1.2.1", :ip=>"10.1.2.2", :netmask=>"255.255.255.0", :auto_config=>true, :interface=>1}]] (redhat)

            DEBUG ssh: Checking whether SSH is ready...

            DEBUG ssh: Re-using SSH connection.

            INFO ssh: SSH is ready!

            DEBUG ssh: Re-using SSH connection.

            INFO ssh: Execute:  (sudo=false)

            DEBUG ssh: Exit status: 0

            DEBUG guest: Searching for cap: network_scripts_dir

            DEBUG guest: Checking in: redhat

            DEBUG guest: Found cap: network_scripts_dir in redhat

            INFO guest: Execute capability: network_scripts_dir [#<Vagrant::Machine: default (VagrantPlugins::ProviderVirtualBox::Provider)>] (redhat)

            DEBUG ssh: Checking whether SSH is ready...

            DEBUG ssh: Re-using SSH connection.

            INFO ssh: SSH is ready!

            DEBUG ssh: Re-using SSH connection.

            INFO ssh: Execute:  (sudo=false)

            DEBUG ssh: Exit status: 0

            DEBUG guest: Searching for cap: network_interfaces

            DEBUG guest: Checking in: redhat

            DEBUG guest: Checking in: linux

            DEBUG guest: Found cap: network_interfaces in linux

            INFO guest: Execute capability: network_interfaces [#<Vagrant::Machine: default (VagrantPlugins::ProviderVirtualBox::Provider)>] (redhat)

            DEBUG ssh: Re-using SSH connection.

            INFO ssh: Execute: /sbin/ip -o -0 addr | grep -v LOOPBACK | awk '{print $2}' | sed 's/://' (sudo=true)

            DEBUG ssh: Exit status: 0

            DEBUG network_interfaces: Unsorted list: ["eth0", "eth1", "docker0"]

            DEBUG network_interfaces: Sorted list: ["docker0", "eth0", "eth1"]

            DEBUG ssh: Uploading: /var/folders/kj/nmdc7rln5yn7ttzt8csdnn_00000gn/T/vagrant-redhat-configure-networks20161018-4524-151zwi7 to /tmp/vagrant-network-entry-eth0-1476809310-0

            DEBUG ssh: Re-using SSH connection.

            DEBUG ssh: Re-using SSH connection.

            INFO ssh: Execute: # Down the interface before munging the config file. This might

            # fail if the interface is not actually set up yet so ignore

            # errors.

            /sbin/ifdown 'eth0' || true

             

            # Move new config into place

            mv '/tmp/vagrant-network-entry-eth0-1476809310-0' '/etc/sysconfig/network-scripts/ifcfg-eth0'

             

            # Bring the interface up

            ARPCHECK=no /sbin/ifup 'eth0'

            (sudo=true)

            DEBUG ssh: Sending SSH keep-alive...

            DEBUG ssh: Sending SSH keep-alive...

            DEBUG ssh: Sending SSH keep-alive...

            DEBUG ssh: Sending SSH keep-alive...

            DEBUG ssh: Sending SSH keep-alive...

            DEBUG ssh: Sending SSH keep-alive...

            DEBUG ssh: Sending SSH keep-alive...

            DEBUG ssh: Sending SSH keep-alive...

            DEBUG ssh: Sending SSH keep-alive...

             

            Thank you for your help!

            • 3. Re: Getting Started
              Praveen Kumar Newbie

              Hi,

               

              I tried to reproduce your issue using same version of virtualbox but it's working as expected for me. Another thing comes to my mind is

               

              1. Destroy your running vm using vagrant and then remove '.vagrant' directory which have configuration to old vm's.

              2. If you recently updated your vagrant then you might have to destroy everything in $HOME/vagrant.d/ which will remove all the plugins and config so you can have everything from fresh environment.

               

              ```

              $ rpm -qa | grep Virtual

              VirtualBox-5.0-5.0.24_108355_fedora24-1.x86_64

              ```

              • 4. Re: Getting Started
                A L Newbie

                Thanks for the help kumarpraveen.nitdgp.  I tried removing cdk/components/rhel/rhel-ose/.vagrant/ and ~/.vagrant/, but same issue.

                 

                Just in case, these are the commands I used:

                vagrant destroy

                cd ~/cdk/components/rhel/rhel-ose/

                rm -rf .vagrant/

                mv ~/.vagrant.d/ ~/.vagrant.delete.d/

                cd ~/cdk/plugins/

                vagrant plugin install   ./vagrant-registration-*.gem   ./vagrant-service-manager-*.gem   ./vagrant-sshfs-*.gem

                vagrant box add --name cdkv2 ~/Downloads/rhel-cdk-kubernetes-7.2-29.x86_64.vagrant-virtualbox.box

                vagrant up

                 

                Also, I'm on a Mac.

                 

                I'll try and update Virtualbox and see if that helps any.

                 

                Thanks again for your time!

                • 5. Re: Getting Started
                  A L Newbie

                  Hey kumarpraveen.nitdgp, I've upgraded to 5.0.28 r111378, but am still having the same problem.

                   

                  I've tried install the vagrant-vbguest plugin and messing with the ssh-agent, but still no dice.

                   

                  I want to try install the virtual box guest additions manually, but cannot login through the GUI (vagrant ssh fails).  Do you happen to know the user credentials of the rhel-cdk login?

                   

                  Thanks again for your help!

                  • 6. Re: Getting Started
                    Mark Zischke Newbie

                    I'm using Centos 7 and VirtualBox 5.0.26 and am stuck at exactly the same place:

                      Configuring and enabling network interfaces..

                     

                    Everything else looks ok.  I'm using a brand new userid (cdk) to test this out, so nothing is left around with vagrant or virtualbox.

                    Virtualbox says the VM exists.  'vagrant status' says the VM is there.  There is a route created to 10.1.2.0 according to the route command.

                    However, I can't do a 'vagrant ssh' or an ssh to 10.1.2.2.   However, something is responding at 10.1.2.1.

                     

                    Would appreciate any help - thanks

                    • 7. Re: Getting Started
                      A L Newbie

                      Adding to that...I tried on Ubuntu 16.04.1 and the issue still exists.  I think it's a Vagrant/ssh configuration somewhere, but I'm not familiar enough to figure it out.

                      • 8. Re: Getting Started
                        Chris Lewis Newbie

                        I am getting the same behavior trying to run CDK 2.2 on my Mac running MacOS 10.12.1. I've reinstalled VirtualBox 5.0.28 and Vagrant 1.8.6 (removing .vagrant* directories).

                         

                        I have also tried to find manually install virtual box guest additions, but I haven't been successful.

                        vagrant ssh fails, but I am able to login to rhel-cdk using the credentials vagrant/vagrant.

                         

                        Not sure what to try next. Might try running in docker:

                        https://blog.switchbit.io/openshift-cluster-up-with-docker-for-mac/

                        • 9. Re: Getting Started
                          A L Newbie

                          In case it helps anyone else, someone told me to upgrade vagrant to 1.9.1 and everything worked.  I verified it on Mac OSX.