Skip navigation

Tag Archives: Hyper-v


From my last Post, we have discussed about what we need to achieve in the Lab.  I’m pasting the diagram here again so we can use that as reference. For more details, you can click last post to get it.

image

 

What a Windows 2012 file server can do?

 

A Windows 2012 File server can provide storage via SMB 3.0 Share and iSCSI. If you are looking for how to do SMB 3.0 share, please follow this link. Windows 2012 also provide native version of iSCSI feature which includes a iSCSI Server end and iSCSI initiator (client end). It’s all free.

With SCVMM 2012 SP1, the installation CD even comes with a SMI-S provider driver which you can install on Windows 2012 so VMM can import Windows 2012 File server into Library as iSCSI array rather than SMB Share.

Import Win2012 File Server via SMB share

 

I have mentioned this before. VMM can import a File Server via only one method. For example, if you have import this File server via SMB Share, you won’t be able to import this File server via iSCSI. You must remove the server from Library and import again.

Here is the procedure to import a Win2012 File Server into VMM.

Before you do anything, you need to add your VMM service account (For example, svc_vmm) into local administrator group on Win2012 File server.

Notice:

You can’t add a Active Directory Group into local administrator group and you must user individual user instead. Otherwise, it won’t work.

Like following:

image

After you have done that, open VMM console and choose Fabric,

image

image

Clearly, you have 3 options here. Let’s choose Windows based File (SMB Share).

image

Provide server’s FQDN

image

Now, what it does is to push/install VMM agent on File server with credential of account you choose before, that service account must have load admin rights on File server.

image

Now, remember those are SMB shares.

image

Notice:

the storage provider type is Native Windows WMI? That’s how VMM get all information by executing WMI remotely. But that native window WMI doesn’t support iSCSI.

image

 

If you click file Servers, you will see it.

Let’s check a Hyper-v Host properties

image

 

Import Win2012 File Server via iSCSI Protocol

 

With SMB Share, you can’t create storage pool from VMM, nor Logical Unit which sort of defeat purpose of VMM. At the end of the day, it is a Virtual Machine Manager. What happen if it can’t allocate resource inside of VMM with multiple tenants scenario?

With Windows File Server, you don’t need to download StarWind FreeNas or any other third party SAN/NAS tool, you can just build a iSCSI box base on Native Windows.

First of all, we need to install iSCSI features on Windows File server.

clip_image002[7]

Now, the next thing we need to install is SMI-S provider on Windows file Server. SMI-S will allow us to connect VMM with iSCSI.

so From VMM installation folder, you will find this file.

image

copy that file to File server. You need to check whether the stability patch has been installed already on File server. KB2770917

image

Now, you can install this SMI-S provider.

Notice:

You MUST reboot File server after installation otherwise, you will ran into some strange issues.

image

image

Don’t forget to reboot.

 

On the client end, Testhyp01 and Testhyp02, you can do following.

Install iSCSI Initiator

image

Run this iSCSI initiator

image

just type the IP of File server and click quick connect. It may not work for iSCSI, but at least, it creates an iSCSI initiator.

Install Multipath I/O

image

 

If you have already import File server, remember to remove it first.

Then, you can add storage again

image

This time, we choose SMI-S provider

image

after a scan

image

 

image

Now, you are able to see all drives on File server.

 

image

If you don’t have any classification, you will get this. Then, you can build classification. Classification is just resource tag which you use it to label different storage resource. I use Gold and Silver here.

image

 

image

image

image

 

SNAGHTML22e8fd52

 

Allocate storage resource in SCVMM 2012 SP1

 

When you allocate your storage resource in VMM, you should do it from Host Group folder level.

image

Notice:

Only iSCSI or SAN can be allocated to Host group. SMB share can only be allocated via host cluster level.

You can allocate Storage Pool

image

image

Create logical Unit base on your new storage pool,

On Host Cluster level

image

Convert this Available Storage to CSV

image

You can convert CSV back to available storage but only it has no VMs sitting on that.

image

 

The end


Now, in this post. I’m going to talk about Storage in SCVMM 2012 SP1 and also how to build a Windows 2012 File server to connect with SCVMM.

One thing I’m very sure about Microsoft is they must love Onions. Because a SCVMM 2012 combining with Windows File server 2012 is like a huge onion which has many layers.

With embedded VHD technology, Microsoft deployed one layer after another layer of VHD which makes me worried because VHD can be corrupted. What would happen if one of VHD layers corrupted and you will loss all data on top of this layer? Or shall we wait for Windows 2012 R2 which may use VHDX instead of VHD?

Anyway, with no further ado, let’s cut Onion open.

Following is the diagram of File storage I used in my lab.

image

Let me walk you through with this diagram first so you will have better understand instead of lossing yourself in a million picture of wizard.

Layer 1(Physical Disks):

Target: File Server

Let’s start with physical disk layer on physical Host.

Windows 2012 File server has 3 physical disk. 2 x RAID 1 for 0S which only 70GB. 1 900GB disk with Raid 0.

Let’s see a screenshot from File server

image

 

Layer 2 (Storage Pool):

Target: File Server

With Windows File server 2012, You can build a storage pool which we call it VMMlib01

image

 

Layer 3(Virtual Disks):

Target: File Server

Now, we build a virtual Disk on top of Storage Pool.

image

Since this is my File server, I have built number of Virtual disks (the virtual disk concept equals normal physical disk back in Win2k8). I have built 2 quorum disks size are 1GB for VMM cluster, and Hyper-v cluster.

VHD50, Virtual Disk 01 and VHD200 are my test virtual disks to store VMs.

for test purpose, I have setup both Fixed and thin disks.

 

Layer 4 (Volumes):

Target: File Server

Same thing as volume in old OS. You will give drive label to each volume.

image

I have create each volume for each virtual disk. Those disks will be shared via iSCSI.

Layer 5(Storage Pool):

Target: VMM server

In the VMM, there are multiple ways to import storage into VMM library. With same target host (like File server here), only one way of connection will be accepted.

For example, if I choose to use SMB share to connect to File server, then I can’t use iSCSI to connect in VMM.

You can choose to use simple SMB 3.0 share, but then you will loss lots of storage function.

If you choose using FC/iSCSI as storage, you will be able to define your storage as different classification. You may want to put fast storage pools into gold classification and slow storage to Silver or Brown.

The storage Pool you will find here is same thing as volume from File Server.

 

 

image

 

Layer 6 (Logical Unit)

Target: VMM Server

This logical Unit is created base on Storage Pool in VMM server. You can choose use some part of space to assign to Host group (Not cluster) and reserve some logical Units for future.

Layer 7 (Clustered Share Volume)

Target: VMM Server –> Hyper-v Cluster

Believe it or not, once you assign Logical Unit to Host group and it doesn’t mean your hyper-v Cluster is going to use it. From Cluster point of View, it just got available space.

You need to convert it to Cluster shared Volume

image

 

image

 

Now, if you switch to Hyper-v cluster, you will see your shared volume is there.

image

 

SNAGHTML1ee369da

 

To be continued …..


Well, this is very stupid thing for me who is working with Vmware product for years.

As you all know, I have a Hyper-v Cluster (2 nodes) which I connect with iSCSI storage (Windows file Server 2012). I have built CSV share and allocate to cluster via SCVMM 2012. But when I tried to clone (yes, clone, not even deploy),

I ran into following error.

image

I checked everything up and down, cluster configuration, destroy LUN, format LUN , etc. Finally, I found this resolve this issue.

 image

Why the Microsoft just setup as default?

Anyway, that resolves my issue. Hope this post can help you.


Cause:

This issue has same cause as you can’t shutdown VM from VMM console.

SNAGHTML4f7965e

 

image

 

Well, don’t worry about file format (VMM 2012 SP1 supposes both VHD/VHDX, don’t worry about location of your VM, it can be on local disks of Hyper-v or Share storage, it has something to do with virtual Guest Services, or you can call it “Integrated Service” from Hyper-v.

 

If you go to Hyper-v, and try to install Integrated Service on that VM, system will tell you you are on latest version already.

So what to do?

Solution:

 

Just click “Refresh” from VMM Console

SNAGHTML4fb66de

 

This is clearly a bug of VMM which import VMs into VMM but not checking integrate service properly!


I never expected it took me whole afternoon on just installing a App-V, well, I do admit I did went out for other stuff, but it is little ridiculous how complicated and lack of correct information the whole process is.

I write this post to help myself and others for future reference. If you do run into similar issue, hope this post can help.

Test Environment:

Windows 2012 runs HYPER-V on it

SQL 2008 R2 runs on Hyper-V

 

SQL Preparation:

This is the part which kills everyone. If you think you just jump on the SQL and create couple of DB and jump back and run installation wizard, then I can tell you will see following errors.

image

This warning is telling you that you didn’t prepare DB as what Microsoft wanted and go back now!

Funny thing is it only has one button “OK”, no cancel?

 

If you continue to install, you will run into The error was : Invalid object name ‘dbo.RoleAssignments’ after you finish installation.

image

The correct installation method is following kirxblog and prepare the DB.

Essentially, there are two methods to prepare DB. You can either bring installation disk on SQL server and run through installation wizard which requires you to install whole bunch of craps or you can manually install it as what this post will tell you.

1. get DB scripts ready

In terms of extract DB script, you need to find installation exe file and run it with /layout as parameter.

SNAGHTML64fb00c0

Once you have done that, you will following structure

clip_image002

2. Create 3 AD groups

Now, according to installation instruct of script, you need two groups which are read and write. I also create 3rd group called AppVAdmin for managing.

clip_image002[5]

You need to add App-V server computer account into AppvAdmin group. Also domain admins as well.

3. Modify DB scripts with Powershell script

The original DB script which you extracted from installation exe file requires SID of AD groups in terms of making it work! It’s not easy to find those SID and not mention other nasty stuff.

Thank for Kirx beautiful powershell script, we are able to prepare those DB scripts with Powershell script.

Instead of all other nasty information, all what you need to do is to provide name of groups and name of DBs. Powershell script will prepare the DB script and help you to finish the work.

download Kirx script and edit.

Found those lines and replace it

image

 

If you never run powershell script on this serve, you may want to unlock it.

clip_image002[7]

Make backup for your DB scripts and copy them to c:\temp folder like this.

c:\temp\ManagementDatabase and also report database script.

Copy kirx script to c:\temp

Run it, if it works, it should return with no result.

However, it will change the file name under those DB scripts.

Original folder.

clip_image002[9]

Changed

clip_image002[11]

 

3. run the Scripts on DB

Copy your new script to SQL server and open management studio

Run 1-1 Database script which will create new DB on SQL

Run all other script base on DB you just created

 

4. Add AppvAdmin group to db.Ower on new DB

Your AppvAdmin group should contain App-V server account by now

 

Install Prerequisites for App-V

You need to download Microsoft C++ 2010 x86 version and install on App-V server. Yes, it is x86 not x64 version!

Otherwise, you will get this one.

clip_image002[13]

 

Install App-V

Now, we can start to see those fish eggs , oh, no, orange Apps in the Box

clip_image002[15]

 

clip_image002[17]

Now, Unless you have SQL on your App-V box, otherwise, DO NOT tick those boxes. It will change your wizard steps.

clip_image002[19]

image

 

image

 

Once you finish installation, I strongly recommend you to restart your App-V and most likely, you just add computer account into AppvAdmin group and requires restart to take effect.

Otherwise, you may see this.

clip_image002[23]

After restart App-V, you should be able to this no error on console.

clip_image002[25]

 

 

 

 

 

 

 

Reference:

http://kirxblog.wordpress.com/2012/11/01/remote-database-preparation-for-app-v-5/


I was trying to install SCVMM 2012 to manage Windows 8 beta. But unfortunately, Windows 8 Hyper-v has some major changes in services and you can’t import any Hyper-v 3 beta into SCVMM 2012 RC at this stage.

 

I will confirm with MS and update it later.

 


Oh, OMG. The ugly Windows 3.1 style fish. ……

This is first feature I’m testing with Hyper-v 3. I personally is shocking with how good Dynamic Memory is. If I make any wrong comments in this blog due to lack of knowledge of Hyper-v, please leave comment. Thanks

We all know Dynamic Memory feature in Hyper-v R2. This is quite argument point between Vmware and Microsoft. Vmware claims they have Memory over committing, memory sharing(schedule not real time), memory paging and memory balloon technology. Well, Personally, I have to say Vmware has done great job to allow more VMs memory consumption then what a host can hold. It is hard to do it without knowing OS core to reuse the memory.

Microsoft, on the other hand, has Dynamic Memory. It allows you to “Dynamic using memory” by setting up lowest memory and maximized memory for each vm. Well, to be honest, I’m not very interesting about this tech since it’s very similar as what Vmware does.

Now, thing is completely different from Hyper-v 3.

You can increase your vm memory on the fly!

Yes, Vmware can do same thing long time ago. I used to write a post about it. However, it can only happen to Windows Datacenter version. Vmware does that by physically plug in virtual memory DIMMs into OS hardware. However, only Windows Datacenter level has capability to pick them up and add them into OS on the fly.

Hyper-v 3 does that with almost every Microsoft system. Following is the list.

  • Guest operating system Editions Configuration requirements
    Windows Server 2008 R2 Standard and Web editions Install Windows Server 2008 R2 SP 1 in the guest operating system.
    Windows Server 2008 R2 Enterprise and Datacenter editions Do one of the following:

    • Install Windows Server 2008 R2 SP 1 in the guest operating system.
    • Upgrade the integration services in the guest operating system to the SP 1 version.
    noteNote
    Installing Windows Server 2008 R2 SP1 is the recommended method because it provides the added benefit of installing all updates included with SP1.
    Windows 7 Ultimate and Enterprise editions (32-bit and 64-bit) Do one of the following:

    • Install Windows 7 SP1 in the guest operating system.
    • Upgrade the integration services in the guest operating system to the SP1 version.
    noteNote
    Installing SP1 is the recommended method because it provides the added benefit of installing all updates included with SP1.
    Windows Server 2008 with Service Pack 2 (SP2) Standard and Web editions (32-bit and 64-bit) Upgrade the integration services in the guest operating system to the SP1 version.Apply a hotfix as described in article 2230887(http://go.microsoft.com/fwlink/?LinkId=206472).
    Windows Server 2008 with Service Pack 2 (SP2) Enterprise and Datacenter editions (32-bit and 64-bit) Upgrade the integration services in the guest operating system to the SP1 version.
    Windows Vista with Service Pack 1 (SP1) Ultimate and Enterprise editions (32-bit and 64-bit) Upgrade the integration services in the guest operating system to the SP1 version.
    Windows Server 2003 R2 with Service Pack 2 (SP2) Standard, Web, Enterprise, and Datacenter editions (32-bit and 64-bit) Upgrade the integration services in the guest operating system to the SP1 version.
    Windows Server 2003 with Service Pack 2 Standard, Web, Enterprise, and Datacenter editions (32-bit and 64-bit) Upgrade the integration services in the guest operating system to the SP1 version.

Let’s Testing!!

I tested both on windows 2008 R2 SP1 and Windows 2003 R2. The result is the same. As long as you install “Intergration Services Setup Disk”, you will be able to increase memory on any VMs on the fly!
First, I created a VM and go into settings.
This is the default settings of maximum memory settings. It has nothing to do with  your host memory. It’s just maximum figure of Hyper-v 3 can handle. We don’t want Hyper-v to handle all memory. so I changed this figure to 512MB also changed start memory to 500MB like following picture.
Then, I restarted W2K3 and you can see how much physical memory it has.  Please be aware this physical memory is just figure of minimum memory figure. It will increase with how much memory you consume.
Now, let’s change the maximum memory figure on the fly to 1GB!
Once you increased the memory, you won’t see it reflect to OS immediately. You have to use memory and beyond the current physical memory level. Let’s increase number of IE window from 1 to 102. -_-b
Amazing! isn’t it?
Few other points:
At Hyper-v 3, you can increase maximum memory but you can’t decrease them on the fly! You do can decrease minimum memory memory on the fly although I don’t see much point here.
Hyper-v 3 supports balloon technology as well. The smart-page feature may contribute some scenarios with HA. But I haven’t got time to test it.
More features updates are coming. Please stay in tune. 🙂
Reference:

 

Here is a details you may find handy in the future. As we all use Microsoft products, MS always release their Demo with vhd format. I always thought it would pretty easy and straight forward to convert vhd to vmdk. But it turns out it’s not exactly smooth like it sounds. so I write this article to help everyone who may have same issue.

Let’s check out the basic requirement.

Sharepoint 2010 Demo.

You need to download 28 winrar compressed files from Microsoft website. It will occupy 17GB space.

Extra those 17GB files, you will get two folders.  2010-7a (44GB,vhd) and 2010-7b (14GB,vhd) file.

These vhd are using thin mode. The full size of vhd is 133GB each.

Goal:

Run Sharepoint Demo in the Test or Dev Environment.

Hyper-V Solution:

You can install Windows 2008 R2 on a real physical server and add on Hyper-v feature.  However, if you don’t have Hyper-V, you may encounter following.

Hyper-V in Vmware Env  issues:

1.MS doesn’t allow you to enable Hyper-v feature on a VM. There is no other way to install Hyper-V on VM.

2. Virtual PC can’t run this Demo either. As matter of fact, MS recommend only use Hyper-V R2 to run it.

 

Vmware Solutions:

If you environment is complete VMWare, we need to figure out a solution to run DEMO in the Vmware vSphere Test or Dev env. But we also don’t want to waste all unnecessary space during the procedure. So for all converting, vhd or vmdk must be stay in thin disk mode.

 

Using Vmware Convert:

Vmware Convert is an excellent tool. However it doesn’t support vhd file directly. It requires thirdparty software to do preparation. Vmware Converter has 5 ways to import other machines into Vmware.

  1. Power-On Machine(As long as they are windows server and 2003 up. Physical or VM, using MS VSS.)
  2. VMware Infrastructure virtual Machine (convert a vm from Vmware ESX itself)
  3. Vmware Workstation or other Vmware virtual machine (must be a vm, not just a single disk. For vm server as well.)
  4. Backup image or third-party virtual machine (Support virtual PC, Symantec Recovery Imange, Acronis etc, must be a vm, not a single disk).
  5. Hyper-V server (It will deploy convert agent on Hyper-v, doesn’t require reboot).

 

In our case, we need to use method 3,4 or 5 to do the job.

Method 3 requires a Vm workstation or VM server version of VM. We can use Starwind to do this job.

Starwind:

Starwind free tool V2V convert can convert VHD to VMDK and vice verse.

It can has following options. First 3 options are what we concern.

 

Vmware growable image and VMware pre-allocated image are VMware workstation version VMDK. First option is to use thin disk mode.If you choose this one, you have to download a VM workstation or VM Server to create a VM.

Vmware ESX Server image is what we want. But it has biggest issue. There is only thick mode for this option. In our case, you have to convert 43GB VHD(thin mode) to 131GB VMDK (ESX but thick mode). You can upload this big fat file to your storage space but it will cause lots disk consumption and time.

 

Then, you can use VMware converter to import it into ESX.

Method 4 is the one I recommend here.

All what you need to do is to download Virtual PC 2007 SP1 which can be installed on the Windows 2008 R2. You can simply run it easily and ignore the warning it gives you since you don’t need actually to run vm.

You just need to create a Mcirosoft Virtual PC VM. Then, you can use VMware convert to import it into ESX.

 

Method 5 is a little distance to go.

You need to install a Hyper-v on bare physical hardware and create a VM and import the vhd disk. Then, you can use VMware convert to import it into ESX.

 

Conclusion:

Convert VHD to Vmware method.

Install Virtual PC 2007 sp1-> Create a vm->using vhd->save vmc file->load VM Converter->use method 3->import into vSphere

Install Starwind->Convert VHD to ESX Server VM->save full size VMDK file ->Upload full size VMDK file->Create VM in vSphere->using VMDK disk (full size)

Install Starwind->Convert VHD to VM workstation vmdk(thin)->save thin vmdk file->install VM workstation or VM Server->Create vm->load vmdk->create vmx file->load VMConvert->import into vSphere with thin mode

Or you can use Winimage to replace Starwind

Reference:

Download virtual pc 2007 sp1

http://www.microsoft.com/downloads/en/details.aspx?FamilyId=28C97D22-6EB8-4A09-A7F7-F6C7A1F000B5&displaylang=en

http://www.sharepointdevwiki.com/pages/viewpage.action?pageId=23429169