Archive

Posts Tagged ‘Hyper-V Virtualization’

HyperV 2012 R2 preview

November 1, 2013 Leave a comment

Its been over a year now and as soon as Microsoft put out the newest version of HyperV (Windows Hyper-V 2012 R2) I decided to give it a try. There was a new WMI namespace that promised to bring a heap of features to HyperV that would rival the other virtualization platforms and I was eager to get them working in the Lab. Unfortunately it might have been a bit premature but more on that later.

After reinstalling (MS suggests it and I had an error when I tried to upgrade from my HyperV 2012 hosts so I was forced to install a fresh copy),

HyperV-R2-Upgrade-Issues

After I installed the RSAT for Windows 8.1 I encountered some problems connecting to the HyperV options from my Windows 8.1 workstation using the HyperV manager but I was not immediately alarmed. I also noticed that I could not connect to my older system (Windows HyperV 2012) and chalked it up to the new WMI Namespace issue (Windows deprecated the older V1 namespace in the new versions of Windows 8/2012 R2).

After following the lessons learned in the previous post here I was able to create my new Cluster using the following powershell command on one of the HyperV hosts.

‘New-Cluster -Name JSI-1 -Node HyperV1,HyperV2 –NoStorage’

I could then create my new VMs and ISO directories on the Clustered Shared Volume and start recreating my VMs.

‘New-VM -Name SW1 -Path C:\ClusterStorage\Volume1\VMs –Memory 512MB –SwitchName “New Virtual Switch”’

After all my vms directories were created I uploaded my vhd files to add to my VMs. (I decided to convert them to vhdx because they continue to use this new resilient image format introduced in 2012).

‘Convert-VHD –Path C:\ClusterStorage\Volume1\VMs\SW1\SW1.vhd –DestinationPath C:\ClusterStorage\Volume1\VMs\SW1\SW1.vhdx’

I was now ready to add my newly created vhdx files to my existing VMs and finally to spin them up.

‘ADD-VMHardDiskDrive –VMName SW1 -Path C:\ClusterStorage\Volume1\VMs\SW1\SW1.vhdx’

and finally let’s setup the dynamic memory feature like so…

‘Set-VMMemory –VMName SW1 -DynamicMemoryEnabled $True -MaximumBytes 1GB -MinimumBytes 256MB -StartupBytes 512MB’

Now let’s start that bad boy and get it back online…

‘Start-VM –name SW1’

(Here are the all of the commands for HyperV now for 8.1 and 2012 R2)

All is well again – well maybe not…

At the time of this writing there were all types of connection problems with the GUI tools. Windows 7,8,8.1 didn’t connect properly and even the Cluster Administrator with a newly installed Windows 2012 R2 server didn’t fully function. Powershell on the Hyper-V box was the only thing that worked properly – thank god for Powershell.

Maybe the GUI tools will mature after I write this article…

I mean after all it is Windows right Smile

Cluster Aware Updating really works!

October 28, 2012 Leave a comment

 

One of the things that can set apart a business is failover technology – lets’ face it stuff happens. Hard drives develop errors, power fails and your computers just stop. As a MSP I can wait to find out about it a few minutes after it does from my clients (who are not very happy because it failed) or I can find out with extensive monitoring that is constantly checking the hardware/software environment but I can’t really do anything about it unless we configure additional hardware/software to kick in when it happens. Until now those setups were large and expensive and involved clustering file systems, multiple servers and quite frankly would require dozens of man-hours to setup and maintain. Disaster recovery involved thousands of dollars per month to have on hand just in case you needed it.

Along comes Windows 2012 Hyper-V with features that help bring the cost of having the benefits of this technology to a small business for a few thousand dollars per year!

