Powercli Get-OvfConfiguration部署ova虚拟机
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Powercli Get-OvfConfiguration部署ova虚拟机相关的知识,希望对你有一定的参考价值。
Set the OVF path to a variable: $ovfpath = "Path_to_OVA” Get the OVF configuration: $ovfConfig = Get-OvfConfiguration –Ovf $ovfpath Display the configuration properties of the OVF: $ovfConfig.ToHashTable() | ft –autosize You can see the list of properties that can be assigned values for deployment. Set the appropriate configuration properties for your environment: $ovfConfig.NetworkMapping.Network_1.Value = “Network_1″ $ovfConfig.IpAssignment.IpProtocol.Value = “IPv4″ $ovfConfig.IpAssignment.IpAllocationPolicy.Value = "dhcpPolicy" Once the configuration properties are assigned, deploy the vAPP by running this command: Import-VApp -Source "Path_TO_OVF" -OvfConfiguration $ovfConfig -VMHost "IP_Address" -Name vApp_Name -DiskStorageFormat Thin -Datastore (Get-Datastore -VMHost "IP_Address" -Name ‘Datastore_Name‘) For example: Import-VApp -Source "C:\NewFolder\VMware-vcops-5.8.4.0-2199700-vapp.ovf" -OvfConfiguration $ovfConfig -VMHost "10.1.1.1" -Name vROpsTestvApp -DiskStorageFormat Thin -Datastore (Get-Datastore -VMHost "10.1.1.1" -Name ‘datastore1‘)
$ovfPath = "E:\iso\h5ngcVA-3.27.0.0-7055108_OVF10.ova" $ovfConfig = Get-OvfConfiguration -Ovf $ovfPath $ovfConfig.NetworkMapping.Network_1.Value = "Management Network" $ovfConfig.IpAssignment.IpProtocol.Value = "IPv4" $ovfConfig.IpAssignment.IpAllocationPolicy.Value = "dhcpPolicy" Import-VApp $ovfPath -OvfConfiguration $ovfConfig -VMHost "192.168.1.11" -Name htmlclient -DiskStorageFormat Thin -Datastore vsanDatastore -force
本文出自 “汜水流年_” 博客,请务必保留此出处http://timefiles.blog.51cto.com/8475652/1980299
以上是关于Powercli Get-OvfConfiguration部署ova虚拟机的主要内容,如果未能解决你的问题,请参考以下文章
PowerCLi 管理VMware vCenter 一键批量部署OVA