6 Replies Latest reply on Aug 21, 2018 1:01 PM by Ramge Ralf

    OCI: Instance not booting after beadm

    Ramge Ralf

      Hello,

       

      I am playing around with the recently offered Solaris images for Oracle Cloud Infrastructure and it seems like there's a posssible problem with the bootloader (or some other reason like the actual shutdown processes).

       

      ---8<---

      [ralf@ict-fra-dev-00-00 10-icttech]$ ssh -i keys/opc.pem opc@130.61.28.75

      The authenticity of host '130.61.28.75 (130.61.28.75)' can't be established.

      ED25519 key fingerprint is SHA256:YKk7i4ifCbeXp1OiE5OJQUPSqS6v6Gl/x20uRq2h1l8.

      ED25519 key fingerprint is MD5:32:b9:07:1f:a4:ce:dc:a4:9f:27:de:5a:b8:4c:f1:7d.

      Are you sure you want to continue connecting (yes/no)? yes

      Warning: Permanently added '130.61.28.75' (ED25519) to the list of known hosts.

      Last login: Wed Jul 25 13:24:04 2018 from 130.61.31.189

      Oracle Corporation      SunOS 5.11      Solaris_11/11.4/ON/production.build-11.4-29:2018-06-26  June 2018

      opc@ict-fra-repo-00-00:~$

      opc@ict-fra-repo-00-00:~$ sudo init 6

      opc@ict-fra-repo-00-00:~$ logout

      Connection to 130.61.28.75 closed.

      [ralf@ict-fra-dev-00-00 10-icttech]$ ssh -i keys/opc.pem opc@130.61.28.75

      ^C

      [ralf@ict-fra-dev-00-00 10-icttech]$ ssh -i keys/opc.pem opc@130.61.28.75

      Last login: Wed Jul 25 13:25:06 2018 from 130.61.31.189

      Oracle Corporation      SunOS 5.11      Solaris_11/11.4/ON/production.build-11.4-29:2018-06-26  June 2018

      opc@ict-fra-repo-00-00:~$

      opc@ict-fra-repo-00-00:~$ sudo beadm list

      BE Name Flags Mountpoint Space Policy Created

      ------- ----- ---------- ----- ------ ----------------

      solaris NR    /          2.34G static 2018-07-09 13:27

      opc@ict-fra-repo-00-00:~$ sudo beadm create solaris-beta

      opc@ict-fra-repo-00-00:~$ sudo beadm list

      BE Name      Flags Mountpoint Space  Policy Created

      ------------ ----- ---------- ------ ------ ----------------

      solaris      NR    /          2.34G  static 2018-07-09 13:27

      solaris-beta -     -          50.29M static 2018-07-25 13:28

      opc@ict-fra-repo-00-00:~$ sudo init 6

      opc@ict-fra-repo-00-00:~$

      [ralf@ict-fra-dev-00-00 10-icttech]$ time ssh -i keys/opc.pem opc@130.61.28.75

      ^C

       

       

      real    10m37.758s

      user    0m0.033s

      sys     0m0.051s

      [ralf@ict-fra-dev-00-00 10-icttech]$

      --- 8< ---

       

       

      No, the IP didn't change. No special modifications on the installation were made, but I give you the relevant part of my Packer JSON to be sure:

       

      --- 8< ---

      [...]

      "provisioners": [

          {

            "type": "shell",

            "inline": [

              "echo ***********************************************************",

              "echo *",

              "echo *           COMMENCING WITH IMAGE CUSTOMIZATION ",

              "echo *",

              "echo ***********************************************************",

              "echo === Adding Authorized Keys to OPC system account ==========",

              "echo 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDwwdTSIT+m93uwQwGhi9XdkB6rr6CYTcCXQkzTNa85W9im1LEqc8I6Vnod9HIrTXUK53QtZ8cSDJA5vv9mHqHqPJJknxRRA0sN5rTb3keSDPJ4950HxI5h3dgVcvu3jMPjiZCkWnXFrVxgWPW8jP9LcbRmtyrq1/2tfe+L9V7E8CKnQHHsvyQDvVgKdFNwywgPFY81QBsmJ+F7Sn2/MiNHj2a3Im+Q19gZ8WXuEkZUoiS6mQg8S0aJjf2szJ+l3Mc+f7IZIUbO0FAKmDwcOfnFo3SJVwcd6olLLc6wbYPzzi/c7NTAkANLVJuEzMD9eJ9qxgrmduKLYIHiv56fkZy7g+Vleho+a2A24LGlzTa/hUOqg6EmdM/b+Whpfxu/Jb9w+qkpi76/nwc1uTSJ3MTd03L/77ecnHkX+3iqezZ+d9xexfrlJZdBrl7Tkiu6UHxSXUXCER8suR9jWCrNogAP6lYF6gyzJBrINsesmXztlhW/KK+p+3QqSEzvPXPg28al6DMVE6LI19XGh9vXModoszmHtxQ8FzdI4nxWPv3xxNrMZ9vHqM8DSEpF5lnKLJIhaB7USMmzT2eu0FYWe2NW7p6tiXaedcd++fwlXAoMYeHlg1mzFtGNCXXzZSrhkyUTGMDEm03JvNViisX+v1BNf7fmHT0owC4SnHocPi4law== ralf@ict-fra-trf-01' | sudo gtee --append ~opc/.ssh/authorized_keys >/dev/null 2>&1",

              "echo === Uploading Solaris 11.4 Repository Certificate and Key ="

              ]

            },

      {

              "type": "file",

              "source": "keys/pkg.oracle.com.certificate.pem",

              "destination": "/var/tmp/pkg.oracle.com.certificate.pem"

              },

      {

              "type": "file",

              "source": "keys/pkg.oracle.com.key.pem",

              "destination": "/var/tmp/pkg.oracle.com.key.pem"

      },

      {

              "type": "shell",

              "inline": [

              "echo === Testing Network Availability ==========================",

              "#until $(nslookup --timeout=10 --retry=30  pkg.oracle.com >/dev/null); do printf '.'; sleep 1; done",

              "echo === Registering the Solaris 11.4 Repository ===============",

              "sudo pkg set-publisher -G '*' -M '*' -c /var/tmp/pkg.oracle.com.certificate.pem -k /var/tmp/pkg.oracle.com.key.pem -g https://pkg.oracle.com/solaris/beta solaris >/dev/null 2>&1",

              "sudo rm /var/tmp/pkg.oracle.com.*",

              "echo === Updating to Current SRU ===============================",

              "bash $(sudo pkg update --accept >/dev/null 2>&1)"

              ]

      },

      {

              "type": "shell",

              "inline": [

              "echo === Installing UTF-8 System Locale Support ================",

              "sudo pkg install pkg://solaris/system/locale >/dev/null 2>&1",

       

       

              "echo === Installing the Java 8 SDK =============================",

              "sudo pkg install pkg:/developer/java/jdk-8 >/dev/null 2>&1",

       

       

              "echo === Applying Finishing Touches ============================",

              "#sudo bootadm update-archive",

              "#sudo beadm create solaris-beta",

              "#sudo beadm activate solaris-beta",

              "#sudo beadm list",

              "echo ***********************************************************",

              "echo *",

              "echo *   FINISHED IMAGE CUSTOMIZATION, CREATING THE IMAGE ",

              "echo *",

              "echo ***********************************************************"

              ]

              }

      [...]

      --- 8< ---

       

      I haven't tried it with the bare metal image yet, due to a lack of time. But I'll try asap, probably tomorrow.

       

      Cheers,

       

      Ralf