I wanted to set MTU on number of standard vSwitches across multiple ESXi hosts and Powercli made that job easier. Here’s a oneliner to get the job done across multiple vSwitches.
Get-VMHost My-ESXi-Host| Get-VirtualPortGroup "PG_SearchString*" | Get-VirtualSwitch | Set-VirtualSwitch -Mtu 9000 -Confirm:$false
A couple of days back during a discussion in a class, someone asked me if it is possible to change the IP Address of a vCenter Server appliance.
Changing of IP Address is allowed. However changing of hostname (FQDN), also referred to as Primary Network Identifier (PNID) is not allowed.
So the long answer, yes it is possible to change the IP Address of a vCenter server appliance after the deployment. (It is also possible to change the IP Address after a vCenter migration from a Windows instance to an server appliance.) One can change the IP Address by connecting to the Virtual Appliance Management Interface (VAMI) located at https://vcenter_server:5480.
Remember after changing the IP Address don’t forgot to update the forward and reverse DNS records.
There one corner condition when changing IP Address is does not work, this is specifically when one has configured a vCenter server appliance with an IP Address (without DNS records). In such cases it is not possible to change the vCenter server appliance IP Address.
However I don’t recommend changing IP Address of a vCenter instance after it has been deployed. Very simply there are many dependencies to take care of which can potentially break things in your environment. Hence always spend some time before deploying a vCenter instance and come up with a long term design strategy of correct Hostname & IP IP Addressing policy.
Here is a Perl script that creates a PDF from list of JPG images. This script uses the PDF::FromImage CPAN module.
# Perl Script to create a PDF file from a sorted list of JPG images
# This script uses the PDF::FromImage module.
# To install PDF::FromImage module on Windows with Strawberry Perl
# execute the following commands in a Command Shell
# The following command assumes Strawberry Perl in PATH
# c:\&gt; perl -MCPAN -e shell
# c:\&gt; install PDF::FromImage;
# This script assumes there is a list of 300 JPG images with names
# in the CURRENT_DIRECTORY in acsending order.
# E.g. fileprefix_1.jpg, fileprefix_2.jpg, fileprefix_3.jpg ...
# Steps to use the script:
# 1. Save this script as make_pdf.pl in the directory where you have
# the JPG images
# 2. Install the Perl Module
# 3. Edit the script modify as per requirement
# 4. run the script from commandline.
my ($prefix, $pdfname, @files)
# Enter a prefix for your image files
$prefix = 'file_prefix';
# Enter the PDF name without the ".pdf" extension
$pdfname = 'my_pdf_name';
for (my $i=1; $i load_images(@files);
$p->write_file($pdfname . '.pdf');
Perl Script to create a PDF file from a sorted list of JPG images. This script uses the PDF::FromImage module.
To install PDF::FromImage module on Windows with Strawberry Perl
execute the following commands in a Command Shell. The following command assumes Strawberry Perl in PATH
c:\> perl -MCPAN -e shell
c:\> install PDF::FromImage;
This script assumes there is a list of 300 JPG images with names in the CURRENT_DIRECTORY in ascending order.
E.g. fileprefix_1.jpg, fileprefix_2.jpg, fileprefix_3.jpg …
Steps to use the script:
- Save this script as make_pdf.pl in the directory where you have
the JPG images.
- Install the Perl Module.
- Edit the script modify as per requirement.
- Run the script from the command line.
In my previous post, I wrote about how the network interface within a CentOS 7 environment can be configured to automatically get activated at boot up. In that post we discussed the command line tool
and later edited the file
We can also achieve the same behaviour using the network manager text user interface also called as the nmtui.
- Start the nmtui wizard
- select the Edit a Connection Option
- Select the appropriate connection (network adapter) and then select edit
- On the edit screen use the select the Automatically connect checkbox and then select OK
- In case you want to temporarily deactivate (bring down) the network adapter (connection) use the Activate a connection option from the main screen.
The network manager TUI is an user interactive tool whereas there is also a non-interactive tool to achieve the same. The tool is called as:
Today I installed CentOS 7 as a minimal install on my vSphere ESXi host. I had configured my virtual machine (VM) with a VMXNET3 network adapter. The good thing about this base minimal install of CentOS-7 is, that the network drivers are part of the base install. So essentially you don’t have to install VMware Tools to get the network adapter working. But the problem is the base minimal install of CentOS-7 by default only enables the loop-back adapter at boot. So the ens160 adapter does not (automatically) come up after boot.
This has nothing to do with the DHCP server not configured or the adapter requiring a static IP address. It’s a plain simple thing, that the ens160 adapter is disabled (probably for security reasons) on boot. To bring it up this network adapter you will need to login to the virtual machine and execute the following command:
The interface will come up and get a DHCP IP address. However the interface will always need to be enabled manually after every reboot. If you want the interface to be automatically started after a reboot, then edit the following file:
and update the file to read as:
Keep all other settings as default, save the file and reboot. On the next boot the ens160 network adapter will automatically start with a DHCP IP address.
VMFS6 file system was in vSphere 6.5. Of the many new features introduced with VMFS6, one of the notable features is Automatic Space Reclamation.
Automatic space reclamation, also sometimes referred to as UNMAP is a feature that allows the hypervisor (vmkernel) to reclaim space when files (data) are (is) deleted from a virtual machine with a thin provisioned disk. The following video from VMware Tech Pubs provides an ease way to understand the same.
Here is an excellent playlist of videos from VMware Tech Pubs. The video list features some of the new features introduced with vSphere 6.5. If you plan to take the VCP 6.5 exam this is something that you should definitely watch.