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.

Manage PoE settings on Cisco Catalyst

Turn PoE off for one switchport:

  1. Open Putty
  2. Enter the host name (or IP address)
  3. Log into the Switch
  4. Enter global config mode
conf t
int fa0/1
power inline never

Turn PoE off for switchport range:

  1. Open Putty
  2. Enter the host name (or IP address)
  3. Log into the Switch
  4. Enter global config mode
  5. Enter the config below
conf t 
int range fa0/1 - 24
power inline never

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.



Deploy G’mic 2.9.6 In Software Center

Open Configuration Manager

Launch the Configuration Manager console, click Software Library, under Application Management right click Applications and click Create Application. Choose Manually specify the application information and click Next.

Building The Application Deployment

Download G’MIC software from here. Once you have downloaded the GIMP software, you can copy it to a folder on the ConfigMgr server or shared folder on a file server (if its in the same DC).

Specify some information about the application. Click Next.

For the Content Location, provide the path where the GIMP setup file is present. In my case I have copied the setup file to a folder named GIMP on SCCM server. The next step is to specify install and uninstall command.
Information:
Content Location: \dc19\Share\Software\Deployments\Software\GIMP\Plugins
Installation Program: “gmic_2.9.6_gimp2.10_win64.exe” /LANG=English /VERYSILENT /NORESTART /SP-
Uninstall Program: %AppData%\GIMP\2.10\plug-ins\gmic_gimp_qt\uninst\unins000.exe /VERYSILENT

Detection Method – Detection method allows the administrator to check if the application is already installed. It can also prevent an installation of an application if it conflicts with another application that is already installed. Click Configure rules to detect the presence of this deployment type and click on Add Clause.

On the Detection Rule window, choose Setting Type as Registry. Under HKEY_CURRENT_USER, set the following

Detection Rule
Setting Type: Registry
Hive: HKEY_CURRENT_USER
Key: Software\Microsoft\Windows\CurrentVersion\Uninstall\G’MIC-Qt for GIMP_is1

Set the Installation behavior as Install for user and Installation program visibility to Normal. Click Next.

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.

Deploying A Linux VM In Azure

In this blog I will be showing you how to deploy a Linux – Ubuntu 18.04 LTS ISO through Azure. Since I need to deploy one anyways for a new internal service I will be using called – Ansible Tower. I thought “why not make a blog about this first” and then make another post about my findings regarding Ansible.

Signing Into The Portal

1. Paying for Azure Usage

Probably one of the most important first steps will be deciding how you are going to be paying for Azure. If you are new to Microsoft Azure ~ click here to read up on my blog post to get free Azure credits. If you already have an Azure account but don’t have credits to use you can also find out the cost to run the virtual machine through the Azure calculator. In most cases, the lower end B-Series VM’s run at most around $20-30 a month but don’t just go on my word. Again check the calculator to see what your estimate will be so that you can properly budget the costs out. If you know that you’ll be using this virtual machine for a period of 1 or 3 years you can opt for those locked in rates to get reduced pricing too.

2. Logging Into The Azure Portal

First, you will want to go to https://portal.azure.com or through https://azure.microsoft.com/en-us/ to access the portal.

After clicking on the Sign in box. You’ll want to either pick your last used account or sign into another account preferably the one that’s being used with Azure. Hopefully you’ll be using the one that has free credits. If it was already setup during the account creation, you should be prompted for a 2FA whether it be through e-mail, text, or an access token.

Deploying A Linux Machine

1. Creating And Choosing The Resource

After signing in to the Azure portal. You will be prompted with a pop up window to be given a tutorial of the console. If you’ve just started with Azure I’d recommend that you take the time to run through the guide to get at least an overview of what you are working with. If you decided to skip that for now. Click on the (+) Create a resource button.

After the above step is completed. In this new menu or catalogue you can choose to run over 300 services of your choice. That’s a lot! However, for this case we will be deploying the common Ubuntu Server 18.04 LTS image.

2. The Basics

