Search This Blog

Saturday, April 26, 2014

Online Export Virtual Machine Using Powershell

 

Exporting a virtual machine is a great way to archive a virtual machine. It is always recommended to at least backup a virtual machine image once a week or a month.

Why Export is still a good feature to use?

Host level clustering

Even you have setup Hyper-V Clustering, it only provide host level high availability and make sure virtual machine able to power on when one of the node server fail due to unexpected hardware failure or maintenance.

export

Do take note that when setup hyper-v clustering, virtual machines are residing in a shared storage. Make sure, a shared storage has redundant power supply, controller, RAID configuration to increase high availability. However, with redundant components, it still a single point of failure.

Backup

Another way is to perform backup using System Center Data Protection Manager or backup software.

Most customer would love to store disk based backup into the same shared storage with Hyper-V clustering. So we still in the dilemma of “single point of failure”.

Hyper-V Replica

We can leverage on built in replication in Hyper-V Replica. Hyper-V replica allow asynchronous replicate a primary virtual machine to remote site via WAN/LAN.

For more info, refer to

But not a lot of customer has remote site and able to purchase additional hardware for Hyper-V Replica.

Next possible solution:-

To make sure we avoid single point of failure, you can use remote storage or portable external hard disk.

With Windows Server 2012 R2 Hyper-V, you can leverage on “Online Export” to create a clone virtual machine to alternate location. Without power off a virtual machine, you can easily perform export. From the diagram below, take note that a running virtual machine is been exporting to alternate location.

SNAGHTML9b1cd20

We use Export-VM cmdlet, to make a clone virtual machine.

Export-VM –Name * –Path E:\

Above cmdlet, allow us to export an entire virtual machine to E drive.

Online export is available on

  • Windows Server 2012 R2 Hyper-V

This feature is not available for (older version of hypervisor)

  • Windows Server 2008 R2 Hyper-V
  • Windows Server 2012 Hyper-V

These older version of hypervisor need to turn off virtual machine before export a virtual machine.

Before we end, just a quick reminder that performing an export of a virtual machine will guaranteed to boot up the virtual machine on alternate host or recover when disaster happen. Application will still intact however you will not gain back the latest data. VM exported will consist of data during point of exporting. To fully recover to your latest data, the next step is use backup software to recover the data.

That’s all for today. Stay tuned for our next maintenance discussion.

Tuesday, April 22, 2014

Remove Unwanted Checkpoint By Using Powershell

 

In today post, we are going to look on how to check and remove unwanted checkpoint created by user. In my scenario, we do encountered customer who love to create a checkpoint and some till multi-level nested checkpoint . Eventually problem wont start now but soon you may encounter problem such as:-

  • Unable to boot up virtual machine due to lack of free hard disk space. Each time we create a checkpoint, avhd file is created and this occupied hard disk space.
  • Virtual machine performance start to degraded. Once an avhd file is created, your VM will act like differencing disk which consist of parent disk and child disk. Every new data write into the VM will store in avhd file.
  • Corruption occur due to unavoidance circumstance. In order to boot up the VM, you may need to create a new virtual machine configuration and merge existing checkpoint. When this happened, most likely 50% , you will encountered data lost.

Do take note that Checkpoint must handle with care and not meant to replace your backup solution.

Best practice when using checkpoint

  • Don’t leave the checkpoint on your system for quite sometimes.
  • Remove unwanted checkpoint after finish testing and when no longer require.
  • Do be careful when revert snapshot as you may encountering data lost. Make sure, no new data is coming into the VM after create a checkpoint
  • Avoid using checkpoint as backup solution. Use DPM or third party backup software to protect your virtual machine and application data.

Now let look on how to check if checkpoint exist on your virtualization environment:-

For single VM

  • Use Hyper-V Manager snap-in to verify.

For multiple VM, it will be east if we use Powershell

  • Use Powershell Get-VMSnapshot cmdlet
Get-VMSnapshot –VMname *

SNAGHTML53bd1d5

In my scenario above, we identified which virtual machine consists of checkpoint and also when is the creation time.

Well, time to do some clean up!

Execute Remove-VMsnapshot cmdlet

  • Remove a particular checkpoint on a Virtual machine
Remove-VMSnapshot –VMName (Virtual machine name)
  • Remove entire checkpoint in your virtualization environment. This will search entire virtual machine and restore any checkpoint.
Remove-VMSnapshot –VMName *

Once remove the snapshot, the system will merge the checkpoint and remove the temporary avhd file without turn off your virtual machine.

Note:-

  • Above scenario is applicable for Windows Server 2012 Hyper-V and Windows Server 2012 R2 Hyper-V.

Saturday, April 12, 2014

HeartBleed Bug on Virtualization Platform


