Feb 21

Automated vSphere Lab Deployment Script

Very handy! @lamw has put together an automated lab deployment script which will deploy a 3 host nested vCenter/ESXi/VSAN/NSX Lab. It supports vSphere 6.0 Update 2 and vSphere 6.5. The scripts provide a fully deployed and ready to use lab in under an hour!

A full write up and links to the scripts can be found here: http://www.virtuallyghetto.com/2016/11/vghetto-automated-vsphere-lab-deployment-for-vsphere-6-0u2-vsphere-6-5.html. The README with configuration instructions can be found here: https://github.com/lamw/vghetto-vsphere-automated-lab-deployment

Great stuff!!! Thanks @lamw

Jan 30

SimpliVity Custom Backup Scheduling Using the REST API

The ability to perform Policy-based VM-centric backups is a key feature delivered by SimpliVity’s Data Virtualization Platform (DVP). SimpliVity Backup Policies are a collection of rules which automate the protection of virtual machines to meet Recovery Point Objectives (RPO) for data recovery, this includes replicating backups to other SimpliVity Datacenters for off site retention and disaster recovery. SimpliVity Backups allow full virtual machines or individual files/folders to be quickly restored to the point in time when the backup was taken. This post provides a solution using the REST API to schedule SimpliVity backups outside of the standard options available when creating SimpliVity backup policy rules in the vSphere Web Client.

A SimpliVity Backup Policy contains backup rules which answer three questions: 1) frequency of backup, 2) retention period, and 3) in which SimpliVity datacenter to store the backup. A Backup Policy can contain multiple rules to protect VMs at different frequencies, with different retention policies, which can be replicated across multiple Datacenters.

Read the rest of this entry »

Jan 19

Automate Backup of the VCSA to the vMA

Recently I wrote a post on how to Target the vMA for VCSA Backups. This post takes things a step further and automates the backup of the VCSA using a shell script, the vCenter Appliance REST API, and cron on the vMA.

In the vSphere 6.5 Documentation there is a Bash Example of Backing Up the vCenter Server Instance so I did not have to re-invent the wheel. I made a few slight modifications to the example script to use SCP and separate VCSA instance backups into different folders.

My vcbu.sh script can be found here: https://github.com/herseyc/VMware/blob/master/vcbu.sh
Read the rest of this entry »

Jan 16

Target the vMA for VCSA Backups

One handy new feature available with vSphere 6.5 is the ability to take a supported backup of the vCenter Server Appliance (VCSA) configuration and database. The VCSA backup workflow can be accessed from the VMware vSphere Appliance Management Interface at https://IPorFQDNofvCenter:5480/

VCSA backups can be transferred to a target using HTTP/S, FTP/S, and SCP. A target will have to be configured to use one of the supported protocols in order to backup the VCSA, the vMA already supports SCP. This post walks through backing up the VCSA using SCP to target the vSphere Management Assistant (vMA) to store the backup.

Additional capacity will need to be added to the vMA to store the VCSA backups. Check out the post Adding a /workspace Disk to the vSphere Management Assistant for details on how to add an additional disk to the vMA.
Read the rest of this entry »

Jan 15

Adding a /workspace Disk to the vSphere Management Assistant (vMA)

The VMware vSphere Management Assitant (vMA) appliance allows admins to run scripts and agents against ESXi host and vCenter Server. The vMA includes the vSphere command-line interface (esxcli and vicfg) and the vSphere Perl SDK. The vMA allows you to remotely execute vCLI/esxcli and use resxtop without having to enable SSH on ESXi host.

The vMA is deployed with a single 3 GB disk with about 1 GB available after deployment. This post walks through adding a disk to the vMA appliance to provide additional storage for scripts, logs, VIBs, iso, backups, etc.

Adding a new disk the vMA appliance is pretty straight forward. Here is an overview of the process:

  1. Add a new hard disk (vmdk) to the vMA appliance.
  2. Identify the new disk device in the vMA.
  3. Create a partition table on the new disk device.
  4. Format the newly created partition with the ext3 filesystem.
  5. Mount the partition so it is accessible.
  6. Configure the new partition to mount when the vMA boots.

Read the rest of this entry »

Jan 05

Add an Entry to ESXi /etc/hosts using PowerShell

I was looking for away to easily add an entry to an ESXi host’s /etc/hosts file without using SSH to connect to the ESXi host. I ran across this article from a while back on Using vCLI’s vifs For More Than Just Datastore File Management. I could use vCLI, and that would be easy enough, but I wanted to figure out a way to do with PowerShell. In the article @lamw mentions the file management interface can be accessed with standard GET/PUT operations. The file management interface can be accessed with a Web Browser without enabling SSH on the ESXi host.

I put together a quick example of doing this with PowerShell using Invoke-WebRequest. The script Update-HostsFile.ps1 can be found at https://github.com/herseyc/PowerCLI-Scripts/blob/master/Update-HostsFile.ps1.
Read the rest of this entry »

Dec 22

Locating SimpliVity Manual Backups

SimpliVity data protection is policy based and VM-Centric. A SimpliVity Backup Policy is a collection of data protection rules which define 1) how often to backup a VM, 2) how long to retain the backup for, and 3) in which SimpliVity Datacenter to store the backup. A Backup Policy is assigned to a VM, or multiple VMs, and ensures the RPOs for the assigned VM(s) are met.

SimpliVity Manual Backups can be taken at any time to provide a full point in time backup of a VM. These manual backups are useful when doing things like software updates or patching on VMs. For these types of tasks the SimpliVity Manual Backup can replace VMware Snapshots. Unlike a VMware Snapshot, the Manual SimpliVity Backup happens very quickly and has no impact on consumed capacity or the performance of the virtual machine.

Policy based SimpliVity Backups have a retention period defined in the backup policy. When the retention period expires the backup is automatically deleted from the system.

When an expired backup is deleted from a SimpliVity Federation the unique data associated with the backup is also deleted and the space is reclaimed as free space.

The backup retention period is only set when the SimpliVity Backup is Policy based. When a Manual SimpliVity Backup is taken no retention period set by default and the backup will never expire. A manual backup must be manually deleted, or manually configured with a retention period, before it will be removed from the Federation and any space associated with its unique data is reclaimed.

A customer recently asked me how to quickly identify all the Manual SimpliVity Backups in a SimpliVity Federation. One way is to use the vSphere Web Client to search each SimpliVity Datacenter from the SimpliVity Search Backups tab to locate SimpliVity Backups with the type Manual.

Read the rest of this entry »

Nov 03

Migrating VMs from Legacy Infrastructure to SimpliVity HCI

There are a number of ways to migrate VM workloads from a legacy infrastructure to SimpliVity. By design a SimpliVity deployment is simple (it’s in our name) but migrating workloads from a legacy infrastructure can seem like a daunting task and it can be. However, if the migration is planned properly it can be easily accomplished without a significant impact on VMs running in the environment. This post provides an overview of some common migration methods which can be used to move VMs from a legacy infrastructure to the SimpliVity Hyperconverged Infrastructure (HCI).

Integrating SimpliVity into an existing environment.
This is probably the most common scenario. SimpliVity is deployed to either replace the legacy environment, provide additional capacity to augment the legacy environment, or to support a specific use case/application. Regardless of the use case the existing vCenter is used and SimpliVity is deployed into the existing environment.

  1. Present a SimpliVity Datastore to a host in the legacy environment.
  2. Use Storage vMotion to migrate VMs to SimpliVity Datastore.
  3. Use vMotion to migrate VMs to SimpliVity node.

The Storage vMotion will not have any impact on the availability of the VM being migrated. If there is processor compatibility between the legacy hosts and the SimpliVity hosts, which can be accomplished by deploying the SimpliVity nodes into a Enhanced vMotion Compatibility (EVC) enabled cluster, the VM vMotion can be done without impacting the availability of the virtual machine. If the processors are not compatible then the VM will need to be powered off and migrated using a cold vMotion. Since cold vMotions happen very quickly the downtime per VM is usually only a couple of minutes.

If the requirements are met for enhanced shared-nothing vMotion then this could also be used to live migrate storage and compute together without presenting SimpliVity storage to the legacy environment and without impact to the availability of the VM during the migration process.

This migration method could also be done by presenting the legacy storage to the SimpliVity nodes. The process would essentially be the same but the SimpliVity design would likely need to include HBAs or NICs to provide storage connectivity to the legacy storage.

A virtualized vCenter server can also be migrated on to the SimpliVity DVP, I cover the process in this post: Migrating a virtualized vCenter Server (VCSA or Windows) into the SimpliVity environment.
Read the rest of this entry »

Sep 25

Learning the vSphere Management Assistant (vMA)

It has been a while since I have worked with vMA. I used it fairly often when I was managing a vSphere environment. I am teaching the vSphere Optimize and Scale class during the winter semester so I spun up the vMA in the homelab to re-introduce myself to it. Using the vMA was part of the VCAP-DCA exam blueprint, but it looks like it has been removed from new VCAP-DCV Deployment exam blueprint (that makes me sad as it is a useful tool).

The vSphere Management Assistant (vMA) is a SUSE Linux virtual appliance which is packaged as an OVF. The vMA includes the vSphere command-line interface (esxcli and vicfg) and the vSphere Perl SDK. The vMA allows you to remotely execute vCLI/esxcli and use resxtop without having to enable SSH on ESXi host.

The vMA has an authentication component, vi-fastpass, which provides a credential store to cache host credentials to allow commands to be executed against target hosts without requiring authentication for each command. The vi-admin user has administrative privileges to add/remove/update servers to the vi-fastpass and the vi-user has read-only privileges to use the vi-fastpass to connect to hosts.

Hosts are added by the vi-admin user using the vifp addserver command. Once the servers have been added to vi-fastpass you can connect to the host using vifptarget. Using vifp listservers will provide a list of the hosts currently configured for vi-fastpass.

As of vSphere 6.0 esxcli/vCLI checks if a trust relationship exists between the machine running the command and the host the command is being run against. To create this trust relationship between the vMA and the ESXi or vCenter Servers registered in vi-fastpass the host’s thumbprint is added to the credential store using /usr/lib/vmware-vcli/apps/general/credstore_admin.pl add -s [server] -t [thumbprint]. Once the thumbprint is added to the Credential Store this trust relationship will exist between the vMA and the vi-fastpass configured hosts. When a target server is set (vifptarget -s [server]) the esxcli or vCLI commands can be executed from the vMA without requiring credentials.
Read the rest of this entry »

Sep 20

Working with ISO Images in the vSphere Client.

Here are a couple of basic guides I put together for the VMware ITN classes at TCC. Back to basics for sure, but not everyone works with vSphere environments regularly.

Here are the PDF documents I created to help students with the following tasks:

The guides are written specifically for the TCC VMware ITN classes, but someone just learning vSphere/ESXi might find them useful.

Older posts «

» Newer posts