Archive for September, 2015

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

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

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.

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 192.168.0.9 Datastore named Datastore and want to transfer it to 192.168.0.10.Before 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 192.168.0.10

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

vCSA is .ova file and can bi imported through vSphere Client ot through VM.I imported it using VMWARE Workstation Virtual Machine,after importing and starting VM you need to configure it via WEB browser:

A portal specifies the IP address (0.0.0.0) and port number (3260) to be used for iSCSI connections,

(0.0.0.0 means that FreeNAS will listen on any interface)

Adding Target

An iSCSI target is a dedicated network-connected hard disk storage device,it refers to a storage resource located on an iSCSI server.A target combines a portal ID, allowed initiator ID, and an authentication method.

Choose from drop down menues initiator and portal we just created (1)

Adding extent

An extent is seen as the storage unit being shared,ie it’s virtualized representation of unformatted physical disk

In my previous article we performed database backup using Windows Backup,and in this one we’ll restore database to folder c:\b

Available backups are shown:

Because i backed up folders,not entire drive,i chose Files and folders

I selected mailboxdatabase folder

Click recover

Database and transaction log files are restored to same folder (c:\b)

Restoring to recovery database

A recovery database is a special mailbox database that allows mounting and extracting data from a restored mailbox database.

Database we just has restored is in dirty shutdown state (there are transactions that are await to be committed to the database).

We’ll use eseutil utility which is part of Exchange to bring database to clear shutdown mode (database is correctly detached-so we can mount this database file to recovery database)

PS C:\b> eseutil /mh '.\bigfirm_db01,on_bigfirm.edb'

/m displays headers of database files and transaction log files

/h – dump database header

To get Clean Shutdown,we must perform soft database recovery (transaction logs are replayed into an offline file backup copy of a database)

PS C:\b> eseutil /R E00 /l .\ /d .\

/R replays transaction log files or rolls them forward to restore a database to internal consistency or to bring an older copy of a database up to date-https://technet.microsoft.com/en-us/library/aa998075(v=exchg.65).aspx

/l path to log files

/d path to database file

Both log and database files are in same folder-c:\b,(I cd into that folder,that’s why .\ is used -current folder)

E00 logfile prefix (note that all log files start with E0)

Check database status,it should be in clean shutdown mode now

Now we can mount edb file to recovery database

Creating recovery database

Recovery database is created as any other mailbox database except we need to specify -recovery switch,

edb path is fedb file to database we recovered using Windows Backup and log files are in c:\b folder (also restored from backup)

Message Classifications allow users to assign a tag to a message, such as marking it confidential.These informations Exchange Server and Outlook treat in a special fashion.When a message is classified, the message contains specific metadata that describes the intended use or audience of the message.

The Data Loss Prevention Policy allows users to define policies and policy rules for the organization to improve protection of information usually sent through email, including financial and personal data.DLP policies contain sets of conditions, which are made up of transport rules, actions, and exceptions.

In this example we’ll create policy which,in case someone in organization,send a mail with word “salary” in subject or body,report will be sent to administrator.