How to remove a dead vCenter Linked Mode

If you have a vCenter that was dead, removed, or only not in use anymore but was in linked mode, you will receive warnings every time you open the master vCenter, so in this blog post, we will explain how to remove a dead vCenter Linked Mode.

Has we can see in the next image, in one part, we have the warning regarding an old vCenter that is set to linked mode with this vCenter, but in the next, in the Linked vCenter Server Systems tab, we don’t any vCenter added, and the list is empty.

Warnings

How to remove a dead vCenter Linked Mode

In this case, it was an old vCenter that was never removed, and the master was upgraded some times until version 6.7, but always had this dead link attached to it.

Login to your vCenter console to check what links or registers are enabled to this vCenter.

How to remove dead vCenter Linked Mode.

First, we check if this vCenter has an external PSC using: /usr/lib/vmware-vmafd/bin/vmafd-cli get-ls-location –server-name localhost

Next, is to list all the nodes that are register in this vCenter using: /usr/lib/vmware-vmafd/bin/dir-cli nodes list

sso-user@vcenter [ ~ ]$ /usr/lib/vmware-vmafd/bin/dir-cli nodes list
Enter password for administrator@vsphere.local:
Node: vcenter.york.local
Type: PSC
Site: default-site
Partner #1: ldap://192.168.2.32

Node: 192.168.2.32
Type: PSC
Site: Default-First-Site
Partner #1: ldap://vcenter.york.local
 
root@vcenter [ ~ ]#

As we can notice, the vCenter (vcenter.york.local) that we have a warning is still listed in the nodes. So we need to remove that node from the vCenter and break the linked mode between this vCenter and the dead one.

Next, we need to run the command to unregister this vCenter, using: cmsso-util unregister –node-pnid 192.168.2.32 –username administrator@vsphere.local

Note: Before running this command, beware that this will restart your vCenter services, and vCenter will be unavailable during the process.

root@vcenter [ /var/lib/sso-user ]# cmsso-util unregister --node-pnid 192.168.2.32  --username administrator@vsphere.local
Password:
Solution users, computer account and service endpoints will be unregistered
2021-12-05T16:25:23.263Z  Running command: ['/usr/lib/vmware-vmafd/bin/dir-cli', 'service', 'list', '--login', 'administrator@vsphere.local']
2021-12-05T16:25:23.310Z  Done running command
Stopping all the services ...
All services stopped.
Starting all the services ...
Started all the services.
Success
 
root@vcenter [ ~ ]#

Check again the vCenter node list and the vCenter is removed.

sso-user@vcenter [ ~ ]$ /usr/lib/vmware-vmafd/bin/dir-cli nodes list
Enter password for administrator@vsphere.local:
Node: vcenter.york.local
Type: PSC
Site: default-site
 
root@vcenter [ ~ ]#

For the safe side, I rebooted the vCenter, and now the warning is gone, and all is green.

I found this information helpful when rectifying my own issue with a stall vCenter linked environment. Credit to Luciano Patrao.

Toggling the vCenter Server Appliance default shell

Switching the vCenter Server Appliance 6.x to BASH Shell

  1. Log in to the vCenter Server Appliance through SSH.
  2. Run this command to enable access the Bash shell:

    shell.set –enabled true
     
  3. Type shell and press Enter.
  4. In the temporary BASH shell, run this command to permanently configure the default Shell to BASH for Root:

    chsh -s /bin/bash root
     
  5. Log out from the BASH Shell.
  6. Log in again for the changes to take effect.

MDT Error 0xc0000001

In the midst of attempting to deploy out a new Windows Server 2019 installation I came across a new issue. As mentioned in the title of this quick block. My remote virtual machine posted the error 0xc0000001 which was odd since I was able to PXE call from my onsite domain controller (DC02) and start to load the boot file config.

After some research and a few cups of coffee I found that the resolution to this issue was the Enable Variable Windows Extension. To fix this follow the instructions below…
1. Open your Windows Deployment Services app or WDS
2. Right click on your WDS server in the left pane
3. Left click on Properties
4. Click on the TFTP tab within the properties window
5. Uncheck Enable Variable Windows Extension
6. Lastly Reboot your WDS Server

If you followed all the steps above correctly you should be able to PXE boot your VM from MDT now. Enjoy!


Clone A VM On vCenter 6.7

Cloning a virtual machine can come in pretty handy… Especially when you need to troubleshoot or tinker with an existing virtual machine you might just not know enough about or a previous admin didn’t document. All Admins ~ “Please DOCUMENT DOCUMENT DOCUMENT!”.
For this article, I’m going to show you step by step on how to create a clone of a virtual machine and disable the virtual NIC.

Accessing The VMware vCenter

Open any browser of your choosing (IE11, Edge, Chrome, Firefox) and enter the vCenter DNS name of your system in the URL bar for the browser.

URL for vCenter

If you’ve enter all the above information correctly. You will be prompted with a Getting Started page. Click on Launch vSphere Client (HTML5). Next, you’ll want to enter the information to access the vCenter administrative console. This section, again, can vary depending on your setup. For my case, I have SSO enabled with a IT Security group. So, I’ll enter in my domain credentials and sign in.

Cloning Virtual Machine

This should be a given but confirm you have enough resources to clone the virtual machine of your choosing or the other hosts in the cluster do.

I chose the Development – SQL19 server I have running in my development vlan. By right clicking on that virtual machine I now have a slew of options, one being the clone option… click on clone. Click Clone to Virtual Machine.
You’ll want to select

Select the datastore that best suites your needs or environment.

Check the following boxes:
* Customize this virtual machine’s hardware
* Power on virtual machine after creation

Disconnect the NIC from the vSwitch by click on the check box next to Network Adapter 1. If you have multiple NIC’s you’ll want to repeat the process.

Lastly, Clicking on the next button in the task above will start to process the cloning of the virtual machine. When the cloning is initiated you’ll see the process below in the Recent Tasks section of vCenter.



How To Update Ubuntu through CLI

In this tutorial I will demonstrate how to update Ubuntu for the server version. I will also explain the difference between apt update and apt upgrade, along with a few other things you should know about updates in Ubuntu Linux.

If you are new to Ubuntu or any other Linux operating system, you might be wondering how to update your Ubuntu system for important – security patches, bug fixes and application upgrades.

Updating Ubuntu can be very simple. For a vanilla or fresh installation of Ubuntu its very simple to issue an update command in the command line.

In the terminal, you just have to use the following command:

sudo apt update && sudo apt upgrade -y
Enter your account password

As noted in the code above, you may be asked for a password depending on your permission level. If you are not in “root mode” yet you can use your account’s password to elevate yourself temporarily. You won’t see characters on the screen while typing password in the terminal, so keep on typing your password and hit enter.

That was pretty easy, wasn’t it? Let’s talk about the commands and what they do.

Technically the one line of code is not a single command, it’s a combination of two commands. The && is a way to run multiple commands in Linux in at one time.

The -y in the end automatically enters yes when the command issued asks for your confirmation before installing updates.

Note that you can also use the two commands separately, as seen below, one by one:

Sudo su
Enter Password
Apt-get update
Apt-get upgrade

It will take a little longer, because you have to wait for one command to finish and then enter the second command.

More than just OS updates

Unlike Windows,  Linux works with a package manager. When you run the updates, it updates all the packages installed via apt. This means updating Ubuntu will update the core operating system, Linux kernels as well as the applications installed from the software center (if they were apt packages) or installed using apt command.

Install Windows Server 2019

After the ISO loads on your physical or virtual server. Follow the instructions below to install the operating system.

Click on Install Now

Select your version that you’d like to install. Mine is a little different since its a custom ISO for Vultr.

Accept the terms and conditions for the installation.

For this lab, select the Custom: Install Windows only (Advanced)

Choose the disk that you’ve assigned to the virtual machine or select the only one that is available.

Allow Windows to install on the disk until completed.

After the installation completes you should be prompted to create a password for the local account. As usual, choose a good password.


Software That’s Running My Homelab

Software And Virtual Machines

Geographically… We’ll be starting with my “Annville” location. A nice thing to note for a later upcoming blog is that the Annville and York sites are 55 miles from each other which is technically okay for a DR (Disaster Recovery) especially with it being in a mountainous area.

Annville:

