Chris and Daves SharePoint and Tech Blog

All about SharePoint and Technology
  • rss
  • Home
  • About Dave
  • About Chris
  • Links and Resources

Mount a VHD File as a Drive in Windows 7

Dave Coleman | August 30, 2010

One of the features in Windows 7 is the ability to mount a VHD file as a drive, this could be very useful in this world of HyperV because this allows you to extract a file directly from the VHD file on a desktop machine very useful if you have a VHD backup of your server and just require a few files. 

The first step is to open disk management, once open right click on Disk Management and choose “attach VHD”.

Once attached you will see a new drive in my computer, you can then copy files from and too the mounted VHD file.

To dismount the VHD from disk manager just right click on the disk and from the sub context menu choose “Detach VHD”

You can as well mount the VHD from the command prompt or via PowerShell first from the CLI load diskpart

Next use the command select vdisk file=”C:\vhd\test.vhd”

To attach the VHD use the command attach vdisk

To unmount the VHD use detach vdisk

UPDATE

Deano left a great comment on the post:which i thought i would share -

“This is a really handy feature of Windows 7 that I have used a lot of times. One thing to point out is that this feature is only available in Windows 7 Enterprise and Windows 7 Ultimate”

Dave

Comments
3 Comments »
Categories
VHD, Windows 7
Tags
HyperV, VHD, Windows 7
Comments rss Comments rss
Trackback Trackback

System Center Virtual Machine Manager

Dave Coleman | August 21, 2010

  This post is a follow on to my Free HyperV Monitoring Tool post where I showed you a free but limited HyperV tool for monitoring your HyperV environment, in this post I will look at Microsoft System Center Virtual Machine Manager and show some of the benefits for managing your HyperV install with this management tool.

 At Twynham we now have 2 HyperV farms one on our domain and another is for a SharePoint deployment we are hosting for the Dorset Local authority (but more about that later) for our domain SCVMM has many benefits one of the biggest being the ability to create P2V (Physical to Virtual) snapshots of our production servers SCVMM has proved an invaluable tool that we have used a great deal to help on the road to a virtualized environment.

The illustration above gives you an administration view of your HyperV deployment this report gives you a pie chart view of your hosts, Virtual Machines, Recent Jobs and library resources

I think the biggest win with SCVMM is the ability to control all of your HyperV servers from one interface for example we have been working on a customer’s site this week and they have 5 sites one with a 4 server failover cluster and 2 other sites with single HyperV servers running a number of virtual servers. Through SCVMM this brings the management of all these virtual servers into one interface simple to use interface for more details check out the SCVMM website.

Dave

Comments
1 Comment »
Categories
HyperV, SCVMM, Server 2008 R2
Tags
HyperV, SCVMM, Server 2008 R2
Comments rss Comments rss
Trackback Trackback

Getting HyperV Statistics Using PowerShell

Darren White | August 19, 2010

Guest Post By Darren White

  Today myself and Dave where working on a customer site when the question of HyperV statistics came up, it would be good to be able to see what free memory was available on the host machine and also what memory was being used by the guest OS’s, now as has been pointed out in previous posts Dave is no expert with PowerShell but very much a newbie, whereas I am a past master (I do my best). So after searching codeplex I found the PowerShell Management Library for Hyper-V.

  After downloading and extracting please remember to unblock the zip file as illustrated below or you may encounter errors when trying to install and run the commands.

Once installed the obvious first step was to see the output of the commands, this proved to be very extensive and perfect for the job. The command we were most interested in was Get-VMSummary as illustrated below.  

As you can see the output is in list format for each item and this makes it hard to get an overview of data so the next step was to pipe it into Format-Table; Get-VMSummary | Format-Table. As illustrated below the formatted table makes it easier to read.

As you can see there is a lot of information presented that we do not need, so by using the format-table command we can specify the columns we wish to output to the screen. The main information we needed was:-

Hostname (Host), Virtual Machine Name (VMElementName), Installed Operating System (GuestOS), Number of Allocated CPU’s (CPUCount), Allocated Memory (MemoryUsage), Current State i.e. Running/Stopped (EnabledState)

Get-VMSummary | Format-Table Host, VMElementName, GuestOS, CPUCount, MemoryUsage, EnabledState

The next step was to output the information to a CSV file; this was achieved by replacing Format-Table with Select-Object and then piping this into the Export-Csv command. We also used the Sort-Object command to order the output by virtual machine name.

Get-VMSummary | Sort-Object VMElementName | Select-Object Host, VMElementName, GuestOS, CPUCount, MemoryUsage, EnabledState | Export-Csv VMInfo.csv -NoTypeInformation

The next step was to get the information from all the HyperV servers in the current domain this was achieved by using the Get-VMHost command as can be seen in the illustration below.

To continue writing our PowerShell script we included the parameter –server for the Get-VMSummary command. We passed this parameter from the Get-VMHost inside a foreach loop.

Get-VMHost | Sort-Object | foreach {
Get-VMSummary -server $_ | Sort-Object Name | Select-Object Host, VMElementName, GuestOS, CPUCount, MemoryUsage, EnabledState | Export-Csv “$_ VMInfo.csv” –NoTypeInformation
}

This will create a new CSV file for each hyperV server with the virtual machine information we have asked for.

The next step we needed to achieve was to merge the individual CSV files into one master CSV file containing the desired information on all the virtual machines in your domain. To do this we need to store to output in an array for each HyperV server instead of outputting to the CSV file. Once the array is populated we output this to the master CSV file.

$content = @();
Get-VMHost | Sort-Object | foreach {
$content += Get-VMSummary -server $_ | Sort-Object Name | Select-Object Host, VMElementName, GuestOS, CPUCount, MemoryUsage, EnabledState
}
$content | Export-Csv VMInfo.csv –NoTypeInformation

This script we saved as a PS1 file and then ran from within PowerShell, the CSV output you can see below.

This gives a great overview of all the virtual machines you have running on your HyperV server and will be a great aid when it comes to balancing the load across your HyperV servers.

A trick we used to balance the server load was, once we opened our CSV file in Excel you can use the function sumif to create the following formula, =SUMIF($A:$A,H1,$E:$E).

In our CSV column A we have the HyperV Hostname and Column E is the Virtual Machine Memory allocation. Cell H1 is next to the formula containing a HyperV hostname. We then copied this formula to the cells below for each HyperV (i.e. H2 will contain the hostname for the second HyperV and so on)

This will show the amount of Ram used on each HyperV server by the virtual machines and we hope it helps with balancing your HyperV implementation. As you can see from the illustration above our HyperV server will need balancing but that is the point of the post so we can now live migrate our virtual Servers and rerun the script until we are happy with the spread on across all of our HyperV host servers.

I hope you enjoyed this post and any questions please submit via comments on the blog or by going to http://twitter.com/whitefern and asking me there.

Darren

Comments
1 Comment »
Categories
HyperV, Powershell, Server 2008 R2
Tags
HyperV, Powershell, Server 2008 R2
Comments rss Comments rss
Trackback Trackback

Fully Virtualised Environments in HyperV. Theory meets reality head on!

Chris McKinley | August 13, 2010

You may be aware of a constant debate that goes on between myself, Dave and a few others in education about running virtual environments and whether they should/could be 100% virtual of if you would need some physical domain controllers put into the mix. If you’re not familiar with the debate have a quick read of this http://sharepointineducation.com/?p=2056

So as you see, I’ve always maintained that you can have a completely virtual environment and in theory it’s all fine.

Well theory came crashing into reality this week. There was a planned power outage at school; the only flaw in the plan was that no one told us. We made it to the server room just in time to watch the UPS run out and experience the eeary sensation of a silent server room. One of the things to die was a fully virtual environment we have been playing with. The two node hyper v cluster is part of the same domain as the virtual machines that run on them. They both go off because of power and you have no domain. The theory being that you can just log in locally and start the DC, then boot 2nd node then reboot node 1. What I hadn’t taken into account was that the cluster would not load and the DC was not available to boot from the cluster manager.

Lessons were learnt. Here they are.

If running a fully virtual environment the failover cluster and associated cluster shared volume will not start as there is no domain – this is a problem.

We fixed it by removing the cluster volume and just assigning it a drive letter on node 1 of the hyper cluster, the VHD for the domain controller could then be copied onto the local C: of node 1 and fired up via hyper-v manager. The 2nd node could then be fired up and now having a domain to join was fine and the cluster volume was all good. The 2nd DC was then moved to the C: of node 2. Node 1 could then be restarted and all was good from then on.

So if you go fully virtual don’t put all your domain controllers in the cluster, keep them local, one on each node as they can be started independently of shared storage or cluster.

Although I still wouldn’t be brave stupid enough to do this in production ;)

Comments
6 Comments »
Categories
Active Directory, HyperV
Tags
Active Directory, HyperV, Server 2008 R2
Comments rss Comments rss
Trackback Trackback

HyperV Licencing of Guest Operating Systems

Dave Coleman | June 28, 2010

 As I have said I previous posts myself and Alan Richards have been giving a series of presentations on SharePoint 2010 and virtualization, this is an ever evolving presentation thanks to questions we get asked and one of those questions was the licencing model for HyperV so I thought that through this post I would explain the licencing of your Guest Windows servers OS’s on HyperV and the different licencing options you are presented with depending on the host version of Windows that you choose to run your HyperV environment on.

 As I stated in a previous post on licencing SharePoint 2010 for education in the UK the subject of Microsoft licencing is always a lively discussion and so it proved with that particular post but from the research I have done I think the licencing model for HyperV is pretty cut and dried (Well let’s hope so.)

Windows Server 2008 Standard

 This version provides you with a single free licence for your HyperV guest windows server operating system.

Windows Server 2008 Enterprise Edition

 The enterprise edition of Server 2008 allows you to run 4 guest Windows server instances free from additional licence costs.

Windows Server 2008 Datacentre Edition

 With the Datacentre version the licencing model for the host is slightly different in as much as this version is licenced per processor (Not cores but physical platters) so a single quad core processor would only require 1 Datacentre licence but does provide the best value for large HyperV environments, as this version of Windows server provides you with unlimited licences for your guest Windows server operating systems. The Datacentre version was at one point only available as an OEM product when purchased with hardware but that changed in October 2006 and is now available through your normal licencing channel.

 I have provided below a simple table to help with your decisions on which version of Windows server to run in your host HyperV setup.

Windows Server 2008

Standard

Windows Server 2008

Enterprise

Windows Server 2008

Datacentre

 

1 Physical + 1 Virtual Licence

 

1 Physical + 4 Virtual Licences

 

1 Physical + Unlimited Virtual

But licenced per processor

Comments
1 Comment »
Categories
HyperV, Licencing, Server 2008 R2
Tags
HyperV, Licencing, Server 2008 R2
Comments rss Comments rss
Trackback Trackback

Free HyperV Monitoring Tool

Dave Coleman | June 19, 2010

 Myself and Alan Richards have so far given 3 SharePoint 2010 in Education presentations on using HyperV to host your SharePoint 2010 environment and we have be amending the presentation as we go thanks to questions and comments from the attendees, well the presentation we gave yesterday in Manchester was the first time we have been asked about monitoring our HyperV farms.

 This question was asked by a VMware user who wished to save money year on year and switch to using HyperV, but one of his concerns was the switch would deny him the use of the VMware monitoring tools which apparently are superb. So I thought over the next couple of posts I would cover 2 of the tools available to monitor and administer your HyperV environment. The second post will cover System Centre Virtual Machine Manager but I thought I would start with a free tool.

 So I would like to introduce you to the best free HyperV monitor that I have found, it is written by Tore Lervik MVP and is just a desktop gadget that is one of those rare breeds a piece of software that does exactly what it is designed for just monitoring your HyperV servers no more no less, This gadget just sits on my desktop and lets me know in a visual manner what activity is happening and more importantly for me how much memory I have available on my HyperV host servers.

The tool is currently on version 5.2 and some of the features are

VM CPU Graph

Wake on LAN support

VM RDP (If the host is running 2008 R2)

Multilanguage support

I cannot tell you how useful this gadget is, so why not download it and give it a go you will not regret it the download can be found at http://mindre.net/post/Hyper-V-Monitor-Gadget-for-Windows-Sidebar.aspx

Dave

Comments
3 Comments »
Categories
HyperV, Server 2008 R2
Tags
HyperV, Monitoring Tools
Comments rss Comments rss
Trackback Trackback

SharePoint 2010 Topologies Part 3

Dave Coleman | April 13, 2010

 In my previous post of this series I looked at the standard topologies for SharePoint 2010 through this post I will look at how we at Twynham are going to configure SharePoint 2010 for our environment. We will be deploying SharePoint 2010 and SQL 2008 in a HyperV cluster the configuration for our virtual servers will be SharePoint web front end servers each with 8 GB Ram and SQL with 9 GB the SQL server will also be configured in a failover cluster with one LUN of our SAN dedicated to SQL 2008. The image below illustrates how we are deploying our solution

The virtual application server will also be deployed with 8GB Ram. The last server in our configuration will be our streaming media server which will remain physical as we wish to reuse one of our Dell MD3000 boxes but when this goes end of life in a year time this will also be virtualized by adding more SATA storage to our SAN.

 There is still debate about Virtual Vs Physical but as we build our solution and go live i will post about how it performs.

Comments
No Comments »
Categories
HyperV, Sharepoint 2010
Tags
HyperV, SharePoint2010, Topologies
Comments rss Comments rss
Trackback Trackback

SharePoint 2010 with a virtual SQL 2008 database. Will it perform?

Chris McKinley | March 10, 2010

Many people have many different opinions on this subject. Is it wise to virtualise SQL? I think it is fine. I was once not so sure but visiting SharePoint best practices conference last year as well as a data management event I now feel pretty confident. Also with our beast of a hyper-v setup I can have more RAM in a virtual SQL box than I could ever dream of in a physical server!