Couple things we’ll be doing in this section
* Choosing the subscription that you want to use: This should only be one
* Choose the resource group: You should be creating a new one. For me, I selected a pre-existing one that I have been using.
* Give the virtual machine a name: remember to stay within the requirements (this can be found by clicking or hovering over the (i).
* Choose the virtual machine region: This is pretty important for a few reasons. Choosing in a region that you are located reduces latency to the machine and can save on costs as some reasons are more expensive than another.
* Choose the size of the machine: You don’t have to go with the few options that Microsoft provides when spinning up a virtual machine. You do have options to “see all” or more compute options. Generally speaking the B-series for development/testing or homelab environments are good.

Continue from the last portion
* Choose the authentication type: SSH public key’s would be the most secure but you do need to go through extra steps to get that into a readable file for putty – This key is essentially your password. If you don’t want to you can always make a standard password but I would suggest either SSH over a VPN tunnel or isolate SSH to your external IP address.
* Username: Setup a good username. Microsoft does cross check username’s with commonly used one’s so you don’t become compromised.
* Key source and name: Generate a new key pair and either use the generic name or create your own unique standard name
* Port rules: Depending on the existing setup or purpose of the virtual machine you can do a couple of things. For me, I will not be enabling inbound ports since this virtual machine will be traversing my IPSec tunnel. The image below depicts the typical setup.

3. Sizing The Disk(s)

Choosing your disk can very depending on your use case. For the amount of cost and use case I typically change the Disk from the standard Premium disk to Standard SSD which is basically fast enough for any of my needs. I also change the disk storage from 1TB to 64GB’s.

4. Networking The Virtual Machine

Create a virtual network: If you filled in the above sections you should be able to create a new virtual network under your subscription. You also have the ability to use an existing VNET.
Subnet: Choose an existing or create a new subnet that the new virtual machine will reside under. This will be the network that is internal or private to your subscription.
Public IP: Following the understanding from the previous sections the public IP can be used if you are just creating a new network and don’t have an IPSEC tunnel or you are just settings this up for testing purposes. Leave all the NIC NSG, Public inbound ports, and select inbound ports as is (under the NIC network security group you can restrict access to the WAN IP of your home or business internet connection).

5. Management

For the tenant I have I’ve let these settings as default but they can be changed depending on your circumstances. Enabling Azure Active Directory or AAD would be most beneficial if you have a directory or local directory sync. Enabling auto shutdown will save on your consumption costs too if you are trying to be cost conscious. Another important item to check would probably be the backup function. This can come in handy if you need to instant restore a VM for the last 2 days or restore files for the last 30 days or however long your retention is.

6. Advanced

For this article, I have skipped over all of the Advanced options but feel free to look at them and what those options do.

7. Tagging

8. Reviewing The Deployment

You made it! Congrats. Now all you have to do is just double check that all is correct with your deployment and create the VM.

Free Azure Credits

Getting Azure Credits For Free

Depending on your circumstances you can save money with Microsoft Azure credits if you are applicable. If applicable, those credits are applied to your account on a monthly or yearly basis and they are used until they are exhausted from your account or expired. You can think of this similar to a refillable cellphone plan that you may have had as a kid. For the majority, we’ll stick with the most sought plans.

1. Azure Free Account

The Azure Free Account, will give you access to a number of Azure services. Microsoft will give you a set of access throughout your trial and free account. You’ll have $200 dollars of credits to use within the first 30 days of activation, 12 months of limited free services, and always free services.

With this free account ~ Always remember to set limits on your account for budget spending or to review what you are deploying. Some virtual machines or other deployments can get out of hand and you could end up with a bigger than expected bill.
* It is recommended, by Microsoft, to only have a max of 1 free account per person.

2. MSDN Subscription

Personally don’t think too many people will go for this option due to the upfront costs. However, If you’re a Visual Studio subscriber, you can get monthly Azure credits to develop your knowledge on the services that Azure does offer. The credit amount does depend on the type of subscription that you do purchase.

A Visual Studio Enterprise subscription, can get you $150 in monthly credits. For subscriptions through MSDN Platforms you get $100 a month. For Visual Studio Professional and Visual Studio Test Professional, you get $50 a month.

3. Non-Profit Subscription

The non-profit subscription, I believe, is the most beneficial for anyone that does manage a non-profit or owns one. Microsoft generously gives, each year, approved organizations a donation of $3,500 dollars in Azure credits that can be used towards workloads in the Azure cloud (excluding Azure Active Directory). Microsoft is attempting to make these types of technological advances affordable and accessible for those organizations. Every

No matter the industry you’re in or learning level you’re at, there are a wide variety of credits and resources offered that can help make Azure an affordable option for you.