• [PowerCLI]命令行管理ESXi-2.查看ESXi虚拟机


    1. 查看虚拟机列表

    PS /root> Get-VM
    
    Name                 PowerState Num CPUs MemoryGB
    ----                 ---------- -------- --------
    mysql数据库测试      PoweredOn  8        32.000
    中间件测试服务器     PoweredOn  8        16.000
    test01               PoweredOn  2        4.000
    VMware vCenter Serv… PoweredOn  4        16.000
    平台测试             PoweredOn  32       128.000
    

    2. 查看宿主机列表

    PS /root> $vm = Get-VM -Name test01
    PS /root> $vm.VMHost
    
    Name                 ConnectionState PowerState NumCpu CpuUsageMhz CpuTotalMhz   MemoryUsageGB   MemoryTotalGB Version
    ----                 --------------- ---------- ------ ----------- -----------   -------------   ------------- -------
    172.15.7.131         Connected       PoweredOn      24        1072       50280         119.252         127.543   6.5.0
    
    PS /root> $vmHosts=Get-VMHost
    PS /root> $vmHosts
    
    Name                 ConnectionState PowerState NumCpu CpuUsageMhz CpuTotalMhz   MemoryUsageGB   MemoryTotalGB Version
    ----                 --------------- ---------- ------ ----------- -----------   -------------   ------------- -------
    172.15.7.131         Connected       PoweredOn      24        1072       50280         119.252         127.543   6.5.0
    172.15.7.132         Connected       PoweredOn      24        5541       50280         106.914         127.543   6.5.0
    172.15.7.133         Connected       PoweredOn      24        1035       50280          19.159         127.543   6.5.0
    

    3. 根据虚拟机名称查看详细信息

    1. 查看宿主机信息
    
    PS /root> $vm = Get-VM -Name test01
    PS /root> $vm.VMHost               
    
    Name                 ConnectionState PowerState NumCpu CpuUsageMhz CpuTotalMhz   MemoryUsageGB   MemoryTotalGB Version
    ----                 --------------- ---------- ------ ----------- -----------   -------------   ------------- -------
    172.15.7.131         Connected       PoweredOn      24        1260       50280         119.265         127.543   6.5.0
    
  • 相关阅读:
    poj 2104 C
    2015 百度之星初赛 1 2 2015ACM/ICPC亚洲区上海站 codeforces 851
    3.10补
    3.9补
    3.8补
    3.6补
    3.5补
    3.4补
    3.3补
    2.35补
  • 原文地址:https://www.cnblogs.com/leoshi/p/15136886.html
Copyright © 2020-2023  润新知