Archive for the ‘VMWare’ Category

vSphere Update Manager (VUM) is a tool which enabled VMWare administrators to automate and streamline process of applying updates to vSphere environment.VUM is integrated to vCenter server  and offers the ability to scan and remediate ESXi hosts.

In this example i used SQL server database ( for storing updates,VUM will be installed on separate Windows Server 2016 machines (

Configuring SQL server

VMWare requires using SQL server login when SQL database is on separate server,so first thing is to create SQL server login:

In SQL server management studio Expand security-Right Click Login-New Login







Creating  VUM database

Right click Database-New Database



Set owner to SQL login


Set SQL login to be owner to MSDB database too (required during VUM installation)



Enable SQL Authentication


Check if Named Pipe,Shared Memory and TCP/IP is enabled,if not,enable it and restart MSSQL service



Using SQL server management studio try to log in using SQL server login,you should be prompted for new password





After we configured SQL server,now it’s time to configure server where VUM will be installed:


Configuring VUM server

Install appropriate ODBC driver (on my SQL server ODBC 11 driver is installed),so i need to install the same driver on VUM server



Creating connection to SQL server VUM database

Create ODBC connection (must select 32 bit version)




Select System DSN-Add


Select ODBC Driver 11



Enter Connection Name and name/IP of SQL server and click next



Enter SQL login credentials


From drop-down list select VUM database



Test connection and click OK




Installing VUM

Mount vCenter Server ISO,on Auto-Run windows select vSphere Update Manager-Server


Enter vCenter IP Address/hostname and vCenter credentials


Enter ODBC name (we created in in previous steps)


Enter SQL login


Leave default or enter custom ports (installation routine will open these ports on VUM server)



After installation finishes, Update Manager should be visible in vCenter Sever



Click Update Manager-icon with IP address of VUM server should appear-click on it-Manage-Settings-Download Settings-Download Now



We can monitor download progress from VUM server









vSphere Replication is solution for VM protection ,it’s integrated in vCenter server.Using vSphere Replication we can replicate VM from one datastore to another.


• Protect nearly any virtual machine regardless of operating system (OS) and applications. • Only changes are replicated, which improves efficiency and reduces network utilization.
• Recovery point objectives (RPOs) range from 15 minutes to 24 hours and can be configured on a per–virtual machine basis..
• Compatibility is provided with VMware Virtual SAN™, traditional SAN, NAS, and local storage.
• Quick recovery for individual virtual machines minimizes downtime and resource requirements.
• Optional network isolation and compression help secure replicated data and further reduce network bandwidth consumption.
• Support for Microsoft Volume Shadow Copy Service (VSS) and Linux file system quiescing improves reliability of recovered virtual machines.

Replication appliance is located on VMWare vSpehere Replication ISO.

Connect to vCenter server,Right-click to datacenter-Deploy OVF template


1 (1).png

Local File-Browse



Select OVF file from ISO (bin folder)






Accept License Agreement-click Next-Select Datacenter


Choose vCPU number



Choose ESXi  which will host Replication Appliance



Select Datastore


Specify network settings



Set root password,NTP servers and appliance IP






After some minutes Appliance should be deployed



Log in to vCenter Replication Appliance using web browser (http://ipaddress:5480/

If VRM service is stopped,go to Configuration,enter vCenter username and password click Save and Restar Service



Click yes



In vCenter server you should be able to see vSphere Replication



and new context menu should appear when right click on VM:



In case you don’t see vSphere Replication,try first to reboot vSphere Replication appliance,if it fails,reboot vCenter Server,if it fails too reboot ESXi host (this helpled in my case 🙂 )

If all fail check log file on vCenter Server,vsphere_client_virgo.log stored in /var/log/vmware/vsphere-client/logs/



Installing vCenter for ESXi 6.0

Posted: February 22, 2017 in VMWare

In this post i’ll install vCenter on Windows Server 2016 with SQL database located on separate server.

vCenter Server is an application that is used as a centralized management tool for ESXi hosts and  VMs. vCenter Server performs tasks on the individual ESXi hosts that have been added as members of a vCenter

vCenter server must have at least 8 GB of RAM

Configuring SQL server

I’ll use Windows authentication,so first step would be to create login and map it to Windows user account (standard domain user)

In SQL management studio Expand Security-Right click Login-New Login




Check Windows authentication-Search



Location-domain name-enter domain user name (esxi_user in my case)




Creating database

vCenter needs database for storing it’s data.Right click database-New database



Specify new login as database owner




Set this login as owner of msdb database but only during vCenter installation,after installation finishes,restore sa account as msdb owner





Setting vCenter server

vCenter server needs to have access to SQL server database during installation


Download and install SQL native client from (sqlncli.msi)




Control Panel-Administrative tools-ODBC Data Sources (64-bit)




Select System DSN-Add-SQL Server Native Client-Finish



After clicking Finish,Create a New Data Source wizard opens-set name,from drop-down list choose SQL server and click Next



Check Integrated Windows authentication and click Next



Click Change the default database to: and from drop-down list select database for vCenter and click Next




Click Test data source and if everything is fine,click OK



Installing vCenter (NET Framework 3.5 is required)




The Platform Services Controller (PSC) enables  log in and administer vCenter,so it must be installed



Set System name



Set password for SSO administrator




Service account must be specified if we want to use Windows authentication







We must add System account Log on as service right,on Domain controller create/edit GPO

Windows Settings-Security Settings-Local Policies-User Right Assignment-Log on as a service-Add account




on vCenter server run gpudate /force and click next,error should disappear-click Next

Select DSN Name (created in previous steps)













After installation we can see that setup created a bunch of tables for databases








Unattended install ESXi 6.0

Posted: February 21, 2017 in VMWare

Creating ks.cfg file

This specify install location,root password,network settings and hostname

# Sample scripted installation file
# Accept the VMware End User License Agreement
# Set the root password for the DCUI and Tech Support Mode
rootpw mypassword
# Install on the first local disk available on machine
install --firstdisk=local --overwritevmfs
# Set the network to static on the first network adapter
network --bootproto=static --device=vmnic0 --ip= --netmask= --gateway= --nameserver=
# A sample post-install script
%post --interpreter=python --ignorefailure=true
import time
stampFile = open('/finished.stamp', mode='w')
stampFile.write( time.asctime() )

I copied this file to USB stick (must be formatted as FAT32!!)

We need to specify path to unattended file (Shift+O)



ks=usb (specifies usb as ks.cfg file location-installer will search for all USB drives formated as FAT16/32)



Installation has finished:



Replication in WMware vSphere 5.5

Posted: October 14, 2015 in VMWare

VMware vSphere Replication is a hypervisor-based, asynchronous replication solution for vSphere virtual machines. It is fully integrated with VMware vCenter Server and the vSphere Web Client.

vSphere Replication is provided in open virtualization format (OVF) or with a standard vCenter Server installation.OVF consist of vSphere Replication Server and components being used to administer and manage vSphere replications.With vSphere Replication, you can replicate virtual machines from a source datacenter to a target site quickly and efficiently

OVF appliance can be freely downloaded here,with your VMWare account

After downloading,right click your cluster in vSphere Web Client and choose deploy OVF template


Browse to downloaded OVF file and click next


Accept EULA,provide a name,select appliance location,datastore.destination network,IP protocol,if you choose static IP allocation provide DNS,Gateway and subnet mask info and set root passwordReview service binding information and verify that Binding status is OK and click finish.

After successfuly deployement,open console and check if applianced has booted properly:


Restar vCentar server (in my case i restarted vCenter appliance)

After restart click on vCenter Server,click manage tab,you shoud see vSphere replication tab.Click on it,click Replication Servers,you should see replication appliance


In this example we’ll migrate xp VM from one datastore to another.Please,take note that i am doing this in lab environment,in the real world,we would transfer VM to another vCenter server.

Right click on running VM and select AllvSphere Replication Actions-Configure replication


Select replicate to a vCenter Server


Select vCenter server,i used same vCenter server i am logged in,in real time environment we would use another vCenter server.


Select vSphere replication server,which will conduct migration (in this case our OVA imported template)


select datastore on destination vCenter where VM shold be replicated to


Configure replication for VM.With a Recovery Point Objective (RPO) value we determine the maximum data loss that can be tolerated.If we set the RPO to 10 minutes,it means that vSphere Replication can tolerate losing the data for up to 10 minutes.In our example,the latest available replication instance can never be in a state that is older than 10 minutes. A replication instance refers to the state of a virtual machine at the time the replication starts.We can also enable multiple snapshot instances (Point in time instances) .


Click next and finish.

Click on vCenter Server-Monitor-vSphere Replication-outgoing replication


If we want to configure additional recovery point,right click on VM and choose Sync now



Recovering VM

To quickly recover recent version of VM,select vCenter server that vSphere Replication appliance is registered to from left sidebar-Monitor tab-vSphere Replication-incoming replication.

Select powered off VM,right click and choose recovery


Synchronize recent changes-Performs a full synchronization of the virtual machine from the source site to the target site before recovering the virtual machine,only available if the data of the source virtual machine is accessible

Use latest available data- Recovers the virtual machine by using the data from the most recent replication on the target site, without performing synchronization. Use this option if the source virtual machine is inaccessible or if its disks are corrupted.


Power on virtual machine after recovery


Distributed switches in vCenter 5.5

Posted: September 28, 2015 in VMWare

Distributed switches provides centralized location for setup,provisioning, administration, and monitoring the virtual network for the entire infrastructure.Imagine that we have 10 ESXi hosts and that we have been given task to implement same kernel network on all 10 hosts,instead of repeating tedious and error prone procedure on every of 10 ESXi hosts,we can set up management network on only one host and that changes will propagate to remaining 9.That’s all possible with distributed switches

Creating distributed switch

Right click on datacenter (where ESXi hosts are located) and select New Distributed Switch:


Give switch name or leave default one and click next


Choose compatibility


Choose number of ports available on this switch (define number of NIC’s for this switch),create Port group and name it.

Port group specifies port configuration options for each member port


After Distributed switch (dswitch in further discussion), is created,add ESXi hosts to newly created dswitch.Right click switch and choose Add and manage hosts



In this example,i have 2 hosts


Select check box to apply changes to all added ESXI hosts (template mode)


Choose ESXi host from which changes will be applied to other ESXi servers


We will add ESXi’s NIC to kernel network


Select desired NIC,click Assign uplink and then click Apply to all in order to assign same adapter to all ESXi host.

Note:it’s presumed that both ESXi servers have same number of NIC’s


Now click New Adapter to add previously selected NIC to VMKernel network:


Click browse and select previously created port group


Select service which will be used on VMKernel network



Now go to network properties of both ESXi hosts and review setup,VMKernel network named iSCSI will be seen:



vMotion in vSphere 5.5

Posted: September 17, 2015 in VMWare

VMware vSphere live migration (vMotion) allows us  to move an entire running virtual machine from one physical server to another, without downtime. The virtual machine retains its network identity and connections, ensuring a seamless migration process. We can also move VM to another storage.This article is sequel of my previous article

In this one we will configure vSphere for seemless VM migration from one ESXi host to another.

Creating vSphere cluster

To create vCenter cluster right click on Datacenter-New Cluster


While creating a cluster,we can enable high availability (HA)-detect failure and recover VMs


VMware DRS (Distributed Resource Scheduling), balance VMs over hosts to ensure even resource usage between all hosts

Admission control configures constraints on resource usage and any action that would violate these constraints is not permitted.When you enable VM Monitoring, the VM Monitoring service (using VMware Tools) checks if each virtual machine in the cluster is running by checking for regular heartbeats and I/O activity from the VMware Tools process running inside the guest.You can specify how many host failures cluster can endure.


Enhanced vMotion Compatibility (EVC) simplifies vMotion compatibility issues across CPU generations. EVC automatically configures VM processors based on ESXi’s CPU (AMD or Intel)

Virtual SAN (VSAN) is a software based distributed storage solution which is built directly in the hypervisor (ESXi layer)

Add hosts into cluster:



Creating SAN storage

A storage area network (SAN) is a network that provides access to consolidated, block level data storage

A SAN typically has its own network of storage devices,in this example we’ll be using ISCSi krenel network ( from previous lab.

On FreeNas server,i added two 10GB’s HDD,and created mirror volume (NAS),i already covered creating volumes in prevoius lab,so i won’t go through it again.

After creating volume,we need to share it,click Share-Unix-Add Unix share


Add descriptive name,network from which can be accessed to NFS,and choose Maproot user (root)

  -maproot=user The credential of the specified user is used for remote access by root.


And enable NFS service


Adding NFS storage to Cluster

Now,when we have NFS storage,add it to Cluster,Right click on Cluster and choose New Datastore



Enter the datastore Name,FreeNAS IP address and volume path


Give access to NFS share to both ESXi hosts


Now,when cluster is created,configure vSphere to uses datastores for heartbeating.One ESXi host is declared as master.The following algorithm is used for  selecting the master:

– The host with access to the greatest number of datastores wins.

– In a tie, the host with the lexically highest moid is chosen.

A Managed Object Reference ID also known just as MoRef ID is a unique value that is generated by the vCenter Server and is guaranteed to be unique for a given entity in a single vCenter instance,for more info visit

The master/slave concept is used for monitoring vSphere HA clusters,and it uses an election process to determine which host is to be the master. This election process occurs any time the existing master fails, is shut down, or is placed into maintenance mode.When the master host in a vSphere HA cluster can not communicate with a slave host over the management network, the master host uses datastore heartbeating to determine whether the slave host has failed.If the slave host has stopped datastore heartbeating, it is considered to have failed and its virtual machines are restarted elsewhere Datastore heartbeating allows vSphere HA to determine the difference between a failed host and a host that has just been split off from the others for example.

vCenter uses dastastores to determine VM state

We’ll add two datastores for heartbeating:NFS we created in this post,and another one (iSCSI) created in previous one.

Click on New Cluster-Setings-Edit-DataStoreHeartbeating and select both datastores


VM migration

I created Linux Puppy VM on Datastore named Datastore and want to transfer it to moving machine disconnect it’s DVD drive from it

Right click on VM and choose migrate


Click change host host selection within the cluster


Select ESXi host to which you want to migrate VM



Machine is migrated to



Migating VM to another storage

Puppy VM is on Datastore named datastore and I want to migrate it to NFS datastore

Again right click on VM and choose migrate and this time select change datastore