image
Heartbleed Bug is a serious vulnerability in the popular OpenSSL. This weakness allows stealing the information protected, under normal condition by the SSL / TLS encryption used to secure the internet. For more info, please click here.
Next question:
Does your virtualization infrastructure vulnerable on HeartBleed Bug ?
This is what I have found out during searching to check if my infrastructure is affected.
Vmware Platform
Yes. Vmware has confirmed the following products are affected:-
  • ESXi 5.5
  • NSX-MH 4.x
  • NSX-V 6.0.x
  • NVP 3.x
  • vCenter Server 5.5
  • vFabric Web Server 5.0.x – 5.3.x
  • VMware Fusion 6.0.x
  • VMware Horizon Mirage Edge Gateway 4.4.x
  • VMware Horizon View 5.2 Feature Pack 2
  • VMware Horizon View 5.3 Feature Pack 1
  • VMware Horizon View Client for Android 2.1.x, 2.2.x, 2.3.x
  • VMware Horizon View Client for iOS 2.1.x, 2.2.x, 2.3.x
  • VMware Horizon View Client for Windows 2.3.x
  • VMware Horizon Workspace 1.0
  • VMware Horizon Workspace 1.5
  • VMware Horizon Workspace 1.8
  • VMware Horizon Workspace Client for Macintosh 1.5.1
  • VMware Horizon Workspace Client for Macintosh 1.5.2
  • VMware Horizon Workspace Client for Windows 1.5.1
  • VMware Horizon Workspace Client for Windows 1.5.2
  • VMware Horizon Workspace for Macintosh 1.8
  • VMware Horizon Workspace for Windows 1.8
  • VMware OVF Tool 3.5.0
  • VMware vCloud Automation Center (vCAC) 5.1.x
  • VMware vCloud Automation Center (vCAC) 5.2.x
  • VMware vCloud Networking and Security (vCNS) 5.1.3
  • VMware vCloud Networking and Security (vCNS) 5.5.1
Vmware has published about it here. Most Vmware products which with OpenSSL 1.0.1 are affected
Citrix Platform [Update April 28, 2014]
At this moment, “No” for Citrix XenCenter and XenServer. But affected
  • Citrix Web Interface
Citrix has published about it here.

Microsoft Hyper-V Platform
No. Microsoft Hyper-V Platform does not use open-source cryptographic library (Open SSL).
Meanwhile, Microsoft Account and Microsoft Azure, along with most Microsoft Services, were not impacted by the OpenSSL vulnerability. Windows’ implementation of SSL/TLS was also not impacted.
For more detail, please click here.
Summary
If you’re environment are running the above platform and under affected list, please act fast to protect it before too late.
More details:-

Defrag Cluster Shared Volume in Hyper-V Host

 

Fragmentation is the most common word that we heard. How do you know when fragmentation has occur in your virtualization infrastructure. This often happened when your virtual machine performance start to degraded and occurred when using dynamic disk in production environment.

For fixed disk deployment in production environment, you won’t likely have this issue as the disk has pre-allocated earlier during provisioning.

Last time, we used to use “Repair-ClusterSharedVolume” cmdlet to defrag CSV. But this cmdlet has deprecated. Now it is recommended to run using the command “defrag”

defrag (csv mount point name)
Example
defrag C:\ClusterStorage\Volume1

To check your disk fragmentation status, run

defrag C:\ClusterStorage\Volume1 /A /U /V

  • /A = Perform analysis
  • /U =print progress on the screen
  • /V = print verbose output

Below is the sample of two volumes that we are going to run defrag and check for fragmentation.

Volume 1

Displayed a result indicated that volume 1, do not require to defrag. So no fragmentation issue.

image

Volume 2

But volume 2 indicated that got fragmentation and we need to defrag the mount point.

image

To defrag the mount point we need to turn on redirect access first. Go to Powershell and execute command Suspend-ClusterResource.

About Suspend-ClusterResource Help:-

image

Suspend-ClusterResource (Cluster disk name) –RedirectedAccess

SNAGHTML199b0cc

Begin to solve fragmentation by run defrag command after set disk to redirect access mode
defrag C:\ClusterStorage\CSV2

image

This process will run for quite a long period depend on how much your fragmented disk . Just wait till it complete.

While performing this operation, your production virtual machine is still up and running. However we still recommend that you run during non peak period as it will slightly impact your VM performance and this is similar when you performing VM backup using DPM.

End result:- Total fragmented =0

image

Once the defrag process has completed, you need to turn off redirect access by using this command

Resume-ClusterResource (cluster disk name)
Result-ClusterResource CSV2

SNAGHTML1d9fd4f

Now your have solved your fragmentation issue, virtual machine should run in top condition.

Lastly before we sign off, do choose wisely on when to use dynamic disk and plan carefully your deployment to avoid fragmentation,

Wednesday, April 9, 2014

Starwinds News:- April 9, 2014

 

Some information sharing from our blog sponsor-Starwinds and free NFR to grab

News 1: – Shortlisted in DataCentre Solution Awards

