Thursday, January 31, 2013

Creating replica's of VM's in Hyper-v 3.0

Ok I cannot take credit for this one... It is a feature of core server 2012 that you can create replica's for redundancy or failover. This guy just wrote it up so well I had to point you to it. So read up and learn.

Friday, January 25, 2013

Deciding how to configure a VM

Lets say I have a Physical Server that has 1 dual core CPU with 4gb or RAM and a 146gb Mirrored drive, running windows 2008r2 and I want to make it a VM running on Hyper-V.

I would configure it this way:
I would look at the disk space used and then add some to spare (say 10 to 20 gb) and make my new VM drive that size and make it STATIC. You can always make it bigger or add another drive later.
I would keep the RAM the same size, but you could reduce it to 2gb if not too heavily used.
I would keep the vCPU the same.

Things to do to optimize my new VM.
I would delete the temp files and then defrag the HD
Set my swap file size to twice that of the RAM
I would then defrag the swap file, there is a tool from sysinternals that will allow to defrag a swap file
I would stop any unwanted or unused items for loading in startup or services.
Lastly if it is an older machine that has has lot of programs installed and uninstalled, I would clean the registry and compact it, then defrag it as well.
Very last I would re-run HD defrag again just to make sure it is defragged as best as it can be.

However before I did any of the above I would make a copy of the server VHD file just in case you mess something up.

Monday, January 21, 2013

Patching Windows Free Core server 2012

Well I this is very straight forward and easy.. Simply read this blog post and it will all be clear.  I found it to be down right easy and works rather well.

Thursday, January 17, 2013

Newbie emailed and asked how to build VM

This has now been added to a free powershell hyper-v manager project.

Rather than re-invent the wheel I will point you at a site that does just that..

Step by Step Guide to Create Windows Hyper-V Virtual Machine

Step by Step Guide to Install Windows Hyper-V Guest Operating System

This guy does a great job with pictures. Hope that helps. If ever in doubt google it! or youtube it! they have never failed me yet.

Tuesday, January 15, 2013

Where do i find the best freeware??

I received an email asking where I found or find all the freeware Apps I have blogged about.

Here is the best list: *

Each site a search feature so you can search for an app or type of app you maybe needing.

* this is a freeware and shareware site, so not all apps that are returned in a search are freeware unless you check the little box under the search text bar to show only freeware.

Let me know what sites you use and I will add them to this list.

Thursday, January 10, 2013

How to Boot from a VHD on a physical PC/Server

Since Windows 7 and Server 2008 R2, it is possible to boot from a VHD (Virtual Hard Disk) file.
Note that you can only boot a VHD which has been created using Windows 7 or 2008 R2 or later, and you must configure the boot loader from an active installation of Win7 or 2008 R2. You can't use Virtual PC VHDs, only Hyper-V or raw VHDs . 

See the technet article

It is not the same as a restore of a VHD to a physical server, which seems to be impossible, but you would be up and running .

Mounting a VHD file as a drive letter in Windows 7 and Server 2008

Just found something rather cool, you can create or mount a VHD file as a drive letter in Windows 7 and 2008 and then copy files to it or from it.

In windows 7 or 2008
Right-click My Computer or Computer and choose Manage
Go to storage\Disk Management, right-click Disk Management and you can Create VHD or Attach VHD in this case choose Attach VHD
Browse to your VHD file and then click OK
Your VHD file is now mounted as a drive letter and you can mess with partition or files.

To Detach the VHD
Right-click My Computer or Computer and choose Manage
Go to storage\Disk Management, right-click the DISK #
Choose detach VHD
Click OK

If you wanted to create a VHD file that you could then copy tons of files or data too.
Right-click My Computer or Computer and choose Manage
Go to storage\Disk Management, right-Click Disk Management and choose Create VHD or Attach VHD
Click Browse, then browser to your new VHD files location and give it a name
Choose the VHD file size
Choose the type of VHD file you want
Click OK, this will create your new VHD and mount it for you
Right-click it and choose Initialize
Right-click it and choose New Simple Volume, follow the wizard
Your new VHD is now created and ready to accept file/data via Explorer

If you want to simply mount or dismount a VHD by right-clicking the VHD file you need to download and install VHD Attach.

