Loading...

Set time on a VMWare hosted domain controller

When you set up a domain controller in VMWare and join machines to it, you will typically need to set an external NTP server for it to communicate with as it will, over time become 1,2,3,4,5 minutes off. I’ve seen this numerous times. There are a few other methods to resolve this, but this is my preferred. (The immediate install won’t have this problem, it will probably crop up about 5 months down the line).

  1. Make sure you are setting this on the domain controller with the FSMO roles.
    netdom /query fsmo
  2. Stop the time service (you will usually get the best results this way)
    net stop w32time
  3. Set the time sources you will use. This site has an excellent list. https://tf.nist.gov/tf-cgi/servers.cgi
    w32tm /config /syncfromflags:manual /manualpeerlist:time.nist.gov
  4. Set your domain controller as a reliable time source for clients connecting.
    w32tm /config /reliable:yes
  5. Start the time service back up
    net start w32time
  6. Force a time update
    w32tm /query /configuration
  7. Verify your work
    w32tm /query /status

This was used on Windows Server 2019 and should work on 2016 as well. Older versions I haven’t used this exact process on.

Installing VMWare PowerCLI – A life changer

If you don’t already work every day in command line in the Information Technology world, I’d recommend you start…. if only to use this tool. This tool removes some of the time consuming clicks required in the GUI — not to say it is at all hard in the GUI, but when you are dealing with hundreds of machines at a given time, you will learn more about what I mean over time.

Installation

Run the following:

Install-Module -Name vmware.powercli -Scope AllUsers

You may also use CurrentUser for the scope if you’d prefer.

And then of course to use it:

Import-Module vmware.powercli

Research

Now get comfy and start researching. The capabilities with existing knowledge of Powershell scripting…. possibilities are endless.

https://code.vmware.com/docs/5060/cmdlet-reference/doc/Start-VM.html

Install PFSense on VMWare ESXI with VLAN tagging

I had tried virtualizing my PFSense box in the past and had not been able to get any devices to talk back to the PFSense box. It seemed like a very straightforward setup to me. I recently tackled the project again as my physical hardware was going out on my old box causing PFSense to crash. I won’t get into the details of that box. The good news is that it’s off now. 🙂 Here is an overview of how I did this.

  1. Spin up new virtual machine on VMWare ESXI with PFSense. Set up 2 network adapters within ESXI and the PFSense machine’s settings.
    1. For ease in configuration, I turned on the LAN DHCP within PFSense. That is not required though, there are plenty of ways to accomplish this task.
  2. Download a backup config from existing firewall.
  3. Once installed, restore the backup config to your newly installed PFSense machine.
  4. Modify adapters as necessary. If you didn’t turn on DHCP, another option at this stage is to use the console interface in VMWare to set the interfaces in PFSense. Both methods are very easy to do.
  5. At this stage, if I were to plug my existing WAN into the newly designated port and the existing LAN into the newly designated port, what would happen? Assuming you mapped the ports correctly in PFSense and VMware and everything is plugged into the right spot, you’ll be missing one (quite important) step. In the properties of the adapter in ESXI, you have to set the internal LAN VLAN to 4095. This ID allows VLAN traffic to pass through without being modified. VLAN 0 disregards the tags which is the default.

This process is by no means difficult, but it was tricky. It was obvious why the traffic was not passing in my first attempt but it was not immediately obvious that VLAN 4095 is the one to use to maintain the tagging. That simple change has everything working properly.

VMWare – Formatting a drive

So I have a host with ESXI 6.5. I put in a spare laptop hard drive I had laying around just to store some files on. I wouldn’t recommend a laptop drive in a corporate or production environment, but in my personal “home use” case, this will be just fine. I won’t be streaming from this drive either, just data at rest really. So I powered down the host and put in the new hard drive. I turned it back on and the ESXI web GUI kept crashing when I was trying to add the drive. I searched for a bit and tried deleting partitions. Nothing seemed to work. I found a resolution by completely formatting the drive using mklabel. See below for details. Here was the error:

Error: Both the primary and backup GPT tables are corrupt.  Try making a fresh table, and using Parted's rescue feature to recover partitions.

  1. SSH into your ESXI Host.
  2. Type: ls /vmfs/devices/disks/
  3. Find the disk in question. I’ve found that VMWare does a pretty good job of labeling it by the drive tray it is in, but this may not always be the case. There are some VMWare articles you will want to reference to verify you are making changes to the right disk. This is especially true for a production machine that you have live data on. The last thing you want to do is delete production data.
  4. In my case, this was the disk name: mpx.vmhba1:C0:T1:L0 
  5. Now let’s get to the formatting!
  6. Run this: partedUtil mklabel /vmfs/devices/disks/mpx.vmhba1:C0:T1:L0 gpt

Here are some of the articles I used to determine which drives needed to be formatted:

  • https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1036609
  • https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1008886

VMWare ESXi & VSphere Client

VMWare ESXi is a virtual operating system that, from the server side GUI, doesn’t do much except allow a few configuration changes. But that’s just the body of the beast. You can use VSPhere Client to remotely manage and set up virtual machines by connecting to the ESXi install.

How I got involved?
I’m just starting to learn more about servers and how they work. I just purchased 3 Dell PowerEdge 2850s. Well technically I got a whole bunch of stuff I do not need. 11 servers in total. One of which is a Barracuda Firewall which I guess I need to install Untangled on. I mostly wanted the rack for my existing server. But with all of this being said, I just wanted to point out that they all came with ESXi installed and I’ve never used it before. That will be changing very soon though as you might be able to tell. Though the servers are old, I think it will be great that I can play with them and destruct them however I like whether on accident or on purpose. I have a newer server that I’ve been afraid of messing with. It has a SAS drive, 32GB RAM, and two quad core processors. I don’t know much about RAID or really any of that stuff so I think old servers are a perfect place for me to mess things up beyond repair before I try something that won’t work on my newer faster server.

What is it? How to install it?

Where to download?
http://superuser.com/questions/439356/where-can-i-find-the-vmware-vsphere-client