Archives: October 21, 2020

Clear DNS cache VCSA/PhotonOS

The last few weeks I’ve had to do a couple of IP changes on ESXi hosts. This always goes without a lot of issues but it can be annoying when you have to wait for the new IP address to be updated in DNS and then for it to be visible in vCenter. The quickest way to get the new DNS records, is to clear the DNS cache in VCSA. Since VCSA is based on PhotonOS, this will also work on other PhotonOS VMs.

PhotonOS uses dnsmasq as a local DNS cache/proxy. So all we have to do is restart that service to clear the cache.

First, open up an SSH session to VCSA and enter the bash shell.

Run the following systemctl command to restart the service.

systemctl restart dnsmasq.service

Now, we just have to check that the service is up and running again. We can use systemctl for that as well.

systemctl status dnsmasq.service

If all is well you should see the output like it’s shown above. Run a quick ping to check that the DNS record is resolving to the correct IP and you’re done!

This was a quick post but I kept having to google it. Hope this helps !


vCenter update fails: vCenter server is non-operational

Today, while I was updating vCenter in my lab, I ran into a strange issue. The update I was installing failed, when I wanted to try again, this ominous error message popped up.

vCenter being non-operational left me a bit of a doom and gloom feeling but, thankfully, the fix is rather easy.

Fixing the issue

Open up an SSH session to your vCenter server and run the command below to remove the software_update_state.conf file.

rm /etc/applmgmt/appliance/software_update_state.conf

You can check the contents of the file by opening it with vi, an example is shown below.

 

Turns out that the state “INSTALL_FAILED” is checked by the python script that performs the installation. The script can be found in /usr/lib/applmgmt/update/py/vmware/appliance/update/update_state.py

Removing the file will make this check pass and the installation will continue.


VCAP-DCV Deploy Exam Experience

After postponing this exam for too long, I finally took the time to study for and take the VCAP-DCV deploy exam. To be honest, I was kind of looking forward to this exam. I love playing in the lab and getting my hands dirty in an environment. So to be able to take an actual lab exam was pretty exciting to me.

In this post, I will try to give some pointers and tips that might help you pass the exam. Please note that I took the exam for the 6.5 version but the same logic applies to other versions.

Preparation

Unlike the design exam, the deploy exam is a lab exam. This means you need to know how to do the stuff you’ve been reading and talking about. But, there are still some similarities. For starters, know the blueprint. This comes back for every exam, but read the blueprint upfront and know what topics are going to be covered on the exam. You should be intimately familiar with these blueprints by now.

Documentation

Although it’s a lab exam, you do have access to all the documentation VMware has on vSphere 6.5 in a folder on your desktop. Unlike what I read in some other posts, you do NOT have access to Adobe Reader in the lab. All PDFs will be opened in the browser, which means you can’t do a search in the entire folder anymore. Keep this in mind, read the documentation, and know where you need to look to find certain commands or info on a topic.

Community resources

As you might have guessed, there are already some great resources available in the community and I’m probably going to be linking the same ones that everyone does but that just shows how good they are.

  • Kyle Jenner’s VCAP6-DCV deployment study guide is the resource that I used the most. Kyle has put a lot of time and effort into explaining every topic covered in the blueprint. Make sure to go through every topic thoroughly.
  • Graham Barker’s VCAP6-DCV exam simulator is great to get a feel for what kind of questions will be asked and what depth they go to. Although the HoLs listed are no longer available, you can still perform these tasks in another HoL or your own lab.

Lab

But the most important resource I used while preparing was my lab. The VCAP exam covers nearly every vSphere feature there is. Like me, you’re probably not familiar with every feature there is. Make sure you lab these things more than once so you know how to do them. If you’ve got a lab that’s set up perfectly, try to get one of your colleagues or friends to break things in the lab. This will come in handy when you’re doing the exam. If you don’t have a lab, just spin up one of the vSphere 6.7 labs and start playing around.

You could also rent a server for a month or 2 like I did, and start building a nested lab. But that’s a topic for another post.

Besides that, there’s no replacement for real-world experience. I would not recommend taking this exam until you’ve got about 1 – 2 years of daily hands-on work done with vSphere. This will make the exam a lot easier.

Exam experience

The exam itself is presented to you in a HoL like fashion, it’s the same UI. If you’re not familiar with how HoLs work, be sure to start up a few so you’re familiar with the interface and how you can change and use the interface. Also, try booking the exam in a center where they have big screens. My test center has 24″ screens, which helped A LOT.

I found the lab to be reasonably performant and had no issues with connection whatsoever. The only minor annoyance was letters appearing more than once while typing but this is probably due to latency. Just be sure to read what you typed if a command fails.

Time management is crucial for this exam, that’s what a lot of other people told me at least. With that in mind, I tried to get the questions done as fast as I could without rushing through them. If I was stumped on one part of the question, I would write it down on the piece of paper I got, and move on to the next question. After I got through all questions, I started going back to the ones I didn’t complete. This will also prevent you from getting frustrated/stuck on 1 question, taking a break will give you a fresh look at the question.

I finished the exam with 42 minutes to spare so I never really felt that I was in a hurry to get everything done but your mileage may vary.

When doing the exam, read the questions carefully. It happened several times that I quickly read a question, started doing things, and afterward re-reading the question to find out I had not done several things.

Make sure you’re familiar with the CLI and PowerCLI, these things can come in handy for doing certain things faster. Also, try to open up the flash client again before taking the 6.5 exam. During the 6.5 days, the H5 client wasn’t yet fully-featured so you may not be able to use it for all questions.

Results

I took the exam on a Friday at 10 AM, so I was expecting to get the results on Monday or Tuesday after that. Around 8 PM I got an e-mail saying that I passed! This was a very pleasant surprise and big kudos to the VMware education team for providing the results so quickly.

I hope this post will help you prepare for the exam, good luck!


VCSA upgrade – deployment sizes missing

Everyone has done VCSA upgrades dozens of times, but every now and then you come across something that you haven’t seen before. Today, this was the case while I was doing an upgrade.

When you get to the deployment size selection, in the first stage of the upgrade, I noticed I was unable to select anything smaller than “Medium” size.

Changing the storage size also didn’t make the Tiny or small sizes available. While I was doing this, I happened to be talking to Jens Herremans (Check out his blog, it’s awesome!). He told me to check the size of the logs partition on the source VM.

Checking log sizes

After opening an SSH session to the source VM and changing to the /var/log/vmware folder, I ran the following command to get a list of all files and their sizes.

ls -lahR >> size.txt

I write the output to a file to make it easier to review, also this avoids having to scroll up and having parts capped off. Next, review the file with your favorite editor. You’ll see a list of all the folders, their total size and the individual files with their size. For me the big directories are vpxd, sca, sso, vdcs and vsphere-client.

Every file will also have a timestamp that makes it easy to verify if you still need the logs or not. If you wish to keep the, you can easily move them to a datastore or copy them locally. In this particular environment, we had no need for any of the older log files. I could just go in and rm -rf all the archived logs. For example in the /var/log/vmware/sca folder, the following command will remove all the archived logs but keep the one currently in use

rm -rf sca.log.*

After the cleanup, I ran the upgrade assistant again and was able to select the tiny deployment size.