Assign a static IP on Ubuntu server 20

Ubuntu 17 and later versions control the networking by a feature called “Netplan“. The configuration files are located in the /etc/netplan. Under the directory, you will find either 50-cloud-init.yaml or 00-installer-config.yaml 

Step 01: First locate the configuration file under /etc/netplan

Step 02: In my enviornment, the file is 00-installer-config.yaml. So, edit the configuration file with either nano or vim. sudo nano /etc/netplan/00-installer-config.yaml

Step 03: Update the networking configuration as appropriately. A sample configuration will look like below

network:
ethernets:
enp0s3:
dhcp4: no
addresses: [192.168.2.150/24]
gateway4: 192.168.2.1
nameservers:
addresses: [8.8.8.8, 192.168.2.1]

Step 04: Save & exit the configuration editor. And then apply the netplan configuration. sudo netplan apply

Finally, reboot the server and verify the changes by running ifconfig or ip a

Backup and restore ESXi host configuration

When you end up reinstalling the ESXi on a host system, you may need to reconfigure the host system. This involves setting up networks, storage and also the host profile. But with the ESXi host configuration backup/restore mechanism we can easily bring the host system back to the prodcution. 

Before starting the process, there are few prerequisites

  • Source and destination build numbers should be matched (similar builds are also supported | but not Major builds)
  • Host UUID must be the same.
  • Hosts must be in Maintenance mode during the backup restore operation

So, let’s see how it works. We are going to use the ESXi command line method

Backup the host configuration

First of all, we need to synchronize the configuration with the below command

vim-cmd hostsvc/firmware/sync_config

To backup the configuration, run the command vim-cmd hostsvc/firmware/backup_config

The output will look like below (* denotes the IP/FQDN of the ESXi host) | the downlodable URL is generated 

http://*/downloads/123456/configBundle-xx.xx.xx.xx.tgz

Then the backup file can be downloaded. Then will look at the restoration process.

Continue reading “Backup and restore ESXi host configuration”