Einen Überblick über das Administrationstool KeyHelp der Keyweb AG und dessen Download gibt es auf https://www.keyhelp.de

Dieses Forum soll es interessierten Benutzern ermöglichen, sich über KeyHelp auszutauschen und Hilfe bei Problemen zu finden.

Instance not accessible after shanpshot backup and restore due to DHCP

You found a bug? Please tell us about.
Antworten
hexacube
Beiträge: 1
Registriert: Mo 27. Jul 2020, 09:48

Instance not accessible after shanpshot backup and restore due to DHCP

Beitrag von hexacube »

Problem:
A good working keyhelp instance after backup and restore using snapshot feature in GCP VM or AWS EC2 will become inaccessible in all ports like SSH (22), HTTP (80), HTTPS (443) etc.,

This is due to the restriction in DHCP which makes the instance to be accessible through original internal IP address assigned during instance creation.

Solution:
This can be solved by following the steps mentioned below. Do this in fresh / good working keyhelp installation before backup / migration.

1. Login as root user and run following commands

sudo su
cd ~
sudo nano /etc/netplan/50-cloud-init.yaml

2. Remove existing & paste the following

network:
ethernets:
ens4:
dhcp4: true
optional: true
version: 2

3. Save the file and run the following commands.

sudo netplan apply
sudo netplan try

4. Press ENTER and accept, then run the following

sudo netplan ip leases ens4

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

Now do a snapshot backup and create new instance from backup. The instance will be accesible in all ports and keyhelp will work fine just like the original instance.

This will be useful for people who needs to wish to migrate or restore instances from backups between same or different cloud providers. Thought of sharing this solution. Took me 3 days to identify the issue.

The panel was awesome. Thanks to keyhelp dev team. Kindly fix this bug in future releases too. Thank You.
Benutzeravatar
george
Beiträge: 54
Registriert: Fr 3. Jan 2020, 05:53
Wohnort: AUSTRALIA

Re: Instance not accessible after shanpshot backup and restore due to DHCP

Beitrag von george »

Hello Hexacube,
this setup will be different, for different providers.

Thanks for the tip, it is definitely worth noting for migrations. ;)
Antworten