2010年3月26日星期五

讓Users 一起管理VM

Hyper-V Manager 預設只有Local Administrators Group 和 Domain Administrators Group 才有管理Hyper-V 權限, 但由於只有一,至兩個管理員負責Hyper-V管理上會比較麻煩, 所以我們可以經過Authorization Manager 授權給users 管理權限, 而不用給予最高administrators 權限.


1.在windows server 2008, 輸入azman.msc開啟Authorization Manager, 打開“%ProgramData%\Microsoft\Windows\Hyper-V\InitialStore.xml"
2.展開Definitions, 右鍵Role Definitions-->Create Role Definition, 在Name 輸入VM Manager, 按一下Add, 選擇需要的operation permission.


3.展開Role Assignments, 右鍵Add Role, 選擇VM Manager


4.新增users 到VM Manager

5.最後用users account 登入後, 打開Hyper-V Manager, 便會看見VM


6.因為沒有給予Stop Service 權限, 所以user 不能Stop VM

2010年3月20日星期六

讓不支援HAV (Hardware-Assisted Virtualization) 電腦都可以行XP Mode





XP Mode 是Windows 7 新特色, 可以解決軟件相容性問題, 但唯一是只可以在CPU 支援HAV (Hardware-Assisted Virtualization)電腦上運行, 一些比較舊電腦就無福享受這個新功能.
但近日Micosoft 發佈了更新檔KB977206 , 可以令一些電腦沒有HAV 支援下都可以成功執行.
如大家有舊電腦可以一試.
這個更新僅支援 Windows XP Service Pack 3 虛擬機器
建議您僅在處理器不支援 HAV 功能時安裝這個更新

已知問題

安裝這個更新之後,您可能無法在 Windows 7 和 Windows XP 模式 (或任何其他虛擬機器) 之間複製並貼上檔案。如果要解決這個問題,可透過從虛擬機器存取的共用 Windows 7 磁碟機來複製並貼上。如果要執行這項操作,請依照下列步驟執行:
請確認您已啟用虛擬機器中的「整合功能」。如需有關如何啟用這些功能的詳細資訊,請造訪下列 Microsoft 網站:
http://technet.microsoft.com/zh-tw/library/ee449412(WS.10).aspx (http://technet.microsoft.com/zh-tw/library/ee449412(WS.10).aspx)
在虛擬機器中,開啟 [Windows 檔案總管],然後在虛擬機器的磁碟機和共用的 Windows 7 磁碟機之間複製或貼上檔案。


Windows Virtual PC and Windows XP Mode no longer require HAV processors
The Virtual PC team is thrilled to announce the availability of KB977206 which allows our customers to use Windows Virtual PC and Windows XP Mode on non-HAV (Hardware-Assisted Virtualization) machines. Windows XP Mode continues to use hardware virtualization such as Intel Virtualization Technology (Intel® VT) or the AMD-V™ chipset when available but it no longer requires them. A number of our customers and partners have been asking us to support a wider range of PC’s including those without HAV capability and we have delivered this software patch to address their needs. We believe that this change simplifies the customer experience and makes this benefit accessible to many more PCs.

Download the software update for 32-bit host operating systems from here and for 64-bit host operating systems from here.

The KB article describes the various scenarios under which the software update must be installed. Ensure that Windows Virtual PC is installed before applying this fix.


下載位置: http://support.microsoft.com/kb/977206
XP MODE 下載:http://www.microsoft.com/windows/virtual-pc/download.aspx

2010年3月2日星期二

了解 Virtual Hard Disk

在Hyper-V 裡, 主要有兩種類型: Fixed-size VHD& Dynamic VHD, 每種類型可支持size 上限是2040GB.
Fixed-size VHD: 如建立VHD 時已設定20GB, VHD 會立即佔去了實體hard disk 20GB 位置,好處是存取效能較好.
Dynamic VHD: 如用此類別建立VHD並設定20GB, 但它不會立即佔去了實體hard disk 20GB, 它只會隨著用量來擴充容量直至到20GB

另外還有Differencing VHD: 這是會建立兩個VHD, 而且是母子關係, parent-child relationship, VM 會根據parent VHD 為基礎, 而所有改變只會在child VHD, 不會影響到parent VHD. 好處是節省空間, 但會效能會大打折扣.



最後一個是Pass-Through Disk Access, 其實這個不是VHD 的一種, 這能夠令Hyper-V 沒有VHD 下利用直接存取Physical Hard Disk工作, 而且沒有2040GB 限制. 但首先在disk managment 裡offline hard disk 才可以給hyper-v 使用.

還有注意地方:
System 只可以由IDE 啟動, 而IDE 只有2個controller, 可以連續4隻VHD. 而SCSI有4個controller, 每個controller 可以連接64隻VHD, 總數可以連接256隻VHD, 但不能boot system.

2010年2月18日星期四

在Windows Server 2008 Server Core上安裝Hyper-V

安裝Server 2008 Server Core 並不困難, 只要放installation disc 跟指示一步一步執行便會到登入畫面, 預設第一次登入密碼是:P@ssw0rd

由於server core 沒有GUI, 安裝Hyper-V全程只靠command 執行



1. 在command prompt 輸入oclist

2. 輸入bcdedit /set hypervisorlaunchtype auto, 設定hypervisor 自動執行

3. 再輸入start /w ocsetup Microsoft-Hyper-V

4. 再輸入oclist, 會看見Hyper-V 已經安裝成功



要移除Hyper-V Service

start /w ocsetup Microsoft-Hyper-V /uninstall

2010年2月4日星期四

Windows 7 RC 版將於 2010 年 6 月 1 日到期

自 2010 年 2 月 15 日起,還在使用Windows 7 RC的電腦會開始收到系統通知,告知您RC版即將到期的訊息,並請您盡速備份您的電腦資料。而 2010 年 3 月 1 日起,電腦會每兩小時會自動關機,直到 2010 年 6 月 1 日 RC 版到期為止。因此,為了降低您的不便,請盡速重新安裝 Windows 7 正式版或其他有效的 Windows 版本,若您仍需要更多時間評估 Windows 7,可下載Windows 7 企業版90天試用版。

From Microsoft Taiwan Blog

Technet HK 新遊戲 - TechNet 尋「抓」密碼遊戲 ('Catch the code' Challenge)



上 TechNet 網站尋「抓」問題及密碼,跟住將密碼及答案發送訊息至 http://www.facebook.com/MSHKTechCom 。即有機會獲贈 Microsoft Arc Mouse 乙隻! 記住要登記咗做會員,先可以參加!

2010年2月3日星期三

一個指令實現Windows 備份和還原

在Windows XP 或更前的年代, 很多IT PRO 都會利用Ghost 來做Backup and Restore 方案, 亦有很多公司, 學校會利用Network Ghost 版本來部署大量Client Computers,但這些都是收費軟件,不穩定和慢,來到了Windows Vista/7 年代, 提供了一套自己的系統備份工具,只需幾個指令便可實現.

1. 建立WinPE USB 手指開機
A. 安裝Windows Automated Installation, 之後用管理員身份打開"Deployment Tools Command Prompt", 輸入"copype.cmd x86 c:\winpe_x86" 如是x64, 請把"x86" 轉成"amd64"


B. 把winpe.wim mount 到c:\winpe_x86\mount 資料夾內, 在command Prompt 輸入"Dism /Mount-Wim /WimFile:C:\winpe_x86\winpe.wim /index:1 /MountDir:c:\winpe_x86\mount"


C.複制需要的工具到winpe_x86\tools 下, 輸入"mkdir c:\winpe_x86\mount\tools" 建立Tools 資料夾, 然後輸入"xcopy "c:\programs files\windows aik\x86" /e c:\winpe_x86\mount\tools"


D. 把已準備好的winpe.wim 封存, 輸入"Dism /unmount-wim /mountdir:c:\winpe_x86\mount /commit"


E. 複制winpe.wim 到c:\winpe_x86\ISO\sources 並改名boot.wim 用來開機,輸入"copy c:\winpe_x86\winpe.wim c:\winpe_x86\ISO\sources\boot.wim



F. 準備一隻手指, 格式化並建立一個active primary partition, 用管理員身份打開打開"Command Prompt", 輸入以下指令
Diskpart
List Disk
Select Disk 3 <--3 是指手指. clean create partition primary active format quick fs=ntfs assign letter=u exit G. 把Windows PE 檔案複制至手指 "xcopy c:\winpe_x86\iso\*.* /e u:\"

2. 用winpe 手指開機, 並用imagex /capture指令建立Image (備份)

A. 連接USB Harddisk 或用net use 指令連接network drive, 如已連線的network drive Letter "F:", 輸入"imagex /capture c: f:\backup.wim "Backup" /compress none"

imagex /capture image_path image_file "name" {"description"} {/boot /check /compress [type] /config /flags "EditionID" /norpfix /scroll /verify}

B. 如想看wim 檔案資料
" imagex /info f:/backup.wim"

imagex /info img_file[img_number img_name] [new_name] [new_desc] {/boot /check}

3. 利用imagex /apply 指令還原
A. 建立primary partition
diskpart
select disk 0
clean
create partition primary
assign letter=c:
active
exit
format c: /q /y

B. 還原影象檔
imagex /apply f:\backup.wim 1 c:\

C. 設定開機
bcdboot C:\windows /s