Netscaler masterclass presentation Oktober 2014

Today I presented on the Netscaler masterclass on the subject,  System Center and Netscaler and here is my presentation –> https://www.slideshare.net/secret/uSy62iG3eeoaFY

My talk consisted about using the different integrations between System Center and Netscaler, primarly on

* Virtual Machine Manager and Netscaler (Using the load balancer extention to deploy load balancing rules for service templates)
* Operations Manager and Netscaler (How to setup monitoring for Netscaler and use it together with Distributed Applications)
* Orchestrator and Netscaler (How to setup automation tasks against Netsacler using the NITRO SDK)

And as promised in the presentation here is my scripts that I use for the different tasks.

 

Add-Server activity (Note that this requires that the SDK is added to C:\SDK folder and that the different DLL files are added to the global assembly cache.

Set-location «c:\sdk»
[System.Reflection.Assembly]::Load(«System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a»)
$publish = New-Object System.EnterpriseServices.Internal.Publish
$publish.GacInstall(«C:\sdk\lib\Newtonsoft.Json.dll»)

(ADD THE DLL files to the global assembly for Orcehstrator to use for reference)

 

Add-Server

$path1 = Resolve-Path «C:\sdk\lib\Newtonsoft.Json.dll»
[System.Reflection.Assembly]::LoadFile($path1)
$path = Resolve-Path «C:\sdk\lib\nitro.dll»
[System.Reflection.Assembly]::LoadFile($path)

$user = «»
$pass = «»
$nsip = «»

(NOTE THAT THE CODE ABOVE NEEDS TO BE ADDED TO EACH ACTIVITY)

$nitrosession = new-object com.citrix.netscaler.nitro.service.nitro_service($nsip,”http”)
$session = $nitrosession.login($user,$pass)

$server1 = New-Object com.citrix.netscaler.nitro.resource.config.basic.server
$server1.name = «»
$server1.ipaddress = «»
$ret_value=[com.citrix.netscaler.nitro.resource.config.basic.server]::add($nitrosession,$server1)

Add-Service

$service1 = New-Object com.citrix.netscaler.nitro.resource.config.basic.service
$service1.name = «»
$service1.servicetype = «»
$service1.monitor_name_svc = «»
$service1.port= «»
$service1.servername= «»
$ret_value=[com.citrix.netscaler.nitro.resource.config.basic.service]::add($nitrosession,$service1)

Create Load balanced Service

$nitrosession = new-object com.citrix.netscaler.nitro.service.nitro_service($nsip,”http”)
$session = $nitrosession.login($user,$pass)

$lbvserver1 = New-Object com.citrix.netscaler.nitro.resource.config.lb.lbvserver
$lbvserver1.name=»»
$lbvserver1.servicetype=»»
$lbvserver1.port=»»
$lbvserver1.ipv46=»»
$lbvserver1.lbmethod=»»
$lbvserver1.servicename=»»
$ret_value=[com.citrix.netscaler.nitro.resource.config.lb.lbvserver]::add($nitrosession,$lbvserver1)

$lb_to_service = New-object com.citrix.netscaler.nitro.resource.config.lb.lbvserver_service_binding
$lb_to_service.name = «»
$lb_to_service.servicename = «»
$ret_value=[com.citrix.netscaler.nitro.resource.config.lb.lbvserver_service_binding]::add($nitrosession,$lb_to_vserver)

System Center Configuration Manager 2012 R2 CU3

Today Microsoft released CU3 version of ConfigMgr 2013 R2, and there are some minor bugfixes but there is also one important new change here!

That is the ability to define allowed Management Points for a client to communicate with,

This cumulative update introduces a new registry key on clients that will restrict which management point (MP) a client can communicate with. This can be useful in environments with multiple MP’s in different forests, and the clients are only able to communicate with a subset of them. Setting the registry value to only those MP’s reachable by the client can improve overall efficiency. The new registry value is AllowedMPs, a REG_MULTI_SZ (multi-string) type under HKEY_LOCAL_MACHINE\Software\Microsoft\CCM

Each entry is the Fully Qualified Domain Name of the management point(s) with which the client is allowed to communicate. This value does not affect the selection of any other site systems such as distribution points, software update points, etc.; it only affects the primary site MP selection. Note: Once defined, there is no “fallback” or other method for clients to communicate with other MP’s. It is not intended for mobile clients.”

From the KB  http://support.microsoft.com/kb/2994331

XenDesktop 7.5 and Windows Azure Pack Gallery Image

Yesterday Citrix announced a Tech Preview of a XenDesktop 7.5 Gallery image for Azure Pack.
For those so not familiar with Azure Pack, this is a portal which builds upon System Center (and some other tools) do deliver an Azure-like portal where you can setup some of the features like Azure does. I’ve blogged about it before if you want to know more about it here –> https://msandbu.wordpress.com/2013/06/28/azure-pack-configuration-for-windows-server-2012-r2/

Now a Gallery Image is where a end-user want to provision a new-service, he can either choose custom create of choose a finished Image from the gallery.
(A copy from the Azure Gallery)
image

Now imaging giving customers the ability to provision XenDestkop resources as they need it. Or just for the IT-guys to have a streamlined process of doing it. This is where the XenDesktop gallery image comes in.

Now what do we need to setup this image ?

* Windows Azure Pack
* Server 2012 R2 image sysprepped
* XenDesktop 7.5 Media
* The XenDesktop Gallery Image

Then we need to do alot of changes, first we need to create a new VHD which will contain the setup files. First go into disk management and create a new VHD (Which needs to be 4GB) which is called XenDesktop.vhd
image

image

After you created the VHD, mount it using Explorer and copy the content from the 7.5 ISO to the VHD file.
When you are done with this, go into the Virtual Machine Manager console, the into the library node and then click import physical resources.

image

Then choose “add resources”, select the XenDesktop.vhd then select which library server and destionation to store the VHD file. After it is finished importing right-click on it and choose properties. The set Famility to CitrixXenDesktopMedia, and then set the release to 7.5.0.0 and lastly set the operating system type to “none”

image

Then Click OK, after we are done with this we need to modify our operating system disk image. Does this need to be VHD ? YES! Azure Pack does not support VHDX. ) and it needs to be fixed)

Right-click on the sysprepped VHDX file and choose Properties, from there alter the Famility to which type of operating system it is running, in my case its
”Windows Server 2012 R2 Datacenter”

and set the release to 1.0.0.0 and then of course change the Operating System to Windows Server 2012 R2 Datacenter as well.

image

Click OK after you are done. Next we need to “tag” the virtual disks so that the gallery item can use to find the vhds.

Open up Virtual Machine Manager PowerShell console. Run the following command,

$myVhd = Get-SCVirtualHardDisk | where {$_.Name -match ‘sysprepped’} “Make sure that the name matches the name of your VHD file)

$tags = $myvhd.tag
$tags += «WindowsServer2012″
Set-scvirtualharddisk -virtualharddisk $myVHD -Tag $tags

$myVhd.Tag (This spits out the info so you can see that the tag is applied)

image

Now we need to import the Gallery image extention to the Library share, this can either be done by using the GUI or the PowerShell.

PowerShell

$libraryShare = Get-SCLibraryShare | Where-Object {$_.Name -eq ‘MSSCVMMLibrary’}
$resextpkg = «C:\Users\administrator.CONTOSO\Downloads\XenDesktopRole.resextpkg» (Here the path needs to be changed to where the resextpkg is located)
Import-CloudResourceExtension -ResourceExtensionPath $resextpkg -SharePath $libraryShare

image

Next we need to enter Azure Pack – admin site. Go into VM Clounds and Gallery and choose Import.

image

From here add the XenDesktopRole.resdefpkg, and verifies that it actually imports.

image

Next we need to make this item, public and add it do some different plans.
image

Go into the item and choose Make Public, then assign to some plans. If you don’t have any plans you need to create some from the plans menu pane within the Admin site.

So what now ? Open the Azure Pack site as and tenant which is enabled for the plan and choose from Gallery and see for yourself.

image

 

Then click next (From here the OS “sysprepped” image should appear and you need to have a virtual network in place before you can continue on here .

image

Next we can define which role this VM should have, and we can setup a XenDeskTop Controller but we still need to create the site after VM creation. But we can also deploy StoreFront, LicenseServer, Session Host and Desktop Director

image

Pretty cool!

Veeam Management pack for Hyper-V and Vmware walktrough

Yesterday, Veeam released their new management pack which for the first time includes support for both Vmware and Hyper-V. Now I have gotten a lot of questions regarding (Why have Hyper-V monitoring if Microsoft has it ?) well Veeam’s pack has alot more features included, such as capacity planning, heat maps and so on.

The management pack can be downloaded as an free trial from veeam’s website here –> http://www.veeam.com/system-center-management-pack-vmware-hyperv.html

Now as for the architecture of the functionality here it’s quite simple

image

First of there are two components.

* Veeam Virtualization Extesions (Service and UI) it manages connections to VMware systems and the Veeam Collector(s), controling licensing, load balancing, and high availability

* Veeam Collector component gathers data from VMware and injects its information into the Ops Agent.

It is possible to install all of these components on the management server itself. You can also install the collector service on other servers which have the Opsmgr agent installed. The virtualization extension service must be installed on the management server.

In my case I wanted to install this on the mangement server itself, since I have a small enviroment. Before I started the installation I needed to make sure that the management server was operating in proxy mode.

8

Next I started the installation on the management server. Now as with all of Veeams setup it can automatically configure all prerequisites and is pretty straight forward. (Note it will automatically import all required management packs into SCOM1

If you have a large enviroment it is recommended to split ut collectors into different hosts and create a resource pool (There is an online calculator which can help you find out how many collectors you need) http://www.veeam.com/support/mp_deployment.html

You can also define if collector roles should be automatically deployed

2

After the installation is complete (using the default ports) you will find the extensions shortcut on the desktop

4

By default this opens a website on the localhost (using port 4430) from here we need to enter the connection information to Vmware (Hyper-V hosts are discovered automatically when they have the agent installed) Same with Veeam Backup servers as well.

5

After you have entered the connection info you will also get a header saying the recommended number of collector hosts.

7

After this is finished setup you can open the OpsMgr console. From here there is one final task that is needed. Which is to Configure the Health Service, this can be dome from tasks under _All_active_Alerts under VMware monitoring pane.

image

After this is done you need to expect atleast 15 min before data is populated into your OpsMgr servers, depending on the load. You can also view the events logs on the Opsmgr servers to see that data is correctly imported.

image

and after a while, voila!

I can for instance view info about storage usage

image

 

Vm information

image

Now I could show grafs and statistics all day but one of the cool stuff in this release, is the cloud capacity planning reports.

image

They allow it to see for instance how many virtual machines I would need in Azure (and what type) to move them there.

image

Setup Management pack for SQL 2012 with Operations Manager

Now Microsoft recently released their new management pack for SQL Server, which included new dashboard views for SQL administrators. Now this is nice and it gives a clear overview of the current configuration and what’s happening at the time. Now it supports most the SQL versions, except 2014 (yet…)

Version

32-bit SQL Server on 32-bit OS

32-bit SQL Server on 64-bit OS

64-bit SQL Server on 64-bit OS

SQL Server 2005

Supported

Supported*

Supported (for SQL Server 2005 SP2 or later only)

SQL Server 2008

Supported

Supported*

Supported

SQL Server 2008 R2

Supported

Supported*

Supported

SQL Server 2012

Supported

Supported*

Supported

Another heads up! is that by default Microsoft recommends that you monitor no more then 50 databases (per agent) to avoid spikes in the CPU usage. And also not all features are discovered and monitored by default

image

So in order to get monitoring on these features we would neeed to create en override on the different objects. This can be done by going into Authoring –> Management Pack –> Objects –> Object Discovery –> Scope –> (Choose SQL objects) right-click on the feature which is not enabled and choose Override –> choose a class for which you want this overide to work for. Then create a new management pack and choose Enabled == True

 image

Now the installation is quite simple, head to this webpage and download the management packs –> http://www.microsoft.com/en-us/download/details.aspx?id=10631

Download and then go into the Operations Manager Console –> Administration –> Management Packs –> Import

(NOTE: it is also an best-practice to import the Windows Server management packs first in order to properly monitor aspects such as disk, processor, memory, network)

And after we have imported the management packs we get alot of tasks related to SQL in the dashboard

image

In order to use these we need to install the SQL management studio on the Operations Manager server. After you have imported the managmeent pack you also need to attach accounts to the SQL profiles in order to have the proper access to the SQL servers.

This post from Kevin Holman (which is a couple of years old, still explains in good detail how to configure the profiles and accounts –> http://blogs.technet.com/b/kevinholman/archive/2010/09/08/configuring-run-as-accounts-and-profiles-in-r2-a-sql-management-pack-example.aspx)

Now after you have properly configured the managment pack with permissions, its time to do some proper tuning. For instance by default, the mangement pack will not inform about database backups, which I find a bit disturbing since this is something I would really want to monitor.

In order to enable this monitor go into Monitoring pane –> Microsoft SQL Server –> SQL Server Database Engines –> Databases –> Databases view (Then choose a random SQL database) right-click choose open –> Health explorer (Click the filter monitors to remove showing of unhealth objects) Then under Database backup status it does not have any info.

image

Now right-click on that object and choose override –> choose enabled true and enter a date here where it should check how old the database is.

image

After you have then stored this in a mangement pack and choosen which object this rule should apply to, Operations Manager should start to report back with the status if you have taken backup or not.

I can see that after enabling the rule, the alarm appears.

image

Now there are of course loads of different monitors, which will cause overhead to the SQL server and the operations manager. Many monitors are by default added because Microsoft thinks its a good idea, but your database admin or yourself might not agree. Important to remember that Microsoft have to create a baseline which applies to most setups but if you don’t agree you can customize to your hearts desire! Smilefjes

So I live by a rule with Operations Manager, if you don’t need to monitor it. Disable it!
Last but not least a preview of the new dashboards which comes with the new management pack

image

Task sequences best practices Configuration Manager 2012

Microsoft has recently released a document series which contain best practices for task sequences with Configuration Manager 2012 R2. This series goes trough a step-by-step in all the different steps in a task sequence.

For all IT-pros working with task sequences I suggest taking a look at the document series here –> http://www.microsoft.com/en-us/download/details.aspx?id=43412

In other related news, my fellow MVP Kent Agerlund has released a new book (updated) for Configuration Manager 2012 R2 master the fundamentals, which you also should take a look at if you want to learn more –> http://www.amazon.co.uk/System-Center-2012-Configuration-Manager/dp/9187445085/ref=sr_1_1?ie=UTF8&qid=1404503771&sr=8-1&keywords=kent+agerlund

Microsoft Virtual Machine Converter 2.0

So this is such a great update I have to blog about it, I have been in many projects involving migrating from VMware to Hyper-V and there of course many options to choose from there. Alas Microsoft had its own Virtual Machine Converter but didn’t have support for the latest version.

Microsoft today released a new version of Virtual MAchine Converter which contains the following updates:

With the release today, you will be able to access many updated features including:

  • Added support for vCenter & ESX(i) 5.5
  • VMware virtual hardware version 4 – 10 support
  • Linux Guest OS migration support including CentOS, Debian, Oracle, Red Hat Enterprise, SuSE enterprise and Ubuntu.

We have also added two great new features:

  • On-Premises VM to Azure VM conversion: You can now migrate your VMware virtual machines straight to Azure. Ease your migration process and take advantage of Microsoft’s cloud infrastructure with a simple wizard driven experience.
  • PowerShell interface for scripting and automation support: Automate your migration via workflow tools including System Center Orchestrator and more. Hook MVMC 2.0 into greater processes including candidate identification and migration activities.

 

So alot of great new features which should make it even easier to convert Virtual Machines. Also another important factor here is this.

At this time, we are also announcing the expected availability of MVMC 3.0 in fall of 2014. In that release we will be providing physical to virtual (P2V) machine conversion for supported versions of Windows.

Since Microsoft removed this option from SCVMM in R2 release its great that it is coming back. You can download the tool from here –> http://www.microsoft.com/en-us/download/details.aspx?id=42497