Install dotNet framework 3.5 on Win8 / WinSvr2012

We know that from Windows Vista, the original optical media is useless after you finish system installation. Enabling a role of feature do not require that media any more.

But in Windows 8 / Windows Server 2012, for some reason we don’t know, the situation is changed a little. The setup package of dotNet framework 3.5 is not pre-copied to your hard drive. It will have to be downloaded from Microsoft while enabling that feature.

If you hate this, luckily, that setup package is on installation media also. We just need to tell the system to use that instead of downloading.

You may want to run this as administrator:

DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:d:\sources\sxs

where:

  • /Online targets the operating system you’re running (instead of an offline Windows image).
  • /Enable-Feature /FeatureName:NetFx3 specifies that you want to enable the .NET Framework 3.5.
  • /All enables all parent features of the .NET Framework 3.5.
  • /LimitAccess prevents DISM from contacting Windows Update.
  • /Source specifies the location of the files needed to restore the feature (in this example, the D:\sources\sxs directory).

Source: http://msdn.microsoft.com/en-us/library/hh506443.aspx

Install language pack (lp.cab) on Win8 / WinSvr2012

Windows 8 / Windows Server 2012 have changed a lot of UI. The old way for installing a dedicated language pack (lp.cab) does not work any more.

To do the same thing as before, you may love this: \Windows\system32\lpksetup.exe

Source: http://social.technet.microsoft.com/Forums/en-US/w8itproinstall/thread/ef9eada9-2abe-4d3e-8b8f-f66da098e651

Volume Shadow Copy Service error on Windows Server 2012

In many instance of Window Server 2012, there are lots of errors in Event Log about Volume Shadow Copy Service like this:
Volume Shadow Copy Service error: Error creating the Shadow Copy Provider COM class with CLSID {463948d2-035d-4d1d-9bfc-473fece07dab} [0x80070005, Access is denied.].
Operation:
Creating instance of hardware provider
Obtain a callable interface for this provider
List interfaces for all providers supporting this context
Query Shadow Copies
Context:
Provider ID: {3f900f90-00e9-440e-873a-96ca5eb079e5}
Provider ID: {3f900f90-00e9-440e-873a-96ca5eb079e5}
Class ID: {463948d2-035d-4d1d-9bfc-473fece07dab}
Snapshot Context: -1
Snapshot Context: -1
Execution Context: Coordinator

Actually, that may be a bug of Windows Server 2012. You need to and are able to correct it manually by setting up the right credential for related DCOM. You can choose UI or PS to reach that:
UI mode:
1 Open Component Services, open Computers – My Computer – DCOM Config.
2 Locate WTVdsProv and press right mouse key – Properties – Identity, select This user, enter an account name and password with local administrator’s permission.
3 Do the same step for WTSnapshotProvider.
PS mode:
Open PowerShell and use these commands:
$PsCred = Get-Credential
$PrvdIdentityPath = New-Object System.Management.ManagementPath(“root\wmi:WT_iSCSIStorageProviderIdentity”)
$PrvdIdentityClass = New-Object System.Management.ManagementClass($PrvdIdentityPath)
$PrvdIdentityClass.SetProviderIdentity(“{88155B26-CE61-42FB-AF31-E024897ADEBF}”,$PsCred.UserName,$PsCred.GetNetworkCredential().Password)
$PrvdIdentityClass.SetProviderIdentity(“{9D884A48-0FB0-4833-AB70-A19405D58616}”,$PsCred.UserName,$PsCred.GetNetworkCredential().Password)

Source: http://blogs.technet.com/b/filecab/archive/2012/10/08/iscsi-target-storage-vds-vss-provider.aspx

How to migrate WSUS Database from WID to SqlServer on Windows Server 2012

I was trapped in migrating WSUS database from Windows Internal Database to a dedicated SqlServer instance. Due to lots of changes taken in in WSUS and WID of Windows Server 2012, the old way as Windows Server 2008R2 does not work anymore. Finally, I found a solution to do that.
All your needs:
1 A working instance of WSUS, which has a database in WID.
2 SqlServer installation package.
3 Backup before migration.

Migration steps:
1 Install a SqlServer instance. For my case, SqlServer 2012 Express x64 is chosen.
2 Install a SqlServer Management Studio.
3 Log on to this server by LOCAL ADMINISTRATOR. If your server joined a domain, you have to do this by local administrator. No matter your domain account is in local administrators group or not, you cannot do that with a domain account.
4 Open SqlServer Management Studio and connect to server \.\pipe\MICROSOFT##WID\tsql\query using Windows Authentication. You will find a database named SUSDB listed.
5 Stop service WSUS Service and IIS Admin Service.
6 Detach SUSDB. Drop active connections if needed.
7 Log off and log on to this server with your account if you like. You may need an account from local administrators group.
8 Copy database files out from C:\Windows\WID\Data. You need 2 files related to SUSDB.
9 Remove Role Windows Server Update Services and Feature Windows Internal Database. Server will have to reboot after this step.
10 Install removed role and feature again. Choose database instead of WID database. When asked to specify a path for storing updates, use the same file location as before.
11 Finish post deployment but do not open MMC.
12 Open SqlServer Management Studio and connect to the SqlServer instance installed by step 1. You need to run this instance by administrator privilege, or you will get a read-only database in next steps.
13 Stop service WSUS Service and IIS Admin Service.
14 Delete SUSDB database from SqlServer Management Studio.
15 Attach SUSDB from the location where you copied to in step 8.
16 Start service WSUS Service and IIS Admin Service.
17 End.

PS: SqlServer database is not like one in WID, it cannot be backed up by Windows Server Backup. Please choose a separated folder or volume for your database files and setup an agent job to backup them.

[FW] Activating Windows 8 Enterprise RTM – 0x8007007B

The Problem

I came across the following error message when activating Windows 8 Enterprise x64 RTM, downloaded from MSDN:

“Error 0x8007007B  The File name, directory name, or volume label syntax is incorrect.”

The Solution

Using the key provided to you (MSDN etc.) you will need to run the following in an elevated command prompt – if you are new to Windows 8, click Start –> type “cmd” –> right-click on a command prompt and select “Run as administrator” in the bottom of the page.

Next type the following commands:

slmgr.vbs /ipk {YOUR KEY HERE}

slmgr.vbs /ato

The first command will update the key.

The second command will activate Windows.

Hope that helps!

Original Post: http://techblurt.com/2012/08/16/activating-windows-8-enterprise-rtm-0x8007007b/

Change: remove en-gb, coz i found it’s necessary for many, maybe all, languages version.

 

Normal Steps for Minimal Setup CentOS 6 on ESXi

1 Create a new VM as you wish. Install CentOS6 with minimal configuration. After installation, shutdown the VM.

shutdown –h now

2 Add a new E1000 network interface card (eth1 in this article, if not, change all related steps below).

3 Boot and login.

4 Setup a temporary network:

ifconfig eth1 <temporary ip> netmask <netmask> up
route add default gw <gateway>

  • if HTTP proxy is required: edit the yum configuration file.

vi /etc/yum.conf

and add these lines:

# The proxy server – proxy server:port number
proxy=http://mycache.mydomain.com:3128
# The account details for yum connections
proxy_username=yum-user
proxy_password=qwerty

  • if HTTP proxy is NOT required: edit DNS configuration file. See step 13.
  • if Route is required: edit route configuration file. See step 14.

5 Install perl, and update system.

yum install perl
yum update

6 Shutdown.

shutdown –h now

7 Remove the E1000 network interface card, which was inserted in step 2.

8 Boot and login.

9 Insert VMware Tools CD.

10 Install VMware Tools, and reboot. (NOTE: you may need to do this step every time after system update)

cd /
mount /dev/cdrom /media
tar –zvxf /media/VM*
cd vmware-tools-distrib/
./vmware-install.pl

follow the instructions on your screen.

umount /media
reboot

11 Wait for reboot and login.

12 Setup eth0

vi /etc/sysconfig/network-scripts/ifcfg-eth0

and add these lines:

ONBOOT=yes

  • if DHCP is enabled:

BOOTPROTO=dhcp

  • if static IP is preferred:

IPADDR=<IP>
NETMASK=255.255.255.0
BOOTPROTO=none

13 Setup DNS.

vi /etc/resolv.conf

and add these lines:

nameserver <1st DNS IP>
nameserver <2nd DNS IP>
domain <domain name> #your domain name, optional

14 Setup route.

vi /etc/sysconfig/network

and add these lines:

NETWORKING=yes
HOSTNAME=<value>
GATEWAY=<Gateway IP>
GATEWAYDEV=eth0

15 Reboot.

reboot

16 Disable SELINUX if you don’t like it.

vi /etc/sysconfig/selinux

find the line start with SELINUX=, and set it to disabled.

SELINUX=disabled