Home » Windows Azure Pack

Category Archives: Windows Azure Pack


Welcome to contoso.se! My name is Anders Bengtsson and this is my blog about Azure infrastructure and system management. I am a senior engineer in the FastTrack for Azure team, part of Azure Engineering, at Microsoft.  Contoso.se has two main purposes, first as a platform to share information with the community and the second as a notebook for myself.

Everything you read here is my own personal opinion and any code is provided "AS-IS" with no warranties.

Anders Bengtsson

MVP awarded 2007,2008,2009,2010

My Books
Service Manager Unleashed
Service Manager Unleashed
Orchestrator Unleashed
Orchestrator 2012 Unleashed
Inside the Microsoft Operations Management Suite

User does not have permissions to access the Service Management API

When playing with Windows Azure Pack I received this error. When searching on the Internet the solution is to add the user to the local “MgmtSvc Operators” security group. That is a bit difficult, as Microsoft removed that group in Update 1. Instead you should use PowerShell “Add-MgmtSvcAdminUser” to assign users permissions. When I ran get-MgmtSvcAdminUser I had the WAP server local administrator’s group member of the WAP Admin role, and my user was member of that local administrator group. Normally a member of a group has all permissions that the group has, but not in this case, instead I needed to add my user account direct to the admin role. Thanks to the oracle Patrik Sundqvist who enlighten me about that. I ran the following PowerShell line and then it worked

Add-MgmtSvcAdminUser –ConnectionString ‘Server=SCDB01;Initial Catalog=Microsoft.MgmtSvc.Store;Trusted_Connection=True;’ –principal ‘demo\anders.bengtsson’

SCDB01 is the database server hosting the Microsoft.MgmtSvc.Store database. DEMO is the domain name.

Setting up VM Roles in WAP

I have been preparing our TechEd session last weeks. During this I have solved a number of challenges in Windows Azure Pack. In this post I will share challenges and solutions.

Challenge 01 – Unexpected error

This occurred when a tenant tries to deploy an instance of a VM role from the tenant portal. I started to verify the following settings on both the template VHDX file and the gallery item

  • Operating System, for example Windows Server 2012 R2 Standard
  • Family name, for example Windows Server 2012 R2 Standard
  • Tags, for example Windows
  • Version. Remember that version must be in format X.X.X.X for example

The solution was that the Library share where the VHDX file was stored was not set as a Read-Only share for the cloud. Once added the Library share to the cloud as Read-Only library share it worked to deploy VM Role instances.

Challenge 02 – …not allowed by any capability profile supported by the cloud

The cloud, Contoso Cloud for developers, had Hyper-V as capacity profile selected. But for VM Roles you cannot use a capability profile, because the VM Role model does not have a property in which to express a capability profile (because it is designed to be consistent with Azure and Azure has no notion of capability profiles). The solution was to uncheck Hyper-V Capacity on my target cloud. Update KB 2936967 removes the requirement for Hyper-V Capability Profile on the VMM Cloud. With this update it is a bit easier to handle clouds used for both VM templates and VM roles.

Challenge 03 – Product key in a VM Role resource definition

There is no option to set Windows product key when configure a resource definition. An easy way to solve it is to use the set-scvirtualharddisk cmdlet to set the product key on the virtual hard disk in VMM.

Challenge 04 – Windows Could not apply unattend settings during pass [specialize]

I connected to the Hyper-V host, opened Hyper-V managed and looked at the floppy disk that was connected to the VM. I open the floppy disk file and read the XML. There was a part about joining the domain. As DHCP configure wrong DNS that was the problem, the VM could not join the domain and hang during installation. I re-configured in VM Role Authoring Tool, imported the new gallery item, marked it as public, added it to the plan, re-login the tenant and re-deployed. Then it worked.

Challenge 05 – Error 31356

Error (31356)
Unable to find the referenced Resource Extension, containing Name=Contoso_FileSrv_ResourceExtension Publisher=Contoso and Version=
Recommended Action:
Try the operation again after fixing the Resource Definition or importing the Resource Extension.

Solution was to remove the item from the plan and save the plan. I waited until the plan was synchronized again and then re-added the item to the plan again. The root cause was that I re-import the resource extension to VMM after importing the resource definition to Windows Azure Pack portal and adding it to a plan.

Challenge 06 – Plan syncing hang

Plan remain in syncing state till all subscriptions belong to plan get synced. You can see this update happening in admin portal by going to subscriptions tab inside that plan. You will see some subscriptions which are already synced (i.e. in active Or Out-Of-Sync state) and some currently syncing (i.e. in Syncing…. State).  Once all subscriptions belong to plan get synced then plan will stop syncing. In my case the solution was to apply VMM update 1, including the scripts. I read some threads about people who had seen this issue when they had forget about the scripts in update 1.

Challenge 07 – Error (22663)

The BITS client job failed to succeed for C:\ProgramData\VirtualMachineManagerData\TempResources\3e23bd43fad847e995279686e8547841\ConfigurationFile.ini resource with the following error: The server name or address could not be resolved

Error context: The error occurred while the remote file was being processed.

Error code: -2147012889

This I solved by unchecking the VM network from the Library. If you uncheck the network, VMM will try to transfer file with ISO instead of BITS/network. Else it will try to use BITS/network for some basic configuration file. In my sandbox new VMs don’t have working IP settings, therefor any kind of network communication fails. With this setting it works anyway, as VMM will use an ISO instead.

Challenge 08 – Error (22743)

The host agent on the host hyper119.contoso.local for virtual machine MyMachine001 is not up to date and cannot provision the physical resources required for the servicing operation.
Recommended Action
Ensure the virtual machine has network connectivity to the library servers, or that the host agent is up to date, and then retry the operation.

This I solved by update to 2012 R2 Update 1 on VMM server, ran Update 1 SQL script and updated all Hyper-V host agent to Update 1.