GNS3 / gns3-registry

GNS3 devices registry
GNU General Public License v3.0
323 stars 387 forks source link

Ubuntu, CentOS and Oracle up to date cloud images are missing #718

Closed elico closed 1 year ago

elico commented 1 year ago

Currently CentOS 8 stream is the latest cloud image while in the registry the old version of CentOS is the latest. It's the same for both Ubuntu and also there is no Oracle Enterprise Linux.

It's very simple to create a gns3a template for all of these. If any help is needed let me know.

eantowne commented 1 year ago

Feel free to fork, update (or create) the appliances, and submit a PR. Keeping appliance files up-to-date for all of the appliances can be a lot of work, and the Dev team is probably more focused on GNS3 3.0, than the appliances specifically.

Please ensure that you follow the instructions in the README thoroughly. This will greatly increase the smooth merge of any PR's submitted.

elico commented 1 year ago

@eantowne I will try to follow on this. There is no need to keep everything up-to-date but once in a while it's good to make sure that things are up-to-date.

grossmj commented 1 year ago

@elico do you have any update on this? thanks :)

elico commented 1 year ago

@grossmj I will try to verify in the comming week.

elico commented 1 year ago

@grossmj I submitted a PR at: https://github.com/GNS3/gns3-registry/pull/717

The last time I updated GNS3 to 2.2.37 and updated the registry I didn't had Oracle Enterprise Linux so I assume it wasn't pushed?

grossmj commented 1 year ago

@elico sorry I missed your reply. Looks like we are missing the "Oracle Enterprise Linux" appliance file (.gns3a)

elico commented 1 year ago

@grossmj it's a cloud image with a cloud-init iso. I am not sure I understood. What can I help with this matter?

grossmj commented 1 year ago

Sorry I may have missed somthing, I understand we have to update https://github.com/GNS3/gns3-registry/blob/master/appliances/centos-cloud.gns3a and https://github.com/GNS3/gns3-registry/blob/master/appliances/ubuntu-cloud.gns3a to use the cloud images you created in your PR https://github.com/GNS3/gns3-registry/pull/717. We also need to create a gns3a template to use the Oracle cloud image. Is this correct?

elico commented 1 year ago

Probably.

From: Jeremy Grossmann @.> Sent: Sunday, May 14, 2023 8:20 AM To: GNS3/gns3-registry @.> Cc: Eliezer Croitoru @.>; Mention @.> Subject: Re: [GNS3/gns3-registry] Ubuntu, CentOS and Oracle up to date cloud images are missing (Issue #718)

Sorry I may have missed somthing, I understand we have to update https://github.com/GNS3/gns3-registry/blob/master/appliances/centos-cloud.gns3a and https://github.com/GNS3/gns3-registry/blob/master/appliances/ubuntu-cloud.gns3a to use the cloud images you created in your PR #717 https://github.com/GNS3/gns3-registry/pull/717 . We also need to create a gns3a template to use the Oracle cloud image. Is this correct? — Reply to this email directly, view it on GitHub https://github.com/GNS3/gns3-registry/issues/718#issuecomment-1546810574 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AANUHMEVMQJCQFZRD367O3DXGBTRNANCNFSM6AAAAAATHNB7VQ . You are receiving this because you were mentioned.Message ID: @.***>

grossmj commented 1 year ago

Thanks, I have updated Ubuntu and CentOS however I don't know what image to use for Oracle Linux.

elico commented 1 year ago

@grossmj the latest releases should be at:

grossmj commented 1 year ago

I have added a new Oracle Linux Cloud Guest appliance file: https://github.com/GNS3/gns3-registry/pull/764 however I could not make it work. Version 8.7 seems to boot (I could see with VNC) but then appears to be stuck, version 9.1 there is a kernel panic :(

b-ehlers commented 1 year ago

Issues on the new Oracle Linux Cloud Guest appliance:

b-ehlers commented 1 year ago

Just played a bit with cloud-init. These changes to cloud-init/oracle-cloud/user-data change the username to oracle and allows to additionally login on the serial telnet console. It's not a full serial console as the boot and kernel messages are not shown on the serial line. For that the VNC console and/or syslog are needed.

If anyone wants to dig deeper into cloud-init, see https://cloudinit.readthedocs.io/en/latest/reference/modules.html and https://cloudinit.readthedocs.io/en/latest/reference/examples.html.

diff --git a/cloud-init/oracle-cloud/README.md b/cloud-init/oracle-cloud/README.md
index e21fb7d..21e6839 100644
--- a/cloud-init/oracle-cloud/README.md
+++ b/cloud-init/oracle-cloud/README.md
@@ -3,7 +3,6 @@
 Generated using the following commands:

-printf "#cloud-config\n\npassword: oracle\nchpasswd: { expire: False }\nssh_pwauth: True\n" > user-data printf "instance-id: oracle-cloud\nlocal-hostname: oracle-cloud\n" > meta-data mkisofs -output oracle-cloud-init-data.iso -volid cidata -joliet -rock user-data meta-data

diff --git a/cloud-init/oracle-cloud/user-data b/cloud-init/oracle-cloud/user-data
index 26d25a8..3eaf6fb 100644
--- a/cloud-init/oracle-cloud/user-data
+++ b/cloud-init/oracle-cloud/user-data
@@ -1,5 +1,18 @@
 #cloud-config

-password: oracle
-chpasswd: { expire: False }
 ssh_pwauth: True
+
+# Modified default_user from /etc/cloud/cloud.cfg.d/90_ol.cfg
+users:
+  - name: oracle
+    plain_text_passwd: oracle
+    lock_passwd: false
+    gecos: Cloud User
+    groups: [adm, sytemd-journal]
+    sudo: ["ALL=(ALL) NOPASSWD:ALL"]
+    shell: /bin/bash
+
+# Enable serial login
+runcmd:
+  - [ systemctl, start, "serial-getty@ttyS0.service" ]
+  - [ systemctl, enable, "serial-getty@ttyS0.service" ]

Of course, the cloud-init/oracle-cloud/oracle-cloud-init-data.iso needs to be regenerated.

To solve the boot issue for v9.1, I added the option -cpu host to the appliance file:

diff --git a/appliances/oracle-linux-cloud.gns3a b/appliances/oracle-linux-cloud.gns3a
index 3c0adbe..5271bd5 100644
--- a/appliances/oracle-linux-cloud.gns3a
+++ b/appliances/oracle-linux-cloud.gns3a
@@ -23,7 +23,7 @@
         "console_type": "telnet",
         "boot_priority": "c",
         "kvm": "require",
-        "options": "-nographic"
+        "options": "-cpu host -nographic"
     },
     "images": [
         {

Furthermore the changed size and md5sum of the oracle-cloud-init-data.iso needs to be adapted.

grossmj commented 1 year ago

@b-ehlers thanks for clearing those last hurdles :+1: I will update the PR soon.

b-ehlers commented 1 year ago

By replacing the runcmd section of cloud-init/oracle-cloud/user-data by the following the telnet console gets a full featured console starting with the second boot of the VM. On the inital boot the telnet console is still for login only, boot and kernel message are not shown.

I have no strong opinion, what is the preferable configuration. It's up to the maintainer to make the decision 😄.

runcmd:
  - [ systemctl, start, "serial-getty@ttyS0.service" ]
  - [ grubby, --update-kernel=ALL, "--args=console=tty0 console=ttyS0,115200" ]
  - [ grub2-mkconfig, -o, /etc/grub2.cfg ]
grossmj commented 1 year ago

Thanks, I have updated https://github.com/GNS3/gns3-registry/pull/764 and both version 8.7 and 9.1 work well now :+1: