The folks on the VMware API team along with some Community Support ( @butch7903 – Russell Hamker)
have created an amazing backup script for your vCenter Appliance. Give it a once over.
https://github.com/butch7903/PowerCLI/blob/master/Backup_VCSA_DB_to_File.ps1

Some quick notes:
– Only works on vSphere 6.5 and higher.
– It requires PowerCLI version 6.5.3 or greater.
– It needs the Powershell PSFTP or WinSCP Powershell module if you want to use FTP or WinSCP to copy the backup from vCenter to a storage location.
* (Optional) – I deployed a Photon OS VM and I use that as my SCP target to save my backups.

If you want to save all of the Command Line GUI in the 772 Line file, all you need are these lines to complete the backup.
Import-Module -Name VMware.VimAutomation.core
Import-Module -Name WinSCP
connect-cisserver “vcenter01” -username “administrator@vsphere.local” -pass “myPass”
$BackupAPI = Get-CisService com.vmware.appliance.recovery.backup.job
$CreateSpec = $BackupAPI.Help.create.piece.Create()
$CreateSpec.parts = @(“common”,”seat”)
$CreateSpec.backup_password = “”
$CreateSpec.location_type = “SCP”
$CreateSpec.location = “10.10.10.10/storage”
$CreateSpec.location_user = “root” #username of your SCP location
$CreateSpec.location_password = New-Object –TypeName System.Management.Automation.PSCredential –ArgumentList “backup location username”, (ConvertTo-SecureString –String “backup location password” –AsPlainText -Force)
$CreateSpec.comment = $Comment
$BackupJob = $BackupAPI.create($CreateSpec)

Then you can use the following command to check on its status:
$BackupJob | select id, progress, state

Over the Holidays, I get a little free time to get back into the entertainment side of computers and electronics. Last week, I noticed some websites starting to load slower than normal. I jumped into the firewall logs and noticed the advertisements were doing massive DNS queries. Some websites were making 50-200 connections every second in an attempt to load as much click through and advertisement as possible. I took all of the DNS names from my firewall log, ran my quick DNS Lookup Powershell Script to lookup all of the possible IP addresses hidden behind that DNS name, then blocked all of it in my firewall. These few websites forced me to block a few Class C subnets and forty-five single IPs. After this firewall config update, pages loaded instantly again. This is a lot of work to do every few months to keep up with the changing advertisement landscape.
I know a lot of pay-for appliances exist for the enterprise to block advertisements and “bad sites” but I never gave it much thought to research the raspberry Pi offerings. I needed something quick, automatic, and very low cost + low power.

My bro @EuroBrew told me about this software for the Raspberry Pi called “Pi-Hole” — Website here https://pi-hole.net/
After installing it, I am impressed. The web-based Admin GUI is great. You can edit, add or remove items to your black+white list on the fly. It even has fancy graphs to show you how many items were blocked. Pi-Hole was running for two minutes and with a few seconds of Facebook Traffic from the wife, it had already started to show some big numbers. Summary: You don’t know what you accessing until you see how much is blocked.

The Dashboard:

pihole1

Even though you are accessing a single website, it’s amazing how many other sites are accessed without you even noticing. Again, within that two minutes of activity, thinking that facebook would be the top site accessed, here are the top URLs.

pihole2

Now, let me help you get this installed in your home lab!

######
Here are my quick steps to get this going:
1 – Download the updated version of Raspbian — I recommend the lite version https://www.raspberrypi.org/downloads/raspbian/
2 – Use their website if you need assistance to get a clean Raspberry Pie setup.
— Use an image tool to image your SD Card
— Boot up your RasbPi with the new image and configure the Timezone + Keyboard.
—- It is important to make sure your “|” key works…. UK version of the keyboard has issues so change it to US.
—- You can do this with the “sudo raspi-config” command + menu system.
3 – Now configure your RaspPi with a static IP. The Pi-Hole installer will help you with that but its way faster to do it now.
— You edit the /etc/dhcpcd.conf file with “sudo nano /etc/dhcpcd.conf” and change the static settings for your eth0 interface.
4 – Now you can run the pi-hole installer with “curl -L https://install.pi-hole.net | bash”
— Capital L and vertical line is a must for that command.
— This will fail if DNS isn’t working so check your network settings with an ifconfig if you are having issues.
5 – When the installer is complete, it will give you a Password to write down….. Don’t forget to do this!
— You can also change the password after the installed is finished with command “pihole -a -p mynewpassword123”
6- From a browser, go to your new Pi-Hole install via http://x.x.x.x/admin and configure it.
— Click Login on the left window.
—- From here you have access to Settings where you can correct any missed settings, or change your Temperature Units from Celsius to Fahrenheit.

Now, update your PC, Wireless, router settings to use your RaspPi as your DNS server and you are done.
You can go into great detail to add additional blocks so hit the google search box for that.

When the 5.X vCenter webclient released you could navigate to a VM and click a link to generate a VM Console URL.  It looks something like this:
https://vcenter.pcli.me:9443/vsphere-client/vmrc/vmrc.jsp?vm=urn:vmomi:VirtualMachine:vm-VirtualMachine-vm-409:3a3sf62s-q41g-172d-aj91-a71251658v87

This 5.X console URL was made up of three data variables:
vcenter + VM MoRef + vCenter UUID — See below in the parentheses.
https://(your vcenter server):9443/vsphere-client/vmrc/vmrc.jsp?vm=urn:vmomi:VirtualMachine:vm-VirtualMachine-vm-( you vms MORef Number ):(vcenters UUID)

Now this URL will not work for vCenter 6.x!
If attempted, you will see this in your browser:
console1

 

 

 

 

The formatting was changed to this:

https://vcenter.pcli.me:9443/vsphere-client/webconsole.html?vmId=vm-VirtualMachine-vm-409&vmName=vm01&serverGuid=3a3sf62s-q41g-172d-aj91-a71251658v87&host=vCenterPSC01.pcli.me:443&sessionTicket=cst-VCT

Lets break down this URL:
https://vcenter.pcli.me:9443                                                                              (— vcenter again with port)
/vsphere-client/webconsole.html?vmId=vm-VirtualMachine-vm-                      (— String changed from vmrc to webconsole…)
409                                                                                                                    (— VM moRef ID)
&vmName=vm01                                                                                              (— The Name of the VM you want the console of)
&serverGuid=3a3sf62s-q41g-172d-aj91-a71251658v87                                  (— vCenters UUID)
&host=vCenterPSC01.pcli.me:443                                                                   (— the FQDN of your vCenter Platform Service Controller)
&sessionTicket=cst-VCT                                                                                  (— and a final string)

This last string  (&sessionTicket=cst-VCT)  was something I had to play with..  Using just these characters allowed the browser to prompt for my username/password and then give me a VM console.

Here are the PowerCLI commands to find your VM MoRef ID and vCenter UUID.
— Launch a PowerCLI session and run these oneLiners
—- $global:DefaultVIServers.InstanceUUid   =  This will give you your vCenter UUID
—  ((get-vm “vm01”).id).split(“-“)[2]  =  This will get your VM MoRef ID
—- You can use this one too if you like Views….  (get-view -viewtype virtualmachine -filter @{“name” = “vm01”}).moref.value

Here are the 5.X and 6.X VM consoles… if interested in the differences.
5.X
console2

 

 

 

 

 

 

 

6.X

console3

Two updates for this one.   This is mostly to cover the large amount of questions I’ve received about the new Intel NUC 5th Gen and if they will support the VSAN setup I’ve detailed in previous posts.

First:  Intel NUC 5th Gen is coming/released and it has all the same stats as the 4th gen but with an updated Processor+GPU and another evil but performance positive change.
Web Link : http://www.intel.com/content/www/us/en/nuc/products-overview.html

The 5th gen NUC is still limited to 16GB of RAM even though they are releasing a new i7 version NUC.  Now here is the catch,  they replaced the half length and full length mPCIe slots with a M.2 slot.  This removes the ability to fit in the second wired network adapter and makes it harder to find or reuse your existing mSATA SSDs.  This M.2 slot does increase the “SATA” SSD speed from 3Gbps to 6Gbps if you are looking for more NUC IOPS/Bandwidth.   So, if you do not care about the second wired NIC, the 5th gen NUC may be an upgrade to your SSD performance in your home lab.

Here is a quick snip to show the difference in the mSATA and M.2 SSDs:

msatassd m2ssd

Second : As small form factor compute is getting popular in the home lab space more fun tools and toys are released.
As an example, Lian-Li has created an Intel NUC Replacement Case.  It helps with cooling and makes it look a little more fancy.
Here is a Link to a review of the case : http://www.legitreviews.com/lian-li-pc-n1-intel-nuc-replacement-case-review_2141/2
I tried to find an actual “Buy Now” link or a spec page on the Lian-Li website but I couldn’t find it.
Also, It looks like Intel had a “NUC Case Mod” competition.
http://www.bit-tech.net/modding/2015/01/05/intel-nuc-case-design-competition-2014/1
http://www.bit-tech.net/modding/2014/12/01/intel-nuc-design-competition-2014/1
So, if you are interested in more things “NUC,” Give those URLs a quick once over.

Find me on twitter if you have any questions or comments!