Plex
This is a Ubuntu 18.04 LTS virtual machine with Plex running as a dedicated service. I’ve added some other functions to this virtual machine to help in my automation task to create less repetitive work which is keeping the service up-to-date. I’ve also setup the server to connect via fstab to the YKGE server since that serves some folders connected to my Google GSuite account. To keep things a little more secure… all the data goes through the IPSec tunnel. It keeps the tunnels up so its worth it. I don’t permit external users on my server.
BlueIris
This is a local security system for my secondary remote server cabinet. I maintain cameras internally and externally for the house. All of the cameras used are Dahua rebrands of Amcrest. I’ve linked Blue Iris if you want to learn more about BlueIris

Seedbox
I use this machine to host publicly available open-source software to hopefully put a small dent on the map for the non-profits that host them.
Veeam
I use this to backup… basically all of the virtual machines shown below. I’ll go into further detail in another blog post. I don’t backup virtual machines like VCSA, WordPress (Dev box), etc. For this application, I do use and renew every year under the NFR licensing that I am grateful for.


YKDC1
This virtual machine used to be on the 192.168.4.12 server but with how VMware shares resources I decided for best practice to move this virtual machine to the Annville location. This server hosts DC, DHCP, DNS, AD CS, IIS, and NPAS
YKGE
This only runs stablebit for GSuite and print services across my IPSec tunnels.

York

Host: 192.168.4.12 (R710)
This physical server has been turned off at the time of writing to reduce consumption of power at my home.

Host:192.168.4.13 (R720)
DMS(SeedDMS)
A light-weight server that runs on a Ubuntu OS to host all scanned documents; I have decommissioned this for now as I evaluate others
Bookstack
I use this often to make up my own KB articles, a recipe section for my family, and many other articles
Cacti
This is used as an SNMP poller for all of my networking equipment… Primarily a mix of Ubiquiti and Cisco


Mayan EDMS
Currently this is my document management system that runs through a turnkey system
OpenVPN
This is used to connect externally through a handheld device or laptop back into my environment. I only allow traffic to a certain subnet for security reasons
UNMS
This is a application provided by Ubiquiti to allow the management of its Edge product line. I do use this for my own purposes and to also manage a few external bridges that I’ve placed


WordPress
I do not host this in a DMZ or externally. The WordPress VM is used for development reasons.
VCSA
VCSA is basically in short VMware vCenter which I use to communicate across all 3 of my physical hosts
BlueIris
Like before in Annville this system is used to record around the building both internally and externally
RDS
This is a terminal server that I use when I’m out and about. No outbound ports of course


SQL
Since SQL is popular among Windows environments for ERP’s specifically… I’ve decided to run a Dev SQL environment to manage, maintain, and learn from.
WSUS
I use this to maintain Windows updates for all computers/servers while maintaining updates through scripts.
YKDC2
The YKDC2 virtual server is a replica to YKDC1. It maintains default replication times.
YKFS01
This is only a file server and serves both an S:\ (shared data) and H:\ (private data).
YKGE19
Again this is another general server that hosts a lot of common items I don’t want on critical pieces like a file server, domain controller, or anything like that. Basically, to keep the risk and confusion away.


What’s Running My Homelab

You may or may not know but “IT ” people are always curious as to what others are running inside their homelab and why… We all like to critique our skills and for most of us that happens at our homes an not at work. Whether it be hardware, networking, virtualization, or virtual machines. So, here’s what’s going on in my homelab for 2020.

The Lab

Workstation

  • Dell Optiplex 7010
  • Core i5-3570
  • 8GB RAM
  • 1TB SSHD

On-Premise Server Rack

  • 1x Arris Cable Modem – ISP (Comcast)
  • 1x Ubiquiti Edgerouter 12P
  • 1x Cisco 3750G 24 Port PoE Switch
  • 2x 1U PDU’s
  • 1x Dell PowerEdge R410
  • 1x Dell PowerEdge R710
  • 1x Dell PowerEdge R720
  • 1x APC 1500 Watt UPS

Remote Server Rack

  • 1x ONT – ISP (Verizon)
  • 1x Ubiquiti Edgerouter 4
  • 1x Ubiquiti Unifi 16 Port PoE Switch
  • 1x Cisco 3750 24 Port PoE Switch
  • 1x 24 Port Patch Panel Cat 5E
  • 1x Dell PowerEdge R710
  • 1x APC 1500 Watt UPS