VMware home lab

Finally, I’ve started to build my own dedicated VMware homelab. Here, I’m going to present my requirements, constraints and decisions regarding the hardware platform of my homelab.

NSX-T Manager upgrade from 2.5.3 to 3.0.3 fails at resume_other_nodes

Recently, I observed a strange behaviour during an NSX-T upgrade from version 2.5.3 to 3.0.3 at a customer. The NSX-T Manager upgrade failed for some reason while the Edge nodes and ESXi transport nodes had already been upgraded successfully.

The upgrade of the appliance was stuck and cannot proceed. Leveraging get upgrade progress-status on the upgrade orchestrator node shows that the upgrade fails at resume_other_nodes:

Trying to resume the upgrade at that step manually by executing start upgrade-bundle Vmware-NSX-unified-appliance-3.0.3.0.0.17777744 step resume_other_nodes didn’t work and resulted in the same error.

Together with GSS we then rebooted the two non orchestrator nodes and resumed the remaining steps of the upgrade manually from the CLI:

start upgrade-bundle Vmware-NSX-unified-appliance-3.0.3.0.0.17777744 step restore_datastore_cluster
start upgrade-bundle Vmware-NSX-unified-appliance-3.0.3.0.0.17777744 step update_upgrade_status
start upgrade-bundle Vmware-NSX-unified-appliance-3.0.3.0.0.17777744 step finish_upgrade

This time the upgrade finished successfully.

Automatically renew Let’s Encrypt SSL certificates on Debian

On my Debian mail server and web server, I’m using Let’s Encrypt SSL certificates to provide secure communication between clients and my mail and web services.

In this article, I’ll describe how to setup an automatic SSL certificate renewal solution.

Expand an EBS volume of an EC2 Linux instance

In the AWS EC2 console navigate to EC2 > Volumes and select the particular volume. Then select Modify volume from the Actions menu.

Set the new size and click Modify.

Since we are increasing the size of the volume, we must extend the file system to the new size of the volume. We can only do this when the volume enters the optimizing state. The modification might take a few minutes to complete.

Once the modification is completed, we log into the instance via SSH and resize the corresponding device.

Let’s verify the file system and type of the volume (in our example it is the root file system):

admin@srv:~$ df -hT
Filesystem      Type      Size  Used Avail Use% Mounted on
udev            devtmpfs  223M     0  223M   0% /dev
tmpfs           tmpfs      47M  5.6M   41M  13% /run
/dev/nvme0n1p1  ext4      8.7G  7.9G  333M  97% /
tmpfs           tmpfs     232M     0  232M   0% /dev/shm
tmpfs           tmpfs     5.0M     0  5.0M   0% /run/lock
tmpfs           tmpfs     232M     0  232M   0% /sys/fs/cgroup
/dev/nvme0n1p15 vfat      124M  278K  124M   1% /boot/efi
tmpfs           tmpfs      47M     0   47M   0% /run/user/1000

To check whether the volume has a partition that must be extended, we use the lsblk command:

admin@srv:~$ lsblk
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
nvme0n1      259:0    0   10G  0 disk
|-nvme0n1p1  259:1    0  8.9G  0 part /
|-nvme0n1p14 259:2    0    3M  0 part
`-nvme0n1p15 259:3    0  124M  0 part /boot/efi

We use the growpart command to extend the first partition:

admin@srv:~$ sudo growpart /dev/nvme0n1 1
CHANGED: partition=1 start=262144 old: size=18612191 end=18874335 new: size=20709343,end=2097148

To extend the ext4 file system on the volume, we use the resize2fs command:

admin@srv:~$ sudo resize2fs /dev/nvme0n1p1
resize2fs 1.44.5 (15-Dec-2018)
Filesystem at /dev/nvme0n1p1 is mounted on /; on-line resizing required
old_desc_blocks = 2, new_desc_blocks = 2
The filesystem on /dev/nvme0n1p1 is now 2588667 (4k) blocks long

Let’s verify the file system of the volume:

admin@srv:~$ df -hT /dev/nvme0n1p1
Filesystem     Type  Size  Used Avail Use% Mounted on
/dev/nvme0n1p1 ext4  9.7G  7.9G  1.3G  87% /

That’s it…

Ansible for VMware

Ansible provides various modules to manage VMware infrastructure, which includes datacenter, cluster, host system and virtual machine. In this session, we’re going to explore some basic tasks in this area.

Page 11 of 12

All your base are belong to us.