Archive

Author Archive

a not so normal CBS.log size of 57 GB on a Hyper-V host

November 17th, 2014 No comments

I was working with a customer and updating their test environments VMM server with the new UR4 that have been released and noted that one of the cluster nodes was not working as intended.

Screen Shot 2014-11-17 at 10.56.32

The Event logs also told me that the cluster service disliked the lack of disk space,

Screen Shot 2014-11-17 at 12.29.06

And I could also see in the logs after running the powershell commands for updating the Agents on all hosts (right-click on multiple is not the optimal way :-) )

Screen Shot 2014-11-17 at 10.57.16

But this quite clearly showed that the server was not healthy and full on disk, but why? Well I had to find what was eating up my space like that. The server was a Bare-Metal deployed Windows 2012 R2 with all updates and of course running as a core because a Hyper-V server do not need the full GUI! Still it should not be larger than about 9GB on a disk that is 40GB!

Screen Shot 2014-11-17 at 10.54.47

I found the folder containing the bad boy, still no real clue why the CBS.log could grow beyond the wildest of sizes and it was cleverly  auto compacted and disk fotprint of about 29GB but still 57GB large. Read a blog post about the Windows Trusted Installer going bananas but in my case I could not stop the service to be able to delete the large file.

Screen Shot 2014-11-17 at 11.16.36

A reboot did the trick and rotated the CBS logs and now I could remove it,

Screen Shot 2014-11-17 at 11.28.04

My C: was now breathing again :-P

Screen Shot 2014-11-17 at 11.28.44

And after this I was able to update the VMM agent and the node joined the cluster as a happy member.. will keep my eyes on this server to see if it was just a one time problem with the CBS.log or if happens again….

 

Categories: Hyper-V, SCVMM, Virtualization, Win2012 Tags:

Hot-add/remove Memory on a Hyper-V VM in Technical Preview

November 11th, 2014 No comments

I have been evaluating the new version of Hyper-V in technical preview of Windows and the new hot-add/remove functionality is quite cool and it works with both memory and network cards.

As you can read on technet page here, for the memory it has to be a virtual machine with either Windows Server Tech Preview or Windows Tech Preview running as a Generation 2 VM.

I have as you can see a VM with 768 MB ram and no dynamic memory enabled.

Screen Shot 2014-11-11 at 21.01.16

 

And here you can see that I can change the running VM`s memory both up and down, for the Windows Tech Preview I could go so low as 340 MB…

Screen Shot 2014-11-11 at 21.18.32

 

the command is Set-VMMemory -VMName xxx -StartupBytes 1024MB but you can also change the memory assigned in the Hyper-V Manager GUI.

Screen Shot 2014-11-11 at 22.05.44

And if you already have allocated the memory inside the VM with a SQL or a Minecraft server or another application you cannot shrink the memory bellow that:

Screen Shot 2014-11-12 at 09.54.04

Categories: Hyper-V, Virtualization Tags:

Using PowerShell to download Teched Europe 2014 content

October 30th, 2014 2 comments

I have spent the evening exploring how to create a script to download the content from Teched with powerpoints and videos,

As some of you that follow me on twitter and other social media knows, I will be going to MVP summit in Redmond and the flight leaves early saturday morning and I wanted to be able to get the most important content from Channel 9.

My former colleague Tim has made a GUI session downloader and that is nice, but I wanted one with PowerShell and of course where I could select a category and in my case the CDP is most interesting.

I have borrowed some code to make the folders from Peter Schmidt, but went for the Invoke-RestMethod and also using BITS as the transfer engine.

It is just a simple script but still powerful, I check if the folder is already created and also if the files have been downloaded which means that I do not download the files again when new content has been added :-)

As you can see on the screendump I use switches for the different choices, so to download two different  you can use -CDP -WIN,

Updated 10 Nov: I have got an tip from Irwin to add info in the BITS transfer so you can see which PPT or Video that is currently downloading and updated the script with that :-)

Screen Shot 2014-11-10 at 20.50.25

 

The script is also on the Script Gallery at this link and please go in and vote if you like it.

Please also comment if you have ideas of improvement,  I have downloaded only -CDP as that one was my primary object for filling my HDD for the 10 hour flight over the atlantic and as I am a Hyper-V MVP with cloud and datacenter as a main interest :-) but you can choose if you want -All or just a couple of the different categories!

Categories: Automation, Powershell Tags:

Azure Automation and Runbook Gallery generally available

October 28th, 2014 No comments

Today as the Teched Europe kicks off with the Keynote there where several new announcements and one was that Azure Automation and the Runbook gallery now are General Available.

If you have not tried the Automation during the preview then you now can create a Automation account from the portal and start playing!

Screen Shot 2014-10-28 at 15.11.55

Click on create and name it something smart and to what subscription it should be part of, right now not all regions in azure can be used for the automation accounts. The following regions can be chosed:

  • East US
  • South east Asia
  • West Europe

Screen Shot 2014-10-28 at 15.11.04

When you have an account you can see the first page where some good links reside for you to dig into and learn more about the Azure Automation:

Screen Shot 2014-10-28 at 15.12.27

When you want to create your first Runbook, Microsoft has the Runbook Gallery that you can use to get speed in the automation process as there are several scripts that can help you get started, maybe there is already a script that fits or maybe just need a small customization to get it to do exactly what you want!

Screen Shot 2014-10-28 at 17.36.27

Out of the box you get one module in each Automation account and that is the Azure Module, and it is the latest version right now 0.8.9. There is a possibility to add your own modules, scripts, credentials and certificates.

So what is the cost for running azure Automation? Now you get 500 minutes of runtime in your subscription but you can change that if you run out of “free” time to standard and then you will be billed, the 500 minutes as described below is for all your automation accounts in that subscription.

Screen Shot 2014-10-28 at 15.13.14

In this earlier post I created a Runbook script to check and manage my daughters Minecraft server so you can see an simple example of some azure automation :-)

Categories: Automation, Azure Automation Tags:

Using Azure Automation to check health of Minecraft server in Azure

October 24th, 2014 No comments

As every responsible dad out there I have set up an Minecraft server to my daughter so she can play with her friends!

Screen Shot 2014-10-23 at 16.16.59

I  have deployed a Windows Server on Azure in which I installed the Minecraft server with the right mods, apparently that is important ;-) I have not myself got lost in the Minecraft world, maybe because I grew up in the 80´s and had games that was mega-pixel and now I want that high definition graphics!

To see that it is working and alive I wanted some kind health check so here Azure Automation comes into play! Of course there would have been easier ways but I want try new stuff and also test and see how Azure Automation works and can be utilized.

So I created a runbook that checks the status and try to remediate the issue if it is not working:

I have utilised the YAMS so that the Minecraft Server is handled by a Windows Service. If there is some outage or maintenance on Azure the VM can be restarted and then it is good to know that the Minecraft Server will start even if no user is logged in. If for some reason the YAMS service is stopped or the Minecraft Server has stopped my runbook can remidiate that!

In Azure Automation I can schedule a check every 1 hour:

Screen Shot 2014-10-23 at 16.25.24

And as you can see when checking a job it reports that my Minecraft server is working!

Screen Shot 2014-10-23 at 16.45.23

To connect to the VM´s powershell endpoint I have added SessionOption -SkipCACheck thus letting me connect without getting a cert from a trusted certificate authority or importing the servers cert. Saw this option on Tim´s blog post and borrowed it:-)

In the deployed VM I have also done as explained in the PowerShell Tip from powershell.com to be able to connect to it as it is not part of a domain and when PowerShell remoting is enabled it uses Kerberos by default and the Minecraft server is standalone thus Kerberos not working!

Probably I will do some tweaking and update the script later but you can at least see the possibilities and power of using Azure automation!

Categories: Automation, Azure, Powershell, Virtualization Tags:

Microsoft Teched Europe 2014 – Sessions to watch/attend

October 23rd, 2014 No comments

teched-europe-2014-bottom

Next week Teched Europe kicks of and that will tons of great sessions! Sadly I can´t be there this year :-( but family comes first and the week after that I will be at the MVP Summit in Redmond!

But whats so great with the Microsoft conferences is that you can be part of whats happening even if you cannot make it onsite! Channel 9 will be live broadcasting and also all cool sessions will be uploaded!!

Here are some of the sessions that either if you will be in Barcelona or if you want to check out the recording later should watch/attend!!

As I am an Hyper-V MVP I of course have focus on virtualization, but as my friend and former colleague Fredrik Nilsson says: “attend a session on something you do not know” so here is my top 10 to watch out for!

Tuesday, October 28 1:30 PM – 2:45 PM Room: Hall 8.1 Room L
Speaker(s): Taylor Brown

 

Wednesday, October 29 12:00 PM – 1:15 PM Room: Hall 8.0 Room B1

 

Wednesday, October 29 10:15 AM – 11:30 AM Room: Hall 8.1 Room H

 

Wednesday, October 29 5:00 PM – 6:15 PM Room: Hall 8.1 Room L
Speaker(s): Ned Pyle

 

Wednesday, October 29 10:15 AM – 11:30 AM Room: Hall 8.0 Room A2
Speaker(s): Aidan Finn

 

Tuesday, October 28 5:00 PM – 6:15 PM Room: Hall 8.1 Room J
Speaker(s): Jeffrey Snover

 

Thursday, October 30 3:15 PM – 4:30 PM Room: Hall 8.0 Room C1
Speaker(s): Mark Russinovich

 

Tuesday, October 28 3:15 PM – 4:30 PM Room: Hall 8.1 Room L

 

Thursday, October 30 10:15 AM – 11:30 AM Room: Hall 8.0 Room D1

 

Wednesday, October 29 10:15 AM – 11:30 AM Room: Hall 8.0 Room B1
Speaker(s): Mahesh Narayanan

 

There are of course a ton of more sessions and I will probably do a revision once I have watched the recordings :-)

And during the week follow TechEd in social media :

 

Categories: Hyper-V, TechPreview, Virtualization Tags:

Live migrating VM´s between clusters in VMM 2012 R2

October 17th, 2014 No comments

Today I have been doing some work at a customer creating a Hyper-V 2012 R2 Cluster and starting to live migrate VM´s from their Hyper-V 2012 Cluster.

Doing that from VMM gave me some errors and here is the solution so that if you happens to get into the same problem :-)

First of all, when added the new cluster to VMM I tried to live migrate a VM but got this error (12700)

Screen Shot 2014-10-17 at 19.30.43After a quick search on the net I found this blog post explaining the need to configure kerberos live migration and delegation between the hosts and also that the hosts needs an “Host Management Credentials” account set up in the properties! I had already set up the hosts to use Kerberos and delegation between and still got the above error but when checking the Run As account it was empty:

Screen Shot 2014-10-17 at 15.53.45The problem as you can see though, it is greyed out and cannot be altered, I tried to do add an account through PowerShell and there I got an answer that it had to be set on the cluster,

Screen Shot 2014-10-17 at 21.37.08

checking on the cluster properties in the VMM console there is nowhere to add or see the management credential

Screen Shot 2014-10-17 at 21.32.37

So back to PowerShell again:

 

Screen Shot 2014-10-17 at 21.54.19

And when this is set all the cluster hosts have this credential set and then when doing a Live Migration it succeeded :-)

 

 

 

 

Categories: Hyper-V, Powershell, SCVMM, Virtualization Tags:

MVMC 3.0 released with P2V support

October 13th, 2014 3 comments

The day has come with a new version of the free conversion tool from Microsoft, MVMC 3.0 have been released.

There where some bashing on the net when the VMM 2012 R2 was released and the P2V functionality was removed from that version and some crazy ideas using a secondary VMM 2012 SP1 to do the P2V migrations and then importing into the VMM 2012 R2 was suggested, well that time is now no more now :-)

The installation is quite straightforward with the msi and just a simple wizard.

Screen Shot 2014-10-13 at 20.21.47

Once installed You can start exploring the new options including the new P2V.

Screen Shot 2014-10-13 at 21.44.18

When doing a P2V the MVMC will install an agent on the source and when doing a P2V the source have to be online during the migration.

Screen Shot 2014-10-13 at 21.55.40

And then you go through the wizard and start the conversion

Screen Shot 2014-10-13 at 22.18.29

 

Screen Shot 2014-10-13 at 22.30.10

Once it is finished, you find the VM in your Hyper-V host and can start it, but beware that the wizard does not ask if you want to shut down your source after migration so that is something you have to take care of before starting that P2V´d VM

Screen Shot 2014-10-13 at 23.29.34

But wait you say, I have 100 vm´s and will die if I use the wizard for all of them! Then you can use the PowerShell module and automate the conversion:

Screen Shot 2014-10-13 at 22.14.32

The operating systems that is supported migrating with the MVMC are (although only Windows with the P2V):

  • Windows Server 2012 R2 Standard x64
  • Windows Server 2012 R2 Datacenter x64
  • Windows Server 2012 Standard x64
  • Windows Server 2012 Datacenter x64
  • Windows Server 2008 R2 Standard x64
  • Windows Server 2008 R2 Enterprise x64
  • Windows Server 2008 R2 Datacenter x64
  • Windows Server 2008 R2 SP1
  • Windows Server 2008 Standard (x86/x64)
  • Windows Server 2008 Enterprise (x86/x64)
  • Windows Server 2008 Datacenter (x86/x64)
  • Windows 8 Enterprise (x86/x64)
  • Windows 8 Pro (x86/x64)
  • Windows 7 Enterprise (x86/x64)
  • Windows 7 Professional (x86/x64)
  • Windows 7 Ultimate (x86/x64)
  • Windows Vista Enterprise x86/x64
  • Red Hat® Enterprise Linux® 6 (x86/x64)
  • Red Hat Enterprise Linux 5 (x86/x64)
  • Ubuntu 12.04 (x86/x64)
  • Ubuntu 10.04 (x86/x64)
  • SUSE® Linux Enterprise Server 11 (x86/x64)
  • CentOS 6 (x86/x64)
  • CentOS 5 (x86/x64)
  • Debian GNU/Linux 7 (x86/x64)
  • Oracle Linux 6 (x86/x64)
  • Oracle Linux 5 (x86/x64)

Good luck in your migrations!!

Categories: Azure, Hyper-V, Virtualization, VMware, Win2012 Tags:

Download SysCtr Tech Preview VHD´s with PowerShell

October 12th, 2014 No comments

Now that the Windows Server Technical Preview and also the System Center Technical Preview have arrived everyone wants to start testing, I have in an earlier post done some initial testing of the new Hyper-V features.

If you want to quickly test the released System Center Tech Preview then use the preinstalled VHD´s that helps you get up and running much faster than installing on your own :-)

The released System Center Tech Preview roles are

  • System Center Virtual Machine Manager
  • System Center Orchestrator
  • System Center Operations Manager
  • System Center Data Protection Manager
  • System Center Service Manager

I have in earlier post showed how you can download all the VHD´s for System Center 2012 R2 and of course I could not use that script right of the shelf for downloading the tech preview as someone have done changes on the web page, but here is it! And I have also added some more functionality for you to choose which of the roles you want or all.

First of the changes gives for some reason duplicates of each file url from the web page I collect the download url´s I want to download and to get around that I use the superduper cmdlet and parameter Select-Object -Unique which gives me an array with all files just once ;-)

Screen Shot 2014-10-12 at 21.24.57

Secondly with Invoke-WebRequest PowerShell uses IE under the hood and I get this dialogue and to get rid of that i use -BasicParsing and that lets PowerShell use its own parser.

Screen Shot 2014-10-12 at 21.15.10

And as you saw in the above screendump I utilize Switch parameters so you can choose which of the roles you want and here you can see the script and copy to your own lab server and start downloading to test!

And by the way, make sure that you either have enough storage available on C: or what drive and folder you want to save it to with the -Dest parameter!!

Observe also that you probably will start the download and go for a walk or sleep as it is quite some data that will be downloaded!

Happy testing!

Hyper-V in new Windows Server technical Preview

October 1st, 2014 No comments

So today Microsoft released their technical previews of Windows 10 and also of Windows Server

As an Hyper-V interested guy I wanted to check out some things in this build, there have already been a blog post about cool features such as rolling cluster updates so that you can have different versions in the Hyper-V cluster and keep the VM´s up all time during an upgrade.

There are some more info on the technet site discussing the different new features:

http://technet.microsoft.com/en-us/library/dn765471.aspx

I downloaded the Windows Server technical preview from my MSDN and started the installation, it was really fast (and yes I have an SSD)

Screen Shot 2014-10-01 at 20.47.40

In this screendump you can see that 5.0.9841.0 version of the PowerShell is included in the server technical preview

Screen Shot 2014-10-01 at 20.16.03

And as you can see there is 182 cmdlets for the new Hyper-V PowerShell module

Screen Shot 2014-10-01 at 20.15.20

After you have moved your 2012 or 2012 R2 VM´s you can update the VM configuration to the latest version but beware that once done that you cannot move those VM´s back to the old Hyper-V host.

Screen Shot 2014-10-01 at 21.48.18

A new feature in this version is also that you can make snapshots (yea I still not like Checkpoint name) that uses VSS, and if that is not available it will fail-back to standard snapshots

Screen Shot 2014-10-01 at 21.44.49

And still in this version you can via PowerShell enable Processor compability for those Windows NT server ;-)

Screen Shot 2014-10-01 at 21.49.22

Screen Shot 2014-10-01 at 21.50.33

When I get some more time I will dig some more into it and do a follow up post

happy testing!

 

Categories: Hyper-V, Powershell, Virtualization Tags: