Tong Quan Hyper

  • Published on
    06-Nov-2015

  • View
    213

  • Download
    1

Embed Size (px)

DESCRIPTION

Hng dn o ha my ch

Transcript

<p>TNG QUAN HYPER-V TRN WINDOWS SERVER 2012 Category: WINDOWS SERVER Written by ng Phng Nam I- GII THIU:Khi trin khai mi trng h thng mng cho doanh nghip, doanh nghip cn s dng bao nhiu dch v th bn phi ci by nhiu Server vt l tng ng. Ti sao khng ci chung tt c cc dch v vo cng Server?a. Khi ci cc dch v vo cng Server th bn phi m cc port tng ng vi cc dch v . Do , h thng mng doanh nghip s km bo mt.b. Khi c s c xy ra, bn rt kh tm nguyn nhn dch v no b li. iu ny s lm nh hng n hot ng ca doanh nghip.Tuy nhin, xu hng doanh nghip hin nay chuyn hng sang cng ngh in ton m my. Doanh nghip cn bao nhiu dch v th s ci by nhiu my o.Li ch ca my o: - Tit kim c chi ph ca doanh nghip - Qun l linh hot, d dng di chuyn my o t my ny sang my khc - Backup v restore my o mt cch d dngNhu cu t ra, IT lm ch mi trng o haHin nay, c 2 hng chuyn v o ha:1. VMWare: Bao gm VMWare Workstation (dng hc v nghin cu), VMWare ESX (s dng thc t, c bn quyn)2. Microsoft: Microsoft Virtual PC (dng hc v nghin cu), Hyper V (s dng thc t , min ph, i km t Windows Server 2008), Virtual Machine Manager (SCVMM).II CC BC TRIN KHAI:1- Ci t Hyper-V2- Kho st Hyper-V a. To Switch o (Virtual Switch) b. To a cng o (Virtual Hard Disk) c. Xem thng tin a cng o (Inspect Disk) d. Chnh sa a cng o e. To my o (Virtual Machine) f. To Diffrerencing Disk g. To Snapshot (Backup trng thi my o) h. Khi phc Snapshot (Restore my o)III- TRIN KHAI CHI TIT:1- Ci t Hyper-V- M Server Manager, bn ch khung bn tri: + Dashboard: Hin th thng tin tng qut v server. + Local Server: Thng tin v Server bn ang s dng: tn my, IP ca my, Events, Computer Name, Network Card + All Servers: Tng t nh Local Server, dng qun l tt c cc Server. + File and Storage Services: Thng tin v dch v Files v dch v lu tr trn Server.</p> <p>- Trn Server Manager, vo menu Manage,chn Add Roles and Features.</p> <p>- Mn hnh Before You Begin, nhn Next.</p> <p>- Mn hnh Installation Type, chn Role-based or feature-based installation, sau bn nhn Next.</p> <p>- Mn hnh Server Selection, bn chn Select a server from the server pool, sau bn nhn Next.</p> <p>- Mn hnh Server Roles, bn nh du chn vo Hyper-V.</p> <p>- Chng trnh s yu cu bn ci t thm mt s Features phc v cho Role ny, bn nhn vo nt Add Features.</p> <p>Bn cn phn bit khi nim gia Roles v Features nh sau:* Roles: phc v cho ton h thng . V d : Active Directory, Web Server. Khi ci Roles th n s cn thm nhng Features h tr.* Features: ch h tr chc nng trn my ca mnh.- Mn hnh Create Virtual Switches, bn nhn Next. Cc bc cn li, bn nhn Next theo mc nh.</p> <p>- Mn hnh Confirm Installation Selections, bn nh du chn vo Restart the destination server automatically if required. Do mt s Roles i hi phi khi ng li my sau khi ci t nn tt nht khi ci bt k Roles no, bn cng nn nh du chn vo ny.</p> <p>- Hp thoi Add Roles and Features Wizard, bn chn Yes ng iu khon t ng khi ng li my tnh m khng cn thng bo.</p> <p>- Qu trnh ci t s din ra. Sau khi ci xong, bn kim tra s thy Role Hyper-V.</p> <p>2- Kho st Hyper -V- My c ci t Hyper-V gi l Host Hyper V.- Virtual Switch ca Hyper-V gi l Switch o, bn thn my Host c th m nhn vai tr Switch o.a. To Switch o (Virtual Switch):- M Hyper-V Manager, khung Actions nm gc phi, bn nhn vo mc Virtual Switch Manager.</p> <p>C 3 loi virtual switch, bao gm: Private Switch, Internal Switch v External Switch.+ Private Virtual Switch: ch c kh nng kt ni cc my o trong cng 1 Host li. Khi dng my o, chng trnh s t ng hi bn s dng Switch no. Private Switch khng dng trn thc t c, p dng trong mi trng lab (thc hnh), c lp mng my o vi h thng mng bn ngoi.+ Internal Virtual Switch: ging vi Private l cc my o khng kt ni bn ngoi c. Tuy nhin nu chn Internal th cc my o c th lin lc c vi my tht (my Host). Khi ci t Internal Virtual Switch, bn kim tra trn my Host s thy c thm card mng mi l vEthernet (Internal Network). Dng ny c th p dng trn thc t.</p> <p>- External Virtual Switch: c s dng nhiu nht. L loi virtual switch m c th c map vo card mng vt l (xi chung vi switch tht). Khi to External, card mng s khng th t IP c na, bn phi t IP Connection mi to l vEthernet (External Network).</p> <p>Bn c th to rt nhiu Private v Internal Virtual Switch. Cn External s ph thuc vo card mng tht gn trn my Server ca bn.- to Switch o, bn nhn vo Create Virtual Switch.</p> <p>- mc Connection type, bn chn dng Virtual Switch m bn mun to, sau mc Name, bn t tn cho Switch ca mnh. VD: Private Network. Tng t bn to thm Internal Network v External Network.</p> <p>b. To a cng o (Virtual Hard Disk)a cng o (Virtual Hard Disk): l file c ui *.vhd (trn Windows Server 2008) hoc *.vhdx (ch c trn Windows Server 2012). Nu bn chy *.vhdx th my o ch chy trn host (my tht) Windows Server 2012. cng o trn Windows Server 2012 c nhng u im ring nh sau:+ *.vhdx h tr dung lng cng ti a 64TB trong khi *.vhd ch h tr dung lng cng ti a 2TB.+ Ngoi ra, *.vhdx h tr chu li tt hn khi c s c mt in (lu theo dng block).- to cng o, bn to folder C:\VM, sau ln lt to thm cc th mc VM1, VM2, VM3 trong C:\VM</p> <p>- Quay li Hyper-V Manager, bn nhn chut phi ln tn my tnh. Sau chn v chn Hard Disk</p> <p>- Mn hnh Choose Disk Format, bn chn nh dng cho cng ca mnh.</p> <p>- Mn hnh Choose Disk Type, bn la chn kiu a cng o.</p> <p>V d: Bn c dung lng a cng ti a 100 GBFixed SizeDynamically expandingDifferencing</p> <p> nghaKhi to ra a cng, file ny lun l 100 GB, c nh v khng thay i, bn cha xi cng mt 100GB. Nu xi ht 100 GB th s khng xi c na.Khi to a cng, file ny ch c khong my chc KBs. Khi ci t d liu th dung lng s tng. Nu vt 100 GB th s khng xi c na.Ch dng lu cc s thay i trn my o. Tuy nhin n khng th chy c lp, n ph thuc vo 1 a khc gi l Parent (hay Base).</p> <p>u im- Cho hiu nng nhanh hn- T ch c dung lng trn my host.Bn xi bao nhiu th dung lng tn by nhiu. S dng cho nhiu my, tit kim dung lng.</p> <p>- Quay li mn hnh Choose Disk Type, bn chn Dynamically expanding.- Mn hnh Specify Name and Location, mc Name, bn t tn cho cng ca mnh, vd: Base2012.vhd. Tip theo mc Location, bn nhn vo nt Browse, sau bn tr ng dn n ni cn lu a cng o ca mnh, y bn lu vo th mc C:\VM\.</p> <p>- Mn hnh Configure Disk, bn chn Create a new blank virtual hard disk. mc Size, bn thit lp dung lng cho a cng o ca mnh.</p> <p>- Mn hnh Completing the New Virtual Hard Disk Wizard, bn kim tra li thng tin v a cng o ca mnh, sau nhn Finish.</p> <p>c. Xem thng tin a cng o (Inspect Disk)- Sau khi to xong, xem thng tin a cng o, trong ca s Hyper-V Manager, khung Action nm gc phi, bn nhn vo mc Inspect Disk.</p> <p>- Tip theo bn tr ng dn n a cng o m bn mun xem thng tin. Chng trnh s hin th thng tin chi tit v a nh+ Format: nh dng a cng o: vhd hay vhdx+ Type: Loi a cng o: Dynamically expanding, Differencing hay Fixed Size+ Location: Ni cha a cng o+ Current File Size: Kch thc dung lng a hin ti+ Maximum Disk Size: Dung lng ti a ca a</p> <p>d. Chnh sa a cng o- chnh sa a cng o, trong ca s Hyper-V Manager, khung Action nm gc phi, bn nhn vo mc Inspect Disk.</p> <p>- Mn hnh Locate Virtual Hard Disk, mc Location, bn nhn nt Browse v tr ng dn n a cng o m bn mun chnh sa, sau nhn Next.</p> <p>- Mn hnh Choose Action, bn la chn hnh ng dnh cho a cng ca mnh.</p> <p>+ Compact: Tng vng trng cn li trn a, khng thay i dung lng ti a. VD: a ti a 127 GB, dng 100 GB, nh vy vng trng ca bn cn 27GB. Chc nng Compact l n s sp xp a (defragment disk) vng dng (100 GB) tng dung lng cho vng trng (27 GB). y c gi l chc nng chng phn mnh trn a cng o.+ Convert: chuyn i qua li gia nh dng vhd v vhdx. Chng trnh s to ra 1 file mi vi nh dng m bn mun chuyn i (khng xa file c).+ Expand: Ni rng dung lng ti a ca a cng o. e/ To my o (Virtual Machine)Chun b: file ISO ci t Windows Server 2012- Chut phi ln host, bn chn New, sau chn Virtual Machine</p> <p>- Mn hnh Specify Name and Location, mc Name, bn t tn cho my o ca mnh: Windows Server 2012-1. Tip theo bn nh du chn vo Store the virtual machine in a different location, sau bn nhn nt Browse v tr ng dn n th mc cn lu my o.</p> <p>- Mn hnh Assign Memory, mc Startup memory, bn thit lp RAM cho my o (ph thuc vo RAM ca my tht). Ngoi ra, bn c th quy nh RAM c thit lp trong khong no bng cch nh du chn vo Use Dynamic Memory for this virtual machine.</p> <p>- Mn hnh Configure Networking, mc Connection, bn chn Virtual Switch m bn to, trong bi lab ny bn chn External Network.</p> <p>- Mn hnh Connect Virtual Hard Disk, bn chn Use and existing virtual hard disk, bn nhn nt Browse v tr ng dn n a cng o m chng ta to trn.</p> <p>- Cui cng sau khi to xong, bn nhn nt Finish.- Bc tip theo, chng ta s g CD/DVD vo my o. Chut phi ln my o va to, chn Settings.</p> <p>- ct bn tri, bn chn DVD. Sau khung bn phi, bn chn Image File v tr ng dn n file ISO ci t Windows Server 2012. Cui cng bn nhn Apply v OK.</p> <p>- n y bn to xong my o. Bn nhn chut phi vo my o va to, chn Start, sau nhn double click vo my o v bt u ci Windows Server 2012 (ci phin bn Windows DataCenter 2012 with GUI)</p> <p>* Mt s phm tt trn my o- Ctrl + Alt + End ( thay th Ctrl + Alt + Delete)- Ctrl+ Alt + Pause (Break) (Phng to ton mn hnh)- Shutdown my o, bn nhn chut phi vo my o, chn Shutdown.</p> <p>- Quan st s thy ct State my o l Off ngha l qu trnh tt my thnh cng.</p> <p>f. To Diffrerencing DiskGi s bn c 3 my o VM1, VM2 v VM3. Bn ci Windows Server 2012 trn my o VM1. Sp yu cu my o VM2 v my o VM3 cng phi c ci Windows Server 2012.</p> <p>Nu copy cng my o th hi tn cng v tn dung lng. Vy c cch no dng 1 a cng m c th s dng chung cho c 3 my khng? Thc t th 1 a cng khng th gn vo 3 my c, cho nn chng ta cn s dng Differencing Disk dng lu cc s thay i trn my o.3 my o: VM1, VM2, VM3, to ra 3 cng o loi Differencing, sau cu vo a Base. Nh vy khi my no c s thay i th a cng cng c lu tr. Nhc im ca Differencing Disk l nu a Base cht th ton b a cng trn cc my o s cht.- Quay li Hyper-V Manager, chut phi ln Host, chn New, sau chn Hard Disk.- Mn hnh Choose Disk Format, bn chn nh dng a cng o l VHD.</p> <p>- Mn hnh Choose Disk Type, bn chn loi a cng l Differencing.</p> <p>- Mn hnh Specify Name and Location, mc Name bn t tn cho a cng o ca mnh: Disk1.vhd. Tip theo mc Location, bn nhn vo nt Browse v tr ng dn n th mc lu cng ca mnh, trong bi lab ny, bn lu vo a ch: C:\VM\VM1.</p> <p>- Mn hnh Configure Disk, lc ny bn nhn nt Browse v tr ng dn n a Parent (hay cn gi l a Base)</p> <p>- Mn hnh Summary, bn kim tra li thng tin v nhn nt Finish.</p> <p>- Bc tip theo, chng ta s g b a cng o trn my VM1 ra v gn a cng o Disk1.vhd va mi to vo. Bn nhn chut phi vo my o, chn Settings.- ct bn tri, bn tm n mc Hard Drive. Sau bn nhn sang khung bn phi, mc Virtual hard disk, bn nhn nt Browse v tr ng dn n a cng o Disk1.vhd m bn va mi to. Cui cng, bn nhn nt Apply v OK.</p> <p>- Bn nhn chut phi vo my o, chn Start. Kim tra thy my o khi ng Windows thnh cng.</p> <p>- Tt my o, bn dng tnh nng Inspect Disk, ghi ch li dung lng ca a Base v a cng o ca my o 1Disk 1: 332 KBDisk Base: 8,409,356 GB- Khi ng my o, chp dung lng bt k vo. Sau kim tra li dung lng ca a o (Disk 1) s thy tng ln, a Base ko thay i (Cu trc ca Differencing).Disk 1: 285,496 KBDisk Base: 8,409,356 GB- Tng t bn hy to thm Disk2.vhd v Disk3.vhd (Dng a Differencing) cng gn vo 1 a Base duy nht. To 2 my o VM2 v VM3, my o s s dng a tng ng. Khi ng c 3 my cng lc. Nh vy chng minh c 1 a base xi c cho nhiu differencing.Lu : Khng thay i kch thc a Base khi s dng Differencing.g/ To Snapshot (Backup trng thi my o):Snapshot my o: Tr my o v tnh trng nh lc ban u- Chut phi vo my o m bn mun Backup, chn Snapshot.</p> <p>- Bn s nhn thy Snapshot va to khung Snapshot. Bn c th to nhiu Snapshot. Mun i tn Snapshot, bn nhn chut phi vo Snapshot, chn Rename thay i tn</p> <p>h/ Khi phc Snapshot (Restore my o)- Cch 1: Chut phi vo my o, chn Revert. My o tr v trng thi trc 1 snapshot.- Cch 2: Chut phi vo Snapshot cn khi phc, chn Apply. My o s c tr li ti thi im lc bn snapshot</p> <p>Cm n cc bn xem bi vit!</p> <p>http://www.mcthub.com/index.php/technologies/microsoft/windows-server/156-t-ng-quan-hyper-v-tren-windows-server-2012</p>