Pages

Thursday, December 19, 2013

Installation guide for System Center Configuration Manager 2012 Beta

After I downloaded the Beta for SCCM 2012, I struggled with a few installation items so I thought I would share my experiences and write a quick Installation Guide.  This is not official by any means, but does detail what I did to get SCCM 2012 Beta installed successfully.  The details are below.  I also created a Word Document that you can download as well.  In case you didn't already grab the beta bits, you can get them here.
In order to install SCCM, I did do some pre-work that I will share below.
I setup an Active Directory Domain using Windows Server 2008 R2 SP1 as the single DC / GC. I did not do anything out of the norm in setting up this server.
For the server that I will install SCCM 2012 onto, I also used Windows Server 2008 R2 SP1. I joined this server to the AD Domain. I also installed the following Windows Roles and Features:
  1. Net Framework
  2. BITs
  3. Remote Differential Copy
  4. Windows Update Services
Since SCCM needs a SQL Instance, I also installed SQL Server 2008 SP1 with Cumulative Update 10 (http://support.microsoft.com/kb/2279604). It is VERY important that you also install this exact same version of SQL Server and this exact Cumulative Update as the current SCCM 2012 beta does not support SQL Server 2008 SP2 or SQL Server 2008 R2. I also had problems installing SCCM 2012 Beta when using any Cumulative Update other than 10 for SP1.
Prior to installing SCCM 2012 beta, I also performed a Schema Prep using the ExtADSch.exe tool in the \SMSSETUP\BIN\X64 directory. If you plan to run the Schema Prep tool from your 32 bit domain controller, use the ExtADSch.exe tool from the \SMSSETUP\BIN\I386 directory.
I will now walk through the entire installation process screen by screen so that we don’t miss any steps.
I inserted the SCCM 2012 Beta DVD into the drive and accepted the autorun. Following is the startup splash screen. After clicking the Install link, I am presented with the Setup Wizard. The only real option from that screen is to click Next. In my environment, I chose to install SQL Server onto the same server that I will be installing SCCM 2012 onto (due to limited resources). Whether you choose to use the same server or a different server, you do need to have SQL Server installed prior to installing SCCM 2012 beta. If you are using a separate SQL Server, make sure you are able to access it from the network (check firewall settings on the SQL Server machine).
clip_image002 clip_image004
Getting Started
On the next screen, I get to decide how I’m going to install SCCM onto this server. The key options are to install a Primary Site server or install a Central Administration Site. Depending on your site topology needs, you may install a Central Admin Site first and then install multiple Primary Site Servers. In my lab, I am doing a single site install so I do not have a need for a Central Administration Site. For that reason, I am choosing the first option.
clip_image006
Upon hitting Next, I am presented with the wonderful licensing screen. In the beta, the License Key is prepopulated so we only need to accept the license terms and click Next.
clip_image008
Prerequisite Components
SCCM 2012 beta has to download updates and other components from the Internet to proceed with setup. Without Internet connectivity, you cannot proceed. During the actual installation process, setup also retrieves information from the Internet so you must have Internet connectivity throughout the entire installation process. I point this out because I usually setup isolated lab environments that don’t have Internet connectivity. This caused some delay and frustration on my part when I hit this minor roadblock. Want to save everyone else time and headaches.
clip_image010
The ConfigMgr.Manifest.cab file is downloaded first. Based on what is listed in the manifest, setup will download the remaining prerequisite components.
clip_image012 clip_image014
Site and Installation Settings
Based on your site topology, you will configure the appropriate three character Site code and Site name. Make sure you set this correctly as you cannot change this information post installation.
clip_image016
Since I am installing a single standalone site, I chose the second option on the following screen. If you have a Central Administration Site, you will specify it here so that you can join your existing hierarchy.
clip_image018
Database Server
Remember, you are not installing SQL Server here. You are only referencing the existing SQL Server that was installed prior. In my case, this happens to be the same server as the one I’m installing SCCM 2012 beta onto. I accepted the default SQL Instance name and SQL replication snapshot folder location. If you have a specific naming convention or folder location, change to meet your needs.
clip_image020
SMS Provider Settings
The SMS Provider is an SCCM component that provides communications between the Management console and the Site database.
clip_image022
Client Computer Communication Settings
This section allows you to configure client communication requirements with the server. The most secure method is HTTPS, but you do need to consider the clients that will be managed by SCCM and whether they support HTTPS communications or not. The second option that I selected is a good compromise. For those clients that can use HTTPS (via PKI certificates), that will be the preferred method while I can still support clients that can only communicate via HTTP for whatever reason.
clip_image024
Site System Roles
Since I did not choose to setup a PKI infrastructure in my lab environment (will do this in a future rev), I opted to use HTTP for communication with the Management Point and Distribution Point.
clip_image026
Customer Experience Improvement Program Configuration
As with most products, we get the option to participate in the Customer Experience Improvement Program for SCCM 2012. Since this is the beta and we need to collect this information as part of the process, you don’t have the option to not join. J
clip_image028
Setting Summary
Before setup actually starts installing anything, we are presented with the Summary screen to review in case we inadvertently selected a wrong option or we change our mind on a previously selected option. We can go back and make changes to our configuration settings. If all is well, click Next to proceed to prerequisite checks and then installation.
clip_image030
Prerequisite Check
During the prerequisite check, setup is checking for required components like BITs or the correct version of SQL Server 2008. If all is well, you will see the screenshot on the right and be able to click Next to start the actual installation process.
clip_image032 clip_image034
Install
The installation process will configure all the selected SCCM roles and services as well as SQL instances.
clip_image036 clip_image038
When setup is complete, you will see the next screenshot. Review the list and ensure all items have a green check mark which indicates it was installed successfully. If you have any red items, you will need to view the log file to see where the error occurred and correct the issue. On my installation, everything completed successfully and I was able to hit Close and the Management Console started.
clip_image040
SCCM Administration Console
I am just showing the console below, but will not be conducting a walk-through of the console in this document.
clip_image042

Wednesday, December 18, 2013

Backup and Recovery of Non-Windows VMs on Hyper-V

I will show you a simple (and low cost) manual method for back and recovery of virtual machines running on Hyper-V.  When I ran through the process in my lab, I purposely used two different types of virtual machines:
  • one Windows VM with a VSS-aware OS and enabled integration services (Windows Server 2003)
  • VM without VSS or integration services and absolutely no support from Microsoft (Hannah Montana Linux)
I mentioned in the VSS Overview post that contemporary versions of Windows running in a VM on Hyper-V that support VSS and have the appropriate Integration Services installed can coordinate VSS activities with many of the applications and services inside the VM when a backup request is made on the physical host.  This coordinated VSS processing via the Hyper-V Integration Services means that VSS aware applications can be backed up in a VM with absolutely no downtime. without installing an additional backup agent inside the VM (saving cost and reducing complexity).
For that other class of VMs, those that do not support VSS or do not have the “Backup” Integration Service enabled, Windows Server 2008 R2 and Hyper-V still can create a consistent backup, but the process is a little bit different.  If the VM (for whatever reason) cannot itself consume the coordinate VSS request, Hyper-V will save the state of the VM (hibernate it) copying the contents of memory to disk and then generate a snapshot of the disk housing the VM.  Here’s how the process looks to a running VM in this category:
  1. Backup is requested, and a running VM is found on the host – say, like Hannah Montana Linux (or Windows 2000), which does not have VSS
    clip_image002
  2. Hyper-V and VSS figure out that Hannah Montana can’t consume the VSS  request, so the state of running VM is saved to disk into the directory which contains the VMs configuration file – this usually takes only a few seconds, but depends on the amount of memory used by the VM and the speed of the attached disk storage
    clip_image002[4]
  3. Once the VM is completely stopped and the configuration saved, the VSS snapshot on the host can be created
    clip_image002[6]
  4. After the snapshot is generated, the VM is restarted
    clip_image002[8]
  5. The VM starts right back where it was, with only a brief “freeze” and “thaw’
    clip_image002
Remember I did this entire process simply by requesting a backup of the physical Hyper-V host – I didn’t need to request all of this to happen Windows Server 2008 R2 / Hyper-V / VSS did it all for me!   Any VSS aware backup of Windows Server 2008 should be able to do the same thing for you, if you use diskshadow, Windows Server Backup (WSB – part of Windows Server 2008), or a more full featured enterprise backup solution. 





The key thing to note is that you can improve the backup and recovery of even unsupported operating systems running on Hyper-V.

Hyper-V Replica: Basic Monitoring Report

It’s basically four laptops on my coffee table, all part of the same AD domain.
I created a number of VMs on the systems, and configured replication, including extended replication for a couple of the VMs, as per the picture below:

Like I said earlier, what a mess of replication I’ve created! 
How could I possibly keep track of it all, as well as effectively monitor replication?
Truth be told I created this mess so I could create a report!  I was inspired somewhat by on of Ben Armstrong’s post about his home configuration. 
Ben created a nice little PowerShell one-liner that created a simple, easy to read report detailing replication status on a single host.
get-vm | Get-VMReplication | select name, replicationmode, replicationhealth,  @{Expression={"{0:N0}" -f ((get-date)-($_.lastreplicationtime)).TotalMinutes};Label="Delta (min)"}
…and the output looked like this:
It’s a nice little bit of code…Ben did some things with time to make the replication delta time appear in minutes – very cool.
I wanted to shoot for something a little more ambitious.  I wanted to report on multiple servers (to help with monitoring  remote branch / store locations), as well as make it sortable.  Ben’s output didn’t show any of the host names or the assigned replication interval, and (as is the way with PowerShell) it looked sort of old school with the output sitting inside the PowerShell Window.
I tweaked Ben’s one-liner a tiny bit.  First I created a text file on one of the hosts (c:\Serverlist.txt) with the names of my Hyper-V hosts, so I could loop through them:
johnkel-hpa.replicatest.com
johnkel-hpb.replicatest.com
johnkel-hpc.replicatest.com
johnkel-hpd.replicatest.com
I know that I could have simply asked AD for all the Hyper-V hosts it knows about, but I wanted to create a simple example (and no, I don’t own replicatest.com – I’m not running this on the Interwebs … just using the name on my coffee table!).
Then add some missing fields and pipe it to one of my favorite PowerShell cmdlets Out-Gridview:
get-content .\serverlist.txt | foreach-object {get-vm -computername $_ } | where {$_.replicationstate -notmatch "Disabled"} | get-VMreplication | select primaryserver, replicaserver, name, replicationmode, State, replicationhealth, @{Expression={"{0:0.0}" -f ($_.FrequencySec / 60)};Label="Target Freq (min)"}, @{Expression={"{0:N0}" -f ((get-date)-($_.lastreplicationtime)).TotalMinutes};Label="Delta (min)"} | out-gridview
The output is a sortable, filterable GUI (via Out-Gridview) with all the critical info I think I would need to monitor the status of Hyper-V Replica on my servers:
ReplicaReport-highlights
PowerShell is awesome… but I must confess that I don’t use it everyday, so I have to poach great examples and fiddle a lot .
Still, what’s great about the basics of the one-liner that I snagged from Ben is that it can be used in any number of ways – it could be updated to to create a simple exception report for VMs with an “Error” for replication State, to find VMs not configured for replication…whatever.
The great thing is that this “one-liner” let me easily see (and unwind) the multi-server replication I had created!

Tuesday, December 17, 2013

Beginner’s Guide to Data Recovery

When data is lost on a hard drive, it can result in two scenarios: 1) the operating system is fine, hard disk is still accessible, but files are missing 2) the computer doesn’t boot up and weird noises are heard from the hard disk. Now let us see step by step procedure to tackle both the scenarios.
To tackle scenario 1:
a) Don't write anything to the hard disk after the data loss. This is because whenever you delete the files from the hard drive, the OS does not delete the information permanently. It shows you that there are more free spaces but they are still occupied by the deleted information. You will not be able to see it, but data recovery software will.
b) If you have taken the backups of all the important information, check the backups and restore them to retrieve the lost information. If you have not taken the backup, follow the data recovery steps as mentioned in the steps below. It is always good to take back-up of important information on a regular basis.
c) Never install the data recovery software in the drive where the data loss has occurred. The reason is that if you install on the same drive, you might overwrite the lost data.
d) In order to be safe, always switch off the computer after the data loss. All the operations of the OS depend on the reads and writes with the hard drive and this may result in overwriting the lost data.
e) Remove the hard disk from the computer and connect a new hard drive. After you have installed an OS in the new hard drive you can connect the old hard disk to the computer as a secondary drive and access it without writing anything to it. If you prefer not to install an OS then you run a Linux live CD instead. You can also do this by putting your hard disk into a USB hard drive enclosure. Then connect it to the computer via USB to access the files.
f) If the data loss has happened due to a virus attack, make sure you have installed an anti-virus software on the second computer where you will be performing the data recovery.
g) There are several free data recovery softwares available on the internet, select the appropriate one and recover your data.
To tackle scenario 2:
Whenever there is hard disk failure, it is impossible to access the hard drive. One of the most common reasons is head crashes. The head is responsible for reading the disk’s magnetic surface. But a hardware failure means it grinds against the metal surface and makes the reads impossible. If you have a hard drive failure follow the steps below:
a) Switch off the computer and don’t try to start it again as this can result in further damage to the hard drive
b) Keep the hard disk secure, for instance if the hard drive failed due to the external problem like flood, preserve it in water and don't try to dry it by your own.
c) Whenever the physical error occurs, we cannot fix it. So contact a good data recovery company and identify which components need to be replaced.
d) Most of the data recovery companies will not charge anything if they are not able to recover the data. They may give and estimation time for analyzing the hard drive. Use a wrapping material while handing over the hard drive. Also use foam to prevent the sudden movements and to secure the hard disk inside. Hopefully they will be able to fix the physical errors and recover your data.