Tag: PowerShell

Last updated by at .

System Center Logo

SCVMM 2012 R2 Error 23317 When You Try to Apply Changes on VM That is Using Shared VHDX Disk

A customer of mine had a issue when he tried to change properties of Virtual Machines in System Center Virtual Machine Manager 2012 R2 which use shared VHDX, which were not created with VMM. The properties do he wanted to change had nothing to do with the Shared VHDX it self. He tried to set the availability set for these Virtual Machines.

The Error in SCVMM is the following:

Error (23317)
The operation Change properties of virtual machine is not permitted on a virtual machine that has shared virtual hard disks.

Recommended Action
The operation Change properties of virtual machine is not permitted on a virtual machine that has shared virtual hard disks.

Stanislav Zhelyazkov (Microsoft MVP) blogged about this in October 2013. The solution is pretty easy and is called PowerShell. Just do the modification but do not apply it. Use the script view in Virtual Machine Manager to get the code which would run behind the scene.

For example:

Remove all the things you don’t need and run the script:



SCVMM Bare-Metal Fails

Add drivers to SCVMM Bare-Metal WinPE Image

A long time ago I wrote a blog post on how you can use System Center Virtual Machine Manager Bare-Metal Deployment to deploy new Hyper-V hosts. Normally this works fine but if you have newer hardware, your Windows Server Image does may not include the network adapter drivers. Now this isn’t a huge problem since you can mount and insert the drivers in the VHD or VHDX file for the Windows Server Hyper-V image. But if you forget to update the WinPE file from Virtual Machine Manager your deployment will fails, since the WinPE image has not network drivers included it won’t able to connect to the VMM Library or any other server.

You will end up in the following error and your deployment will timeout on the following screen:

“Synchronizing Time with Server”

SCVMM Bare-Metal Fails

If you check the IP configuration with ipconfig you will see that there are no network adapters available. This means you have to update your SCVMM WinPE image.

