Skip navigation

Category 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


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!


image

Last week, I presented my design chart of my Lab. Today, I’m going to build SCVMM2012 cluster on Virtual Machine. In another word, this post will also show you how to build Virtual Cluster on Hyper-V.

Environment:

Physical Host:

Before you start, you need to make sure that you have at least one Hyper-v Host available. You will also need a windows File Server which will provide quorum disk for your vmm cluster. You can use a virtual file server(Windows 2012) but I have a physical box.

Clearly, you need a virtual SQL server as database source.

Virtual Machine:

Since we are building cluster, so you will need to VMs which I install Windows 2012 on that. Each VM has 2 nics. One is heartbeat and the other is for production and management.

What you will install on VMM01 and VMM02:

  • AD Preparation

Create two user accounts, svc_vmm and svc_vmmadmin

image

 

image

  • Configure distributed Key Management (DKM)

DKM is critical for VMM which stores encryption key for both VMM servers to access.

clip_image002[23]

clip_image002[25]

clip_image002[27]

image

grant Vmmadmins rights for this AD  object

 

image

image

image

image

 

  • Install Windows 2012 Standard version

Build windows 2012

Add IP address

Join VM into domain

Turn off Firewall

Enable Remote Desktop

Disable IE security

Disable UAC

test remote winrs /r:vmm01 ipconfig

image

  • Add SCVMM accounts into local Administrator groups

You must add those two accounts separately.

Please DO NOT create a group and put users into group and put group into local administrator group, because it won’t work!

image

 

  • Install Failover Manager
  • Install .NET Framework 3.5 Feature

clip_image002

When you install that, be aware you need to have Windows 2012 ISO or CD ready like following

clip_image002[5]

You instruct installation application where to find source code, otherwise, it will fail.

Tip:

You will be surprised that how many features actually coded base on 3.5 rather than 4.1. This is one of “must install” for me every time I install a VM.

  • Install Windows ADK for Windows 8

clip_image002[7]

 

clip_image002[9]

 

clip_image002[11]

 

clip_image002[13]

 

clip_image002[15]

 

  • Install SQL Native Client (I’m using SQL 2008 R2 SP1)
  • Install SQL Command Line Utilities

clip_image002[17]

Build windows 2012 File Server

A file server is important for cluster. As cluster, you need a quorum disk which can be accessed by all members of cluster so they can exchange data, voting etc. You can have a NAS or SAN blah,blah, but the cheapest way is to use a free windows Server to provide shared folder. Windows 2012 cluster has this capability to use this share folder as quorum storage, thank for SMB 3.0 which allows multiple accesses at same time.

By saying that, we can also build iSCSI features on both File server and VMM01,02. No additional software required, Windows 2012 will allow us to have a iSCSI storage. I will write another post about it.

Let’s install

Make sure you have these service installed on your windows File server.

clip_image002[31]

You will also need a separated physical disk attached to file server.

clip_image002[33]

Once you have this physical disk, you can build a new storage Pool.

clip_image002[35]

clip_image002[37]

clip_image002[39]

clip_image002[41]

Now, I have storage Pool, I will start build a virtual disk on the pool.

clip_image002[43]

clip_image002[45]

clip_image002[47]

clip_image002[49]

clip_image002[51]

clip_image002[53]

clip_image002[55]

You will also need to build another virtual disk for storing VMs as to be used by VMMLibrary Role later on.

Now, you need to install Share feature.

clip_image002[57]

clip_image002[59]

 

clip_image002[61]

Once that’s done, Let’s come back and share the quorum

clip_image002[63]

clip_image002[65]

clip_image002[69]

clip_image002[67]

clip_image002[71]

don’t need anything here for quorum

clip_image002[73]

However, we do need permission to be added here. You need to add svc_vmm, svc_vmmadmin and also two VMM computer AD objects.

image

image

 

I’m not going to repeat similar steps here.

clip_image002[75]

With this File server, you can also build quorum for Hyper-v Hosts as well.

 

To be continued….


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/