Tuesday, January 8, 2013

How to find the Hyper-v Servers on your network

Use netscan.exe from SoftPerfect Network Scanner to any network ping scanner that allows you to search for open ports.
NOTE: in my case the windows firewall is disabled, if your firewall is enabled you will not find this open port unless you opened it up.

Look for the open port 2179.

Active windows Hyper-v servers will  have the port 2179 open

The other open ports that hyper-v may have open are port 80, 8100, 443 & 3389.

Also you can use WMI to determine if a server/PC is a VM or not

At the cmd prompt type
wmic computersystem get model

if it returns Virtual machine = a Microsoft Hyper-V VM
if it returns VMware Virtaul platform = a Vmware VM
all others will be the a physical machine

Or you can use the SoftPerfect Network Scanner with built in WMI query to motherboard during a ping sweep. Click the WMI icon on the toolbar, Add user id and password if not logged in as a domain admin and check all that you would like to gather the info on. Click Close, Now each time you run a scan it will query these WMI items. NOTE: from the above command line I would choose Computer Model or in my case the top 4 items.

Right sizing my VM's on the VHOST

Or in other words... how many VM's can I get on my Vhosts

Hardware requirements are 64bit/x64 CPU(s) and the ability to enable virtualization in the BIOS.
Excellent post on minimum server hardware requirements for Windows Free Core Server.

Rule of thumb is the leave at least 4GB RAM for the base Windows OS.
So if I have Windows server with 64GB RAM and dual hex(6) core processors for a toal of 12 CPU's.

I have 60GBb RAM to divide amongst my VM's, I should not* over subscribe my RAM but I can over subscribe the CPU's.
Over subscribing the CPU is not as big as deal as the RAM, because the CPU's will round robin, meaning when a process is free another takes its place because you have subscribed your VM to a set of vCPUs, but not been exclusivily assigned a set of vCPU's. While on the other hand your VM can be exclusivly assigned a RAM amount.
* With Hyper-3.0 there is the ability to set a range of RAM so you can squeeze more VM's on a VHOST, but that is another blog post.

So lets say I have a standard VM's setup of:
50GB Boot volume

On the vhost server describe above I can run.
30 VM's

However keep in mind we have not discussed Hard Drive space requirements.
For the Windows Free Core Server base OS you need 100gb of space.
Thus 50gbx30VM's=1.5TB =100gb = 1.6Tb of data storage minimmum.
You want redundantcy so make it RAID 10.

Remember this is just an example you need to do the math for what makes the best sense for your needs, just do not exceed your hardware, RAM and diskspace, keeping in mind the requirement needs of the base OS.

Wednesday, January 2, 2013

VT Technologies vtUtilities is out of BETA

vtUtilities provide a local GUI to manage Hyper-V. Hyper-V is supported on Windows Server 2008 R2, Windows Server 2012 as well as on Microsoft Hyper-V Server 2008 R2 and Microsoft Hyper-V Server 2012, which are Microsoft standalone free hypervisor products. vtUtilities allow management of virtual machines, virtual hard disks and networks on both local and remote Hyper-V servers. You can use vtUtilities to manage Hyper-V on Windows Server 2012 and Windows Server 2008 R2 from a single environment. vtUtilities also eliminate the requirement of an additional Windows license for local management of free Microsoft Hyper-V Server.

Cost is $119 per Hyper-V server. No additional cost per VM. So you can have 2 or 30 VM's on a single Hyper-v server and you only pay $119.

Bulk licenses of 10 or more can get you special pricing.

If you want a free way to manager your free core server see  a free GUI powershell hyper-v manager project.

How backup your Hyper-V VM's.....

There are two schools of and pay backup tools

This guy's blog shows a free Powershell scripted way to stop your VM's and then copy them to a NAS etc and restart them using the build in scheduler within windows, FREE. Matt Williamson's Blog

Or you can use this tool Free or Pay depending on what you need. Trilead software

I have not tried either of these, so use at your own risk.. just thought to point in a direction you could head.

To schedule a task on core server 2012 use schtasks.exe, no GUI built into core server 2012.

Or you could use System Scheduler FREE Version from Splinterware, has a GUI.  

There is also, they offer a free version (2 vm's) and a paid version.