First of all you have to copy the SCVMM WinPE image. You can find this wim file on your WDS (Windows Deployment) PXE Server in the following location E:\RemoteInstall\DCMgr\Boot\WIndows\Images (Probably your setup has another drive letter.

WDS SCVMM Boot WIM

I copied this file to the C:\temp folder on my System Center Virtual Machine Manager server. I also copied the extracted drivers to the C:\Drivers folder.

After you have done this, you can use Greg Casanza’s (Microsoft) SCVMM Windows PE driver injection script, which will add the drivers to the WinPE Image (Boot.wim) and will publish this new boot.wim to all your WDS servers. I also rewrote the script I got from using drivers in the VMM Library to use drivers from a folder.

Update SCVMM WinPE

This will add the drivers to the Boot.wim file and publish it to the WDS servers.

Update WDS Server

After this is done the Boot.wim will work with your new drivers.

 

 

 

 

 



Cisco Microsoft

Cisco and Microsoft Announce Sales and Go-to-Market Agreement

At the Worldwide Partner Conference 2014 Cisco and Microsoft announced a multi-year sales and go-to-market agreement designed to modernize data centers through the delivery and acceleration of integrated solutions. This will focus on bringing a deeper integration between the datacenter technologies of both companies. This includes Cisco UCS and Nexus products as well as Microsoft’s CloudOS solutions based Windows Server, Hyper-V, System Center, SQL Server and Microsoft Azure.

Highlights:

Go-to-Market:

  • Cisco and Microsoft agree to a three-year go-to-market plan focused on transforming data centers through the delivery of integrated solutions for enterprise customers and service providers.
  • In year one, the companies will focus on six countries — the United States, Canada, UK, Germany, France, and Australia — with expansion to additional countries in the following years.
  • Cisco and Microsoft will align partner incentive programs to accelerate solutions selling via mutual channel partners.
  • Cisco and Microsoft sales teams will work together on cloud and data center opportunities, including an initial program focused on the migration of Windows 2003 customers to Windows 2012 R2 on the Cisco UCS platform.

Integrated Solutions:

  • Integrated solutions will focus on private cloud, server migration, service provider, and SQL Server 2014
  • Cisco technologies to include Cisco UCS, Cisco Nexus switching, Cisco UCS Manager with System Center integration modules, and Cisco PowerTool.
  • Cisco-based integrated infrastructure solutions will include FlexPod with NetApp and Cisco Solutions for EMC VXPEX.
  • Microsoft technology includes Windows Server 2012 R2, System Center 2012 R2, PowerShell, Microsoft Azure and SQL Server 2014
  • Cisco Application Centric Infrastructure and Cisco InterCloud Fabric to be integrated in the solutions in future releases

Source and More information: www.streetinsider.com

As you may know I am a Microsoft MVP and a Cisco Champion and I really like doing project with Cisco Hardware since they do a lot of integration with the Microsoft Stack especially System Center and PowerShell. In my opinion this could be a strong partnership and will make life of a lot of people a lot easier.



SMA Author RunBooks in Windows Azure Pack

Service Management Automation – The Next Step in Cloud and Datacenter Automation

With System Center Orchestrator Microsoft already had an datacenter automation engine in his portfolio. Microsoft acquired Opalis added it to the System Center Suite, after a while Microsoft renamed Opalis to System Center Orchestrator. As we have a look at modern datacenters and our cloud environment automation is a key part of it. With the latest release of System Center 2012 R2 and Windows Azure Pack, Microsoft release a new automation engine based on PowerShell Workflows called Service Management Automation (SMA).

Windows Azure Pack Automation with SMA

SMA is integrated as one of the key Resource Provider in Windows Azure Pack, and allows you to manage your PowerShell Workflows in so called Runbooks. Service Management Automation enhances PowerShell Workflows in several different ways.

  • Centralized management
  • Centralized store for variables, credentials, certificates, connections, modules, workflows, checkpoints and schedules.
  • High availability workflow execution
  • Versioning
  • Odata web service (HTTP API)
  • Historical view of workflow jobs and their output

Architecture

SMA is build form several different components.

  • Web Service – HTTP/HTTPS API which distributes runbook jobs to runbook workers and builds the connection to Widnwos Azure Pack
  • Runbook worker – Executes Runbooks
  • PowerShell module – Enables SMA to be managed by Windows PowerShell
  • Windows Azure Pack - UI for administrators to create and manage runbooks
  • SQL database – Store for Runbooks and settings

SMA Architecture

  • The Automation web service communicates with Windows Azure Pack and authenticates users.
  • The SQL Server databases store and retrieve runbooks, runbook assets, activities, integration modules, and runbook job information.
  • Runbook workers run the runbooks, and they can be used for load balancing.
  • The management portal in Windows Azure Pack is where you author, debug, and start and stop runbooks.

Source: TechNet

One of the greats enhancements Service Management Automation together with Windows Azure Pack brings is the possibility to link runbooks to SPF and VMM activates used in the Virtual Machine Cloud. What does this mean? For example you link a runbook to a Create Virtual Machine activity, so every time a VM gets created the runbooks starts and also gets as input object the VM which was created. This is just one example what you can do with SMA and Windows Azure Pack VM Cloud, there are a lot of other possibilities as well.

If you compare System Center Orchestrator to Service Management Automation, SMA looks a little bit more complex if you have used a lot of Integrations Packs in SCORCH but if you have done a lot of work in PowerShell you will really like SMA and see the advantages of it.

Service Management Automation does not offer an user interface by itself, instead it is using the Windows Azure Pack portal, where admins can author, run, schedule and link runbooks.

SMA Author RunBooks in Windows Azure Pack



AzureStartup

Microsoft Azure Update at Build 2014

At the Build Conference 2014 Microsoft already announced a lot of new stuff for the whole Microsoft or IT ecosystem. There is absolutely no time to cover all the changes and announcements Microsoft has made in the past 2 days. So I will just focus on the things I care about.

  • Prior to the Build Conference Microsoft announced that Windows Azure will be renamed to Microsoft Azure. This will show how Microsoft is not only building on top of the Windows platform, they also have opened up for other platforms an solutions a long time ago. One example for that maybe was the announcement of supporting Oracle Software in Microsoft Azure around a year ago.
  • Mark Russinovich announced some great new changes to Microsoft Azure IaaS. You can now capture and deploy images, you can Puppet and Chef as well as PowerShell DSC support, to configure you server environment. An this is great for developers, some of the features will show up directly in Visual Studio. Microsoft also did some work on the Networking site which was really important, for example you can now change the subnet for Virtual Machines.
    Microsoft Azure Announcements
  • Microsoft also launched a lot of new preview features like Azure Cache and a lot more. What I love the most is the new Microsoft Azure feature called Azure Automation. Azure Automation allows you to automate the creation, monitoring, deployment, and maintenance of resources in your Azure environment using a highly-available workflow execution engine. Orchestrate time-consuming, error-prone, and frequently repeated tasks against Azure and third party systems to decrease time to value for your cloud operations. This is basically Service Management Automation (SMA), which was released with System Center 2012 R2 as a on premise version, now running up in Microsoft Azure. For those how haven’t heard about SMA, SMA is a new automation engine and Runbooks in Service Management Automation and Microsoft Azure Automation are Windows PowerShell workflows.
    Microsoft Azure Automation
  • Microsoft also release a new preview of the Microsoft Azure portal. Since Microsoft released a huge number of new features in Azure, the “old” management portal didn’t really fit the requirements anymore. The new Azure management portal helps you to be much more organized and is using a lot of new concept like “blades” to help you navigate through your Azure environment. The new dashboard also gives you a quick overview about the Microsoft Azure datacenters and there service status, and the new touch friendly dashboard also allows you to customize it for your need. You can check it out on portal.azure.com
    New Microsoft Azure Portal
  • I am not a developer but I was really impressed what Microsoft did for developers. They are just generating a huge numbers of new opportunities with their new platforms not only in Microsoft Azure using IaaS, mobile Services or PaaS, Microsoft also announced a new concept of Universal Apps which allows developers to write apps which run on Windows Phone, Windows and Xbox One. Some days ago Microsoft also showed the new Kinect v2 hardware which I hope developers will use to write some really cool stuff. If we have a lot back at Microsoft Azure, what I really liked about the new Portal is the  integration of Team Foundation Server or “team projects”.
    Microsoft Azure Team Projects

This are just a few of the cool new things Microsoft announced at Build 2014, there is a lot more which is definitely worth to talk about.



Install Sysinternals from PowerShell

More about PowerShell OneGet

As already posted and as you can see on my blog, I really like the new feature called OneGet. With the Windows Management Framework 5.0 Preview, Microsoft released a new PowerShell module which is called OneGet.

OneGet is a new way to discover and install software packages from around the web. The way how this works is that you can connect to repositories around the web or you can just add new repositories by your self for example for internal use. In the preview you have the Chocolatey repository connected. I am pretty sure Microsoft will also add some own repositories to the list, so you can install Microsoft software and packages from a trusted source.

You can get all the different repositories with the Get-PackageSource cmdlet.

Get-PackageSource

You can than list all the packages available for you by using Find-Package, or you could use it to find a specific package.

Find_package

If you have found the right package you can also see all the versions available by using the Find-Package <Package> -AllVersions cmdlet.

Find Package Versions

You can now install the version you need or you can just use the Install-Package cmdlet to install the latest available version.

OneGet PowerShell

After you have installed packages you can of course list them by using the Get-Package cmdlet or uninstall a package by using Uninstall-Package.

But this is not everything, another great thing about OneGet is that it can be integrated in PowerShell Desired State Configuration (DSC). So think about it for a moment, you can now create simple server configurations with DSC and you don’t have to think about software repositories at all, OneGet does handle this for you.

By the way, Garrett Serack (Senior Open Source Software Developer at Microsoft) also pointed out to me that OneGet also has a place on the Microsoft Open Source Software site CodePlex.

 

 



Install Sysinternals from PowerShell

Install Sysinternals from PowerShell via OneGet

Microsoft just announced the Windows Management Framework 5.0 Preview. The Windows Management Framework V5 preview adds some cool new feature called OneGet.

OneGet is a new way to discover and install software packages from around the web. With OneGet, you can:
  • Manage a list of software repositories in which packages can be searched, acquired, and installed
  • Search and filter your repositories to find the packages you need
  • Seamlessly install and uninstall packages from one or more repositories with a single PowerShell command

As I did some tests this is perfect to install new software packages very easily. So I started with one of my favorite tools called Sysinternals Suite.

Install Sysinternals from PowerShell

First I have check if there was a Sys internals Package available by using:

This checks online from different sources if there is a package available. After that I installed the package by using:

So this is really easy and guess what, it does not just work for Microsoft Software, there is a lot more of third party Software which can be installed with OneGet. So make sure you checkout the Windows Management Framework 5.0 Preview to get the new OneGet cmdlets.