Instances Launched from modified RHEL 9 AMIs Created from Red Hat Enterprise Linux 9 (HVM) are unreachable

0

Steps:

  1. Launch instance from Red Hat Enterprise Linux 9 (HVM), SSD Volume Type ami-026ebd4cfe2c043b2 (64-bit (x86)) / ami-03d6a5256a46c9feb (64-bit (Arm))
  2. Modify instance, add volumes, lvm2, mlocate, libnsl, selinux permissive, ulimits, etc.
  3. Create AMI from your modified instance
  4. Launch new instance from the AMI, it will never be reachable.
  5. Do this as often as you like, results are infinitely repeatable.
질문됨 일 년 전899회 조회
1개 답변
0
수락된 답변

Your problem seems to be a networking or configuration issue that occurs when you're creating a new Amazon Machine Image (AMI) from your modified Red Hat Enterprise Linux 9 (RHEL 9) instance. There are several reasons this could be happening, and I will discuss some potential causes and solutions.

  1. Networking or Security Group Configuration: Ensure that your instances are being launched in a subnet with a route to an Internet Gateway if you are trying to connect over the internet. Also, verify that the security group rules for your instance allow inbound traffic from your IP address.

  2. SSH Key Pair: Ensure you are using the correct SSH key pair that matches the one specified at the time of instance launch. If you lose the key pair, you can't connect to your instance.

  3. Selinux Configuration: You mentioned setting Selinux to permissive mode. If it's not done correctly, it might cause issues with SSH or other services on your system. You can check its status using sestatus.

  4. Firewall Settings: The firewall on your RHEL instance might be blocking incoming connections. You can temporarily disable it to see if this is causing the problem, using systemctl stop firewalld, and if this is the problem, you'll need to configure it to allow the connections you need.

  5. Service Status: Ensure that the SSHD service is running on your instance using the command systemctl status sshd.

  6. System Logs: If your instance is unreachable, you can use the EC2 Serial Console (if enabled) to troubleshoot boot issues, or review system logs.

  7. Instance Launch Configuration: When creating a new AMI, the block device mapping for the new AMI is by default the same as the original instance. This means all volumes are marked as delete on termination. If you've added EBS volumes and they're critical for the system to function, make sure to set them not to delete on termination.

  8. LVM Configuration: Ensure that the Logical Volume Manager (LVM) configuration you made doesn't interfere with the boot process. For instance, if you've added a logical volume that's needed for boot but it's not available, this could prevent the system from coming up.

To solve this issue, you might need to conduct some tests to pinpoint the problem. Try to create a new AMI without making all modifications at once, instead add one modification at a time to identify which is causing the problem.

profile picture
전문가
답변함 일 년 전
profile picture
전문가
검토됨 7달 전
  • Here's the problem, is there any way around this?

    [root@i-0a43cb45ffd8f64b9 ~]# pvdisplay Devices file sys_wwid nvme.1d0f-766f6c3030343039366661633532333465326236-416d617a6f6e20456c617374696320426c6f636b2053746f7265-00000001 PVID FSbqmMeK99fDoCldh2yxIsE1pdHqjSFf last seen on /dev/nvme1n1 not found. Devices file sys_wwid nvme.1d0f-766f6c3037613464623333656535303861616565-416d617a6f6e20456c617374696320426c6f636b2053746f7265-00000001 PVID 6REH33dfyI99OYe8J7FSeHV2er4SzSnU last seen on /dev/nvme3n1 not found. Devices file sys_wwid nvme.1d0f-766f6c3063626563366139303136643730313863-416d617a6f6e20456c617374696320426c6f636b2053746f7265-00000001 PVID S0YAIsXTRyW582344RGUVy1u6etURaUt last seen on /dev/nvme4n1 not found. Devices file sys_wwid nvme.1d0f-766f6c3066373562303334386563666436396334-416d617a6f6e20456c617374696320426c6f636b2053746f7265-00000001 PVID 8Who2LxgPnShtHm4ISNgFfTv8so1SfGE last seen on /dev/nvme5n1 not found. Devices file sys_wwid nvme.1d0f-766f6c3035643430646631643131343964306465-416d617a6f6e20456c617374696320426c6f636b2053746f7265-00000001 PVID pKR8aGnQDkvH2TalCIR4WStFHwhqpX3N last seen on /dev/nvme2n1 not found. Devices file sys_wwid nvme.1d0f-766f6c3038623139633532346636613837323461-416d617a6f6e20456c617374696320426c6f636b2053746f7265-00000001 PVID edK6cGIaQTQnw6eKpbDFreuK583CHUfj last seen on /dev/nvme6n1 not found. [root@i-0a43cb45ffd8f64b9 ~]#

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