首页 > 代码库 > esxi 汇总

esxi 汇总

#add host

New-vm -Name frmtempplate-192.168.0.1 -VM temp -VMHost 192.168.0.2 -Datastore 0.2

$myServer = Connect-VIServer -Server 192.168.0.1

#datacentor

Add-VMHost -Server $myServer -Name 192.168.0.2 -Location Infrastructure_lg -User root -Password 123 -Force

#portgroup

$vswitch =  Get-VirtualSwitch -VMHost 192.168.60.32 -Name vSwitch0

New-VirtualPortGroup -VirtualSwitch $vswitch  -Name "Vm Network vlan 1020" -Vlanid 1020

#start vm

start-vm -vm 192.168.20.124


本文出自 “让我men共同成长” 博客,请务必保留此出处http://wujingfeng.blog.51cto.com/5725921/1916004

esxi 汇总