Chinaunix首页 | 论坛 | 博客
  • 博客访问: 141852
  • 博文数量: 30
  • 博客积分: 30
  • 博客等级: 民兵
  • 技术积分: 310
  • 用 户 组: 普通用户
  • 注册时间: 2009-05-31 15:35
文章分类

全部博文(30)

文章存档

2020年(1)

2019年(10)

2016年(19)

我的朋友

发布时间:2019-11-18 17:00:15

pyVmomi;vcenter;vsphere......【阅读全文】

阅读(2006) | 评论(0) | 转发(0)

发布时间:2019-10-23 16:11:49

通过VSPHERE REST APT可以获取VSPHERE相关信息和执行操作。相关官方文档地址:https://code.vmware.com/apis/191/vsphere-automation花了一天时间研究文档,尝试获取信息,发现有些信息无法获取,比如ESXi的硬件配置信息和使用率信息等,没有这些信息,就无法实现自动创建VM时选择host的规则(如内存使用率最小的HOST),.........【阅读全文】

阅读(4720) | 评论(0) | 转发(0)

发布时间:2019-10-14 08:40:43

sz080365:mwadmin@/powerclidata/data>cat ../bin/esxwwnreport.ps1 function getesxwwn($serverip){$RESULTFILE="/powerclidata/data/ESXHOSTWWNINFO_"+$serverip+"_$(Get-Date -Format 'yyyyMMdd').txt"$INFO=Get-VMHost$Title="vcip esxip esxhn device speed wwn status"$RESULT=Foreach ($esxip in $INFO) {.........【阅读全文】

阅读(5739) | 评论(0) | 转发(0)

发布时间:2019-10-12 19:42:13

PS /powerclidata/data> $wwn 100000109B7DD1BEPS /powerclidata/data> $aa="";$x='';$y='';$count=0;$info|foreach{$count+=1;if($count%2 -eq 1){$x=$_};if($count%2 -eq 0){$y=$_;-join ($x,$y)}} |foreach{$aa=-join($aa,":",$_)};$aa.Substring(1,23)                .........【阅读全文】

阅读(1428) | 评论(0) | 转发(0)

发布时间:2019-10-08 15:41:43

脚本:def showdict(outinfo):for line in outinfo:   print(line+":"+info.get(line, 'NoValue'))showdict(outinfo)输出:#instance_uuid:84f43473-8d26-43b1-b9e8-0b9bc58b5b22#vendor:VMware, Inc.#locale_version:INTL#license_product_name:VMware VirtualCenter Server......【阅读全文】

阅读(1877) | 评论(0) | 转发(0)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册