如何从虚拟机获取信息? [英] How to get information from virtual Machine?

查看:200
本文介绍了如何从虚拟机获取信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何获取有关给定虚拟机的文件系统和磁盘大小的信息?

我使用的是VMware工作站和C#..

How to get information about the file system and disk size at a given virtual machine?
I used VMware workstation and C#..

推荐答案

像我想象的那样:



Something like this I'd imagine:

System.IO.DriveInfo[] drives = System.IO.DriveInfo.GetDrives();
foreach (DriveInfo drive in drives)
{
    if (drive.IsReady) Console.WriteLine(drive.TotalSize);
}


这篇关于如何从虚拟机获取信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