So on to SharePoint 2010.  I wrote a couple of simle SQL scripts just to make the database server do some work and then I used SharePoint to see how it was afected. (I’m a Firefox user so all the SharePoint stuff was done using that) The SQL server was SQL 2008 with 10Gb RAM, with the data going to a normal vhd (our production environment will be virtual failover cluster with data over iSCSI). SharePoint is sitting on a virtual machine with 8GB of RAM.

I did the following actions and timed how long each step took. Then I did them twice more; once with the SQL CPU running at 100% and then again with the disk being very busy writing rows to a database and also sharepoint performing a full crawl.

The tasks were:

Create a Team Site

Upload a docx (this was a sample made using the great “=rand(10,10)” feature of Word)

Open the document using Web Apps

Save the document after editing it within the browser

And finally deleting the site

I selected these actions as they are the kind of things people will be doing everyday with sharepoint. I didnt inclide page loading times as there was no noticble difference between browsing the site when SQL was under load and when it was not.

And the results are in:

  Control (No Load) [seconds] 100% CPU [seconds] Disk load /full crawl [seconds]
Create Site 2.3 39.0 15.2
Upload Docx < 1 3.3 1.5
Open with Web App 1.5 6 6.8
Save Docx 2.3 13.0 1.8
Delete Site < 1 2.3 1.2

Pretty good really. Even with the SQL server sweating away at the backend your dear SharePoint end users will be uploading and viewing documents with minimal fustration!

If anyone else has any numbers or tests they have performed (or want to question mine) then please leave a comment!

Chris

Comments
2 Comments »
Categories
HyperV, SQL, Sharepoint 2010
Tags
HyperV, SharePoint2010, SQL
Comments rss Comments rss
Trackback Trackback

HyperV Cluster Setup Part 5

Dave Coleman | March 7, 2010

This is the fifth and final part of the HyperV cluster setup series of video tutorials with the help of Alan Richards in this video Alan gives a demo of live migration in a HyperV setup no sound in this video but a picture (Or video) paints a thousand words. I hope you have enjoyed and can reuse the info in these videos later this week I will start a blog post on our SharePoint 2010 architecture based solely in HyperV including our SQL 2008 virtual failover cluster.

Comments
No Comments »
Categories
HyperV, Server 2008 R2
Tags
HyperV, Server 2008 R2
Comments rss Comments rss
Trackback Trackback

HyperV Cluster Setup Part 4

Dave Coleman | March 7, 2010

This is the fourth part of the HyperV cluster setup with the help of Alan Richards in this video Alan shows how to install the HyperV role and also how he set up the network for the HyperCluster and finally we see how to make a virtual server highly available through HyperV.

Dave

Comments
No Comments »
Categories
HyperV, Server 2008 R2
Tags
HyperV, Server 2008 R2
Comments rss Comments rss
Trackback Trackback

« Previous Entries

SharePoint Products

Sponsor

ShareNews, ShareEvents, ShareIdeas, ShareCV or ShareCoffee
Powered by Postrank

Tags

  • Active Directory Analytics BCS BETT BETT 2010 branding Case Study Central Admin Cognitive Community CSS DHCP DocIcon Drop Folder Evolution Exchange 2007 Exchange 2010 Exchange Service Pack 1 Expression blend FAST Forefront Gmail GodMode Google HyperV IC Technology IE9 iFilter Knowledge base Learning Gateway Conference LGCUK10 Licencing master page MDT Media Streaming Microsoft Migration Mind Manager Monitoring Tools Office 2010 Outlook 2010 Patch Levels pdf PowerPoint PowerPoint 2010 Powershell RDP Revision RTM SCVMM Server 2008 R2 SharePoint Sharepoint 2010 SharePoint Conference Sharepoint Designer SharePoint EDU SharePoint Foundation 2010 SharePoint Saturday SharePoint2010 SharePoint2010; Social SketchFlow SPD SPEDU SPS SPSUK SQL SQL 2008 STSADM SUGUK Supplier TechDays Themes Topologies Twynham Versions VHD Volcano WebApps WebParts Windows 7 Windows Live Windows Update Word 2010 WordPress XML XML-RPC XSLT Zevenseas

Categories

Blogroll

  • Alan Richards
  • Alex Pearce's SharePoint Blog
  • Brandon & George
  • End User SharePoint
  • Get The Point
  • Meet Dux
  • Planet SharePoint
  • SharePoint Comic
  • SharePoint Dev Wiki
  • SharePoint In Education
  • SharePoint Joel
  • The SharePoint Mechanic
  • Top SharePoint Sites
  • We Know Nothing

Ads by Lake Quincy Media

rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox