July 2011 - Posts
Recently, I setup VM in Hyper-Vof Windows Server 2008 R2 for classroom training use.
I created a base hard disk image and a lot of differencing disks for difference VMs.
However, I discover sometimes, when the differencing VM turn on, It will create another NIC to use and hide the previous NIC.
(Maybe it detect the new setup VM as difference hardware)
Thus, the NIC name will be changed to "xxxxxxxx #2".
So, I decided to remove the hidden NIC so that the NIC will not be named to "xxxxxxxxx #2" or "xxxxxxxx #3"...etc.
The following is the steps required before moving the VM:
- Click Start, click Run, type cmd.exe, and then press ENTER.
- Type set devmgr_show_nonpresent_devices=1, and then press ENTER.
- Type Start DEVMGMT.MSC, and then press ENTER.
- Click View, and then click Show Hidden Devices.
- Expand the Network Adapters tree.
- Right-click the dimmed network adapter, and then click Uninstall.
The iSCSI Target solution from MS is now free! We can use it to setup a environment to test fail-over clustering!
Here are more information about this:
The Microsoft iSCSI Software Target has been available for production use as part of Windows Storage Server since early 2007. It has also been available for development and test use by MSDN and TechNet subscribers starting in May 2009. However, until now, there was no way to use the Microsoft iSCSI Software Target in production on a regular server running Windows Server 2008 R2. This new download offers exactly that.
Now available as a public download, the software is essentially the same software that ships with Windows Storage Server 2008 R2. Windows Storage Server 2008 R2 and the public download package will be refreshed (kept in sync) with any software fixes and updates. Those updates are described at http://technet.microsoft.com/en-us/library/gg232597.aspx.
This release was preceded by intense testing by the Microsoft iSCSI Target team, especially in scenarios where the iSCSI Target is used with Hyper-V and with Windows Server Failover Clusters. We do imagine these to be amongst the most commons deployment scenarios.
Testing included running the Microsoft iSCSI Software Target in a two-node Failover Cluster and configuring 92 individual Hyper-V VMs, each running a data intensive application and storing data on a single node of that iSCSI Target cluster. The exciting part of the test was to force an unplanned failure of the iSCSI Target node being used by all the VMs and verify that we had a successful failover to the other node with all 92 VMs continuing to run the application without any interruption.
You can reference this article:
It has an example how to use diskpart to format the drive.
FORMAT FS=NTFS LABEL="New Volume" QUICK
DiskPart Command-Line Options
The only Variables can be used by WDS naming policy are: %First, %Last, %Username, %MAC, %[n]# (or combine them).
A student asked whether we can use ImageX as a backup tool:
Please reference this link:
You cannot use the ImageX.exe tool as a backup tool on a Windows Vista-based computer
It is same to Windows Server 2008.
There is no straight way to capture the whole disk, including C:, D:, E:,etc., to an image file in one time, and you cannot deploy an image including multiple partitions in one time.
However, you can try the following steps and see if can work for you:
Sysprep your machine and then reboot into Windows PE. Capture the offline Sysprep image into .wim format and then upload the image to the WDS server. Or you can do this by a Capture Image.
Create a unattend answer file to automatically create and configure new volumes when you deploy the image onto computers.
For more details about this, please refer to the "Unattended Windows Setup Reference" help document included in the Windows AIK.
On the WDS server, in the folder "RemoteInstall\Images\<ImageGroupName>", create a new folder with the same name as your install image. In the new created folder, create a folder named "$OEM$" (without the quotation marks). Then, in the $OEM$ folder, create subfolders with the name of drive letter.
The whole path should look like:
Put all the files into the appropriate folder, such as put files in the volume D: into folder "$OEM$\D".
Usually we can use the following three ways to sysprep and capture a Windows image:
1. Install a reference computer, sysprep it and boot from a WinPE disk and run Image command to capture the image as we do in this thread:
2. Use WDS
3. Use MDT.
A student asked about the change of authentication in Windows Server 2008 R2, here is a reference for that:
Changes for Identity and Authentication in Windows Server 2008 R2
In the past(Windows NT,2000 or 2003), we can use the "Copy" button in the user profile page to copy the user profile to another location.
However, this method will cause quite a lot of problem. Microsoft did not support this method in Windows 2008 or Windows 7.
You may reference this article:
Now, Microsoft only support the following method to handle user profile:
How to customize the default local user profile when you prepare an image of Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2
If WDS is installed on the same machine as DHCP is you have to set the options under the DHCP tab of WDS.
"If the Microsoft DHCP service is on the server that is being configured as a Windows Deployment Services server, set DHCP Option 60 to PXEClient and set Windows Deployment Services to Do not listen on Port 67."
A student asked how to add a device driver path to answer file, here is the reference:
Add a Device Driver Path to an Answer File
Here are the rough steps:
Step 1 Create WinPE disk:
1. Install WAIK on a technical computer.
2. Right-click Windows PE Tools Command Prompt and click Run as administrator.
3. Type the following commands and press Enter.
Copype amd64 c:\winpe
Imagex /mountrw c:\winpe\winpe.wim 1 c:\winpe\mount
4. Copy imagex.exe from C:\Program Files\Windows AIK\Tools\amd64 to c:\winpe\mount\Windows\System32.
5. Type the following commands and press Enter.
Imagex.exe /unmount /commit c:\winpe\mount
Copy d:\winpe\winpe.wim c:\winpe\iso\sources\boot.wim /y
Oscdimg -n -h -bc:\winpe\etfsboot.com c:\winpe\iso c:\winpe\winpe.iso
6. Burn winpe.iso using Nero and you will get a WinPE with ImageX disk.
Step 2 Make an unattend installation file named sysprep.xml (or other name):
Copy sysprep.xml to the C:\windows\system32\sysprep folder on the reference computer.
Note: you can skip Step 2 if you do not use an unattend file.
Step 3 Sysprep
Type the following command and press Enter on the reference computer:
sysprep /generalize /oobe /shutdown /unattend:sysprep.xml
Step 4 Capture and apply image
1. Restart the reference computer and boot into WinPE disk immediately.
2. Run the following command and press Enter:
imagex /capture /compress maximum /check c: d:\enterprise.wim "Enterprise"
3. Copy d:\enterprise.wim to a USB external drive or a network shared folder.
4. Then you can boot into the WinPE disk on the destination computer.
5. Run the following commands and press Enter:
format c: /fs:ntfs /q/y
imagex /apply e:\enterprise.wim 1 c:
Note: e is the drive letter of the USB external drive or the network shared folder.
Actually, to migrate from Windows Server 2003 domain to Windows Server 2008 domain, there are two options:
1.ADMT if the customer would like to create a new domain and new forest.
2.Upgrade if the customer would like to keep the current domain structure;
Option #1: Use ADMT to migrate to a new forest
This involves moving all your resources from Windows Server 2003 domain to a new and fresh Windows Server 2008 domain. There is a tools called Active Directory Migration Tool (ADMT) which is designed for this job.
As far as I know, ADMT v3.1 is designed for Windows Server 2008 AD migration. (Windows server 2008 R2, Not support)
For your information, please refer to:
To download the ADMT v3.1, please visit the below link:
Step by Step ADMT v3.1 Guide, you can refer to:
Option #2: Upgrade the existing Windows 2003 AD domain to Windows Server 2008
If you want to upgrade your original Window 2003 AD to Windows 2008 AD, you can refer to this TechNet online article:
There is a tool called: "moveuser" from the Windows Resource Kit Tools will do the job more effeciently.
You simply join the computer to the domain and login to the domain as the user you will be migrating.
Then log off the domain and login to the local computer using an account other than the user you are going to migrate.
Then you run the following command: moveuser “username” “domain\username” /y
This simply copies the profile "username" to the domain profile "domain\username".
The /y just tells the action to continue if it experiences errors.
If you want the computer name to be generated automatically and the computer to be added into the specified OU, and if you don't want to create the computer account manually in the Active Directory, you can try the following steps:
Open the Windows Deployment Services console, in the left pane, navigate to "Windows Deployment Services\<ServerName>" node, and right-click this node. Click Properties and then click the Directory Services tab. On this tab, you can change the computer naming format and set the location where client computer accounts will be created.
Configure the sysprep.inf file. At a minimum, the sysprep.inf should look like:
Put this sysprep.inf file under the path "RemoteInstall\Images\<ImageGroupName>\<ImageName>\$OEM$\$1\Sysprep" (you may need to create \<ImageName>\$OEM$\$1\Sysprep folder). Please confirm that this is the only unattend answer file that associated with the image.
For more details about this, please refer to:
Automating the Domain Join and Computer Naming:
Now, during the deployment, the computer account will be generated automatically as the settings you specified in step 1.
More Posts Next page »