国内最全IT社区平台 联系我们 | 收藏本站
华晨云阿里云优惠2
您当前位置:首页 > 服务器 > VM配置文件所在分区内存太小导致错误的解决方法

VM配置文件所在分区内存太小导致错误的解决方法

来源:程序员人生   发布时间:2014-05-26 11:00:25 阅读次数:2892次
前几天在自己工作机(Win2008 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-VVirtual 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来解决.
生活不易,码农辛苦
如果您觉得本网站对您的学习有所帮助,可以手机扫描二维码进行捐赠
程序员人生
------分隔线----------------------------
分享到:
------分隔线----------------------------
关闭
程序员人生