Enter Cluster aware updating – this new feature of Hyper-V allows any small to medium enterprise (SME) to implement two Hyper-V servers with enough memory to run all of the virtual servers they need to operate their business (Exchange, SharePoint, File server, SQL, etc.) Most systems come with redundant hardware (power supplies, hard drives, etc.) so a single point of failure is all but eliminated but what about updates and maintenance? If you want to keep everything running or even just want to test your recover options in the event of failure you need to fail over your live system with as little or no downtime right?

Let’s looks at an example below

image

Cluster Aware Updating initiates an update. It is determined that one of our Hyper-V machines needs an update so it is downloaded. CAU migrates the VMs off to another member of the cluster.

 

image

 

Next is a screen of the CAU progress as it begins to apply the update

 

 

image

After the update is applied CAU issues a restart of that member of the cluster.

 

 

image

Once the restart is complete for the patched Hyper-V machine all members are scanned again for patches

 

 

image

Migration back to preferred machines occurs once all Hyper-V machines have been updated and restarted.

 

 

All of this can happen automatically just as you schedule Autoupdates for all of your desktops. There is no need for an administrator to manage each patch and to manually apply them. You can still have little or no downtime and have complete fault tolerance for your SQL and Exchange databases which means no interruption for your business.

Now did I mention that it’s all free! Not one maintenance fee, not one software license or add-on cost associated with this solution – all you need are a few machines to run Hyper-V and your finished. Now I would like to see VMware come up with something that tops that!

New Hyper-V Replica feature makes migration easier

October 11, 2012 Leave a comment

 

I recently had a problem when I upgraded to Hyper-V 2012 with an older test machine (DC5750) that just wouldn’t work with the new kernel. I decided that it was time to create a new Cluster and dreaded the Import/Export that I was going to have to do. I thought this would be a great time to test the Replica feature. Not only will it allow you to replicate VMs onto another Hyper-V machine for disaster recovery but it will also allow you to replicate to another cluster!

image

Here I show you a snap of the Failover Cluster Manager with both of my clusters (MyCluster is the old cluster I am migrating from – you can see Hyperv8 is the only node and Cluster1 is the new one). You have to create a Replica Broker for Replications to occur on a cluster and I have now setup SW1 to replicate to the new cluster. Now I have all four of my VMs configured to replicate changes ever 5 minutes and can take my old cluster offline when I am ready. It will require me to start the new VMs on the new cluster but I can do this at any time.

Hyper-V Replica keeps a log of any changes to these VHD files and replicates those changes to the other VM. This results in a fairly quick time to recovery if any issues should ever happen to your main cluster. Initial replication can even be done offline to a disk and imported into the other site so bandwidth issues and large VMs are not a problem. You can even do all of this with a single NIC!

I am not happy that at the time of this writing they still do not have any management upgrades for Windows 7 (you will need to have a full version of Windows 2012 or Windows 8 to manage these new features) but I like the fact that the old Hyper-V management application will still allow you to work with your VMs.

Windows has hit this one out of the park and has challenged both Citrix and VMware to step up to the plate for most SMBs. I hope you find it as robust as I do and consider implementing your own CFS.

Setting up your 2012 Hyper-V Cluster

September 19, 2012 1 comment

I decided to undertake an upgrade of my Windows 2008 R2 Hyper-V cluster this week and assumed that it would be easy (it wasn’t). After getting it up and running there were a few lessons I learned that I wanted to share with my readers.

If you haven’t already read my previous post regarding getting your cluster up and running with the older 2008 R2 version here it is. Reviewing it will help expose some of you neophytes to the process of using clustered storage. There is a new feature available with the new Hyper-V 2012 that is called Replication and I first thought this would work for my application but it doesn’t automatically start the VMs (which can be a good thing but more on that in another post). You still need to get shared storage working so I began by reusing my 32-bit version of Open E-DSS 6 (http://www.open-e.com/products/open-e-data-storage-software-v6/).

It turns out that trying to mount the iSCSI shares proved too difficult for me to simply reuse so I had to format my Clustered Shared Volume (CSV1) so I could use it again with the new Hyper-V servers.

To add the storage to a newly installed version of Hyper-V 2012 I had to type

‘netsh firewall set service type = remoteadmin mode = enable’

on the console to enable remote management from a Windows 2012 server. (The server manager won’t connect to Windows 2012 from Windows 7 – I think you must be using Windows 8). I then typed powershell to begin a shell on the hyperv box. image

‘Import-Module servermanager’

followed by

‘add-windowsfeature Failover-Clustering, MultiPath-IO’

to install the features. This is even easier than dism on the old server.

Next we run ‘iscsicpl’ to add the iSCSI node for storage. This is my DSS box with a RAID 5 SCSI array that has 5 36G drives in it. 4 drives in a 100G array with one hot spare.

Next I exit out of powershell by typing ‘exit’ and then run ‘diskpart’ to format the drives (on the first machine – I only cover the data drive below but you will need to configure the Quorum drive if you are setting everything up for the first time). This puts you in a terminal style windows so we type commands on a new line and hit enter to run them. To see all of your existing disks you can type ‘list disk’.

‘select disk ?’ (replace ? with whatever the new disk number for the iSCSI disk is)

‘create partition primary’ (this will create a new partition on the drive you selected above)

(if it gives you a read only error you can force it off by typing ‘attr disk clear readonly’  first and then repeat the command to create the partition.

format fs=ntfs label=”CSV1” quick (this will format the partition as a NTFS filesystem so that you can use it as a clustered file system. Type exit to leave the diskpart shell.

If you want to use some powershell cmdlets for configuring the vms or the cluster options you will need to add a few additional roles and features. I have outlined all of mine below.

 

 image

I have chosen to configure storage and the hyper-V options from my Windows 2012 server with the GUI enabled. This also gives me the option of configuring the Cluster features remotely too because I do not have a working Windows 8 desktop yet.

If you want to use the Cluster Aware Updating that comes with Hyper-V 2012 there are a few things that must also be done (aside from adding those features above).

To enable Cluster aware Updates you must disable Automatic Updates on each HyperV server. You must also install the Cluster Powershell tools Features. Run the following powershell commands to allow the Cluster Manager to restart your HyperV after applying updates

‘Set-NetFirewallRule -Group "@firewallapi.dll,-36751" -Profile Domain -Enabled true’

To verify if your cluster can use Cluster Updates run the Cluster Update awareness tool.

image

I am very impressed at the functionality of the new hyper-V and I think it will give VMware a good run for the money. With replication for DR and Live migration to and from clusters to standalone machines this VM host platform with allow SMBs to have enterprise features without the costs.

Backing up your Hyper-V cluster with Trilead

September 2, 2012 Leave a comment

It’s been a while since I wrote about any VM backup software (or for that matter ANYTHING) but I wanted to take some time to update my readers on a great little software from the folks at Trilead. I have been using this software since the early version 3 releases and they lost my attention when they began to require the VMware guests be shutdown before they were backed up. Now in version 4.0.37 I noticed that they have added that functionality back along with Hyper-V support! (actually Hyper-v had been added earlier than 4.0.37 but now that I have a Windows 2012 test machine I noticed that it was supported).

They have added a two server restriction so you will only be able to connect to a maximum of two servers but as long as you don’t have more than two nodes in your cluster you can use the Free version.

image

You can backup all of your virtual machines running on your Hyper-V cluster and you can even move them by backing it up and then restoring it to another host (unfortunately you cannot use the replication feature in the free version although who would want to – migrating from one hyper-v to another in a cluster is easy).

You can only perform a full backup on any of these vms but since this is a free product and you can do it while the guest is running I think this software is a great plus you can check them out at http://www.trilead.com/Editions.   Where else can you find a software that will allow you to backup a vm – convert it and then import it to a hyper-v cluster that is free?

Deploy Hyper-V Cluster image using PlateSpin Migrate 9.1

February 6, 2012 Leave a comment

 

The new platespin migrate has come out last August and we thought it was time to test drive it on the Hyper-V SP2 cluster we have created. Unfortunately you cannot directly connect to a cluster or a Hyper-v host so you have to setup your new environment in what PlateSpin calls a semi-automatic mode. This requires that you boot an ISO image on the target virtual machine making sure to set it up with as little or more resources as your source (hard drive, space, RAM, etc.)

One of the nice things we notice right away is the use of a debugger for determining why the boot loading/registering process won’t work. It also has the ability to inject drivers after a failed migration which is very handy too! Platespin-Migrate-Boot-ISO

Hyper-V-memory-settings

 

 

(As an aside – we noticed that our XP test failed to boot stating that there was not enough memory when in fact we were using 512MB and platespin only requires 384MB. They do have a smaller memory boot ISO available if you need it but in our test platform this issue was resolved by using the new dynamic memory feature of Hyper-V SP2.)

 

 

 

After the controller is downloaded and started we wait a few minutes for the discovery process to finish and we have a new target that shows up in our Platespin migrate client.

PlateSpin-Discovery

You can see the new target appearing on the bottom of our display above. The boot ISO images register with the PlateSpin Migrate server using a randomly generated host name.

We can then deploy our Windows XP image using an image that we have captured to our new Hyper-V target.

Migrating AsteriskNOW VMs from ESXi to Hyper-V

January 30, 2012 Leave a comment

 

I wanted to touch base with some of you and share my experiences with virtualization. For those of you who have followed some of my posts you may be asking ‘how can I export/import’ between the different virtual hosts. (I have been asking myself this question for a few years now). As some of you are no doubt aware there are a number of tools available for a price that will enable the user to make this migration with as little time as a can of coke and some tim-bits but for the average tech out there these tools are expensive. Some of them work great between one platform or another but not all of them work perfectly. As I am a man on a budget and choose only to spend money when I have to I tend to lean towards tools that are free that, although they may take time and expertise to operate, make my bottom line, and that of my clients, easier to swallow.

Part of the problem with changing hypervisors is that apps like Xen and Hyper-V use vhd files while vendors like VMware have made their own type called vmk. There are some tools that will convert from one file type to another but they don’t take into consideration the different architectures that you made the VM image with and plan to run it on. Then there are drivers – those can blue screen a windows system or hang a Linux based system if you aren’t careful.

Well I recently tried to migrate some vms from my ESXi 5 machines onto a Hyper-V cluster and made some interesting observations.

OpenSUSE has a hard time converting from vmk to vhd because of the sixe of the resulting vhd reporting a superblock size difference. If you run resize2fs on the disk you can actually get the vm to boot on the Hyper-v system.AsteriskNOW-config (Might require the Integration tools – more on that later)

AsteriskNOW runs on CentOS and has no problem running on Hyper-V clusters but I warn you – you must set the MAC address to be static on a Virtual Network Adapter in order to have the IP come up on the other Hyper-V hosts in the cluster. (Incidently I have used VMs to run asterisk in my home office for almost a year now without any issues).

We need to do a few things to add the Hyper-V Integration tools for Linux to make this complete. You need to install the GCC compiler and any dependancies to be able to compile the Hyper-V tools (storage, VM bus, synthetic NICs, etc.) Once installed you should see the boot screen resemble something like this 

Hyper-V-Linux-Tools

Now that we have confirmed that the guest is back online let’s shut it down with the tools.

AsteriskNOW-HANext we can add the VM to the list of HA apps on the cluster.  Once we have done that let’s start it up again to confirm it can boot.

 

Now if one of my vm hosts goes offline (loss of power, network, etc.) then my PBX is dynamically moved to a new host and brought online again with a short downtime (about 15 seconds) shown below.

AsteriskNOW-Failover

It sure is nice to have AsteriskNOW running on a free cluster now (without the cost of running enterprise software Winking smile.