Welcome

首页 / 软件开发 / .NET编程技术 / VM配置文件所在磁盘空间小于其配给内存时的错误信息

VM配置文件所在磁盘空间小于其配给内存时的错误信息2011-07-24 博客园 张中健前几天在自己工作机(Win2k8 R2)上安装的VS等一些工具,机器的系统盘空间大幅减少到3G以下. 在此 机器上用Hyper-v启动MyVirtualMachine(配给内存为5120M)时,Hyper-v报错误信息: Could not initialize memory: There is not enough space on the disk. 具体如下:

[Window Title]

Virtual Machine Connection

[Main Instruction]

The application encountered an error while attempting to change the state of "MyVirtualMachine".

[Content]

"MyVirtualMachine" failed to start.

Could not initialize memory: There is not enough space on the disk. (0x80070070).

Failed to create memory contents file "C:ProgramDataMicrosoftWindowsHyper-VVirtual MachinesA00AE5F2-48F9-4114-A804-A85289C8541DA00AE5F2-48F9-4114-A804-A85289C8541D.bin" of size 5120 MB.

[Expanded Information]

"MyVirtualMachine" failed to start. (Virtual machine ID A00AE5F2-48F9-4114-A804- A85289C8541D)

"MyVirtualMachine" could not initialize memory: There is not enough space on the disk. (0x80070070). (Virtual machine ID A00AE5F2-48F9-4114-A804-A85289C8541D)

"MyVirtualMachine" failed to create memory contents file "C:ProgramDataMicrosoftWindowsHyper-VVirtual MachinesA00AE5F2-48F9-4114-A804- A85289C8541DA00AE5F2-48F9-4114-A804-A85289C8541D.bin" of size 5120 MB. (Virtual machine ID A00AE5F2-48F9-4114-A804-A85289C8541D)

[^] Hide details [Close]

经分析发现:

MyVirtualMachine配置的文件所在磁盘为系统盘, 其空间小于3G,

此工作机Hyper-V的 Virtual Machines的配置文件所在的文件夹为:%SystemDrive% ProgramDataMicrosoftWindowsHyper-V Virtual Machines. (可由下方式查看:打开Hyper-v Manager,在控制台树面板中,选中当前机器->[Action]->[Hyper-v Setting]->[Server]组- >[Virtual Machines])

在提示信息中Hyper-V将为MyVirtualMachine在其配置文件所在的文件夹下分配5120 MB(配给的内存大 小),此时报错没有足够空间

解决办法:

转移MyVirtualMachine的配置文件到其他的磁盘(本人没有在Hyper-v Manager中发现此功能,是否存在 ?)

修改此工作机上Hyper-V的Virtual Machines的配置文件所在的文件夹,按以前的配置再创建新的VM(操 作成功)

修改此工作机上Hyper-V的Virtual Machines的配置文件所在的文件夹,拷贝VM的配置文件到新的目录 下,然后重新启动Hyper-v服务.(尝试没有成功,Hyper-v Manager没显示拷贝过去的配置文件)

通过简单修改VM的配置文件,指定将要生成bin文件的路径到其他磁盘.(发现没有简单的配置达到此目 的,没有花时间仔细研究)

结论:

VM配置文件所在磁盘空间小于其配给内存大小时,当Hyper-v启动VM时会报如下错误信息:Could not initialize memory: There is not enough space on the disk. 可通过修改此工作机上Hyper-V的 Virtual Machines的配置文件所在的文件夹,按以前的配置再创建新的VM来解决.