StarWind iSCSI SAN&NAS and StarWind Native SAN for Hyper-V, have been shortlisted in the Datacentre Solutions Awards as the Datacentre ICT Storage Software of the Year.
Their Press Release is here: http://www.starwindsoftware.com/news/114

Vote now
If you believe we deserve to win these awards please vote for us!

Thank you for your time and support!
StarWind Team

News 2 :- Free NFR Key for Starwind SAN V8 is available for IT certified professional

If you do have the following certification,

image

You can get free license is necessary to register here:
http://www.starwindsoftware.com/free-nfr-license-v8?utm_source=blogs&utm_medium=textlink&utm_campaign=campaignId-358

Hurry ! Offer is valid till March 31 2014.

.

Sunday, April 6, 2014

Hybrid Cloud–Enable Distributed File System (DFS) in Microsoft Azure

 

DFS is an efficient multiple master replication engine that you can keep folder synchronized between servers across limited bandwidth network connections. It replaces the FRS as the replication engine and is the most common features that we always use when we would like to replicate file/ folder for multiple site location.

DFS Replication uses a compression algorithm known as remote differential compression (RDC). RDC detects changes to the data in a file and enables DFS Replication to replicate only the changed file blocks instead of the entire file.

With Microsoft Azure in the picture, we can use the infrastructure as the DR scenario and available to corporate environment when primary file server failed.

To setup, it is quite easy.

DFS

On premise environment

  • deploy at least a File Server and install the DFS roles

On Azure environment

  • Create a VM and install with DFS Roles as well. For high availability, we recommend to create another VM and configure as Availability Set. For more detail, please refer to here.

Virtual Network

  • Configure site to site vpn between on-premise environment and Microsoft Azure

Redundancy

  • Create an additional domain controller VM at Microsoft Azure. For more info, click here.

To enable roles, use Server Manager and add

  • DFS Namespaces
  • DFS Replication

image

Use DFS Management snap-in to create a domain namespace.

We have created Input Folder on premise and two target folder at Microsoft Azure.

  • \\RED-DC01 –> on premise
  • \\RED-FS01 –> on Azure (refer to AD Site)
  • \\RED-FS02 –> on Azure (refer to AD Site)

image

Configure DFS Replication

Right click the folder and select Replicate Folder

image

Define the Replication Group Name

image

On Replication Eligibility, will list as three DFS as replication member (1 FS on premise and 2 VM at Azure)

image

On Primary Member, select on premise DFS server. This will give this server as authoritative right when checking on duplicate data. It make more sense to set on premise server as primary since most of the time client machine access from on premise LAN and DFS will point client to nearest DFS server.

image

On Topology, we just select Full Mesh as we would like the data to be replicated to all members and to each others.

image

Replication Schedule:-

Set to always replicate and set bandwidth to 4Mbps. This will ensure data always on sync. You can choose another bandwidth according to preference.

image

Click Create to complete the replication settings.

image

Verification on settings.

Connection.

image

Schedule

image

Usage

By default, user will always pointed to on-premise DFS server as that it the nearest cost and data store to on-premise will replicate to Azure VM- DFS server.

To know more about DFS, please refer to:-

Friday, April 4, 2014

Preview Microsoft Azure Portal

 

Microsoft has just released a preview version of “Microsoft Azure” portal and may replace the existing portal.

Let have a quick look on the portal.

After login, you can view a dashboard and the health of Azure datacenter in a world map with the indicator of the health.

image

The dashboard can be customize, resize and reorder. You can easily move the item. (Right click | Customize)

image

Navigation is on the left side compare to previous version which is on the bottom.

Click on Browse will most likely view “Paas resources”.

image

Click on Billing to view your existing subscription and remaining credit.

image

Some sample of the billing report

imageimage

Click on +New to create your resources

image

image

Well, at this moment this is just a preview version which has limited features. You still need to just full Azure Portal to create resources and this preview version cannot use to create resources.

The interface was nice. If you’re interested to view the “Preview version of Microsoft Azure”, please visit this link :- https://portal.azure.com. Enjoy!

Thursday, April 3, 2014

Windows Server 2012 R2 Update 1 and Windows 8.1 Available on MSDN

 

Yesterday during Microsoft Build 2014, they have announced Windows Server 2012 R2 Update 1 and Windows 8.1 Update 1. For those with MSDN subscription, you can download from MSDN. (as highlighted)

image

But how about download freely? Well, nothing is available when you click “Check Update” on Windows Update yet. Don’t worry, it will be available to public on April 8 2014. So mark your calendar and prepare to update next week.

Update 1 consisted of previous update from Microsoft. Therefore, you do not need to manual download previous update. What’s new /enhancement for Update 1 for Windows Server 2012 R2? Feel free to check out the post from here to know more. 

One thing to sure that “Future updates as of the patch Tuesday in May, including security fixes, will be based on Windows Server 2012 R2 Update as the baseline”

So if you got MSDN subscription, hurry to http://msdn.microsoft.com to grab while it last (joking).

I’m downloading right now … Smile