Wednesday, September 18, 2013

microsoft system center 2012 sp1 – used experience 2 vmm operator

1.run powershell in vmm

start vmm,then click powershell,like this:

image

2.create VMHost

This step can create one "scvmm" instance in bellow result image:

image

2.1 create one account

$Creds = Get-Credential  // here need type your current system account and password
$RunAsAccount = New-SCRunAsAccount -Name "RunAsAcct01" -Credential $Creds



// your can see: New-SCRunAsAccount


2.2 create one vmhome

$RunAsAccount = Get-SCRunAsAccount -Name "RunAsAcct01"
Add-SCVMHost "SCVMM.cloud.com" -Description "This is a new host" -RemoteConnectEnabled $True -RemoteConnectPort 5900 -Credential $RunAsAccount

3. create one vm virtual machine


This step can create one "VM01" instance in bellow result image:


image


3.1 prepare VirtualHardDisk


bellow is drafts,i leave for langch


one


then,code bollow in powershell of vmm console:

$VHD = Get-SCVirtualHardDisk -Name "empty-small.vhd"
$VMTemplate = Get-SCVMTemplate | where {$_.Name -eq "VMTemplate01"}
New-SCVirtualDiskDrive -VMTemplate $VMTemplate -IDE -Bus 1 -Lun 1 -VirtualHardDisk $VHD



3.2 prepare VMTemplate


image


3.3 create one vm Virtual Machine instance


Code bollow in powershell of vmm console:

$VHD = code it in powershell of vmm console:Get-SCVirtualHardDisk -Name "empty-small.vhd"
$VMHost = Get-SCVMHost -ComputerName "SCVMM.cloud.com"
New-SCVirtualMachine -Name "VM01" -VirtualHardDisk $VHD -VMHost $VMHost -Path "D:\virtvm" -RunAsynchronously

No comments: