二、调整二代虚拟机虚拟机磁盘容量
二代虚拟机虚拟机磁盘容量可以在不关闭虚拟机情况下进行调整,在虚拟机中Windows磁盘管理中看到的未分配空间,都可以直接使用Hyper-V管理器对此磁盘空间进行管理,并且整个过程,不需要重启虚拟机,也不会导致虚拟磁盘数据丢失。
1、不关闭虚拟机情况下直接扩展Windows2012R2磁盘容量:
1)在Hyper-V管理器中,选择虚拟机设置

1) 选择磁盘驱动器

2) 点击编辑

3) 下一步

4) 根据需要选择扩展、压缩、或是收缩

5) 这里选择扩展,输入新磁盘容量

6) 输入新容量

7) 点击完成

8) 选择确定

9) 进入虚拟机中,检查磁盘容量已经变化。

10) 直接选择C盘,扩展卷

11) 下一步

12) 下一步

13) 完成

14) 查看容量已经扩展

2、不关闭虚拟机情况下直接压缩Windows2012R2磁盘容量:
1)打开虚拟机,选择磁盘管理

2)选择压缩

3)选择压缩容量

4)磁盘管理中有多出来未分配的空间

5)打开Hyper-V管理器,选择虚拟机设置

6)选择磁盘

7)编辑

8)下一步

9)选择收缩

10)输入虚拟磁盘容量

11)选择完成

12)点击确认

13)在虚拟机中查看磁盘容量,已经发生变化。
