导出虚拟机的OVF 模板

 链接:https://pan.baidu.com/s/1zs_98ahjnEkHREsxrsK6Og
提取码:d8wg

###查看未注册的信息
Get-ExecutionPolicy -List

        Scope ExecutionPolicy
        ----- ---------------
MachinePolicy       Undefined
   UserPolicy       Undefined
      Process       Undefined
  CurrentUser       Undefined
 LocalMachine    Unrestricted
 
##注册本地机器
Set-ExecutionPolicy RemoteSigned

##连接vcenter
Connect-VIServer -Server 10.100.201.15 -username "administrator@vsphere.local"-Password "Huayun@123"

##导出末班ovf vm须关机
Export-VM -VM "DCM" -Destination "D:\ova" -Format Ova

###事例
          Welcome to VMware PowerCLI!



PowerCLI C:\> Set-ExecutionPolicy remotesigned

执行策略更改

[Y] 是(Y)  [A] 全是(A)  [N] 否(N)  [L] 全否(L)  [S] 暂停(S)  [?] 帮助 (默认值为“N”): Y
PowerCLI C:\>
PowerCLI C:\>
PowerCLI C:\> Get-ExecutionPolicy -List

        Scope ExecutionPolicy
        ----- ---------------
MachinePolicy       Undefined
   UserPolicy       Undefined
      Process       Undefined
  CurrentUser       Undefined
 LocalMachine    RemoteSigned


PowerCLI C:\> Connect-VIServer -Server 10.100.201.15 -username "administrator@vsphere.local"-Password "Huayun@123"
警告: There were one or more problems with the server certificate for the server 10.100.201.15:443:

* The X509 chain is invalid due to an invalid certificate signature.

Certificate: [Subject]
  C=US, CN=10.100.201.15

[Issuer]
  OU=VMware Engineering, O=photon-machine, S=California, C=US, DC=local, DC=vsphere, CN=CA

[Serial Number]
  00D962E1E524C646F3

[Not Before]
  2019/8/19 16:30:48

[Not After]
  2029/8/13 16:29:42

[Thumbprint]
  5886CD1DE7BB1185F872CC92332FA33A04850575


The server certificate is not valid.




Name                           Port  User
----                           ----  ----
10.100.201.15                  443   VSPHERE.LOCAL\Administrator



PowerCLI C:\> get-vm

Name                 PowerState Num CPUs MemoryGB
----                 ---------- -------- --------
ibms                 PoweredOn  4        8.000
zhaopei-win10        PoweredOn  4        12.000
DCM                  PoweredOff 4        8.000
exsi                 PoweredOn  4        12.000
yangxiaoliang2-请... PoweredOn  4        16.000
10.100.201.162-sh... PoweredOn  2        2.000
yangxiaoliang5-请... PoweredOn  4        16.000
yangxiaoliang4-请... PoweredOn  4        16.000
han_10.100.201.19... PoweredOn  4        48.000
zhaopei-图形化虚拟机 PoweredOn  8        16.000
10.100.201.161-sh... PoweredOn  2        2.000
hammerdb_windows     PoweredOff 8        16.000
yangxiaoliang1-请... PoweredOn  4        16.000
zhaopei-k8s03        PoweredOff 2        4.000
windows              PoweredOff 8        16.000
10.100.201.x-temp    PoweredOff 2        2.000
windows10            PoweredOff 4        8.000
windows7-shixingwen  PoweredOn  8        8.000
yangxiaoliang-模...  PoweredOff 4        8.000
zhaopei-k8s02        PoweredOff 2        4.000
win7.sxf.test        PoweredOff 8        16.000
yangxiaoliang6-请... PoweredOn  4        16.000
zhaopei-k8s01        PoweredOff 2        4.000
VMware vCenter Se... PoweredOn  2        10.000
yangxiaoliang请勿... PoweredOn  4        16.000
yangxiaoliang3-请... PoweredOn  4        16.000
zhaopei-ansible      PoweredOn  2        4.000

zhaopei-node03       PoweredOn  4        8.000
zhaopei-compute03    PoweredOn  2        4.000
zhaopei-compute01    PoweredOn  2        4.000
ddtools              PoweredOff 2        2.000
zhaopei-node02       PoweredOn  4        8.000
zhaopei-node01       PoweredOn  4        8.000
Haigang-Prometheus   PoweredOn  2        4.000
han-10.100.214.195   PoweredOn  4        8.000
fio-tools            PoweredOn  2        2.000

han-10.100.214.192   PoweredOff 2        4.000


han-10.100.214.191   PoweredOff 2        4.000
zhaopei-computer02   PoweredOn  2        4.000



PowerCLI C:\> start-vm ddtools

Name                 PowerState Num CPUs MemoryGB
----                 ---------- -------- --------
ddtools              PoweredOn  2        2.000


PowerCLI C:\> stop-vm ddtools

确认

[Y] 是(Y)  [A] 全是(A)  [N] 否(N)  [L] 全否(L)  [S] 暂停(S)  [?] 帮助 (默认值为“Y”): Y

Name                 PowerState Num CPUs MemoryGB
----                 ---------- -------- --------
ddtools              PoweredOff 2        2.000




 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

石兴稳

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值