Linux -- VMware虚拟机配置文件(.vmx)恢复或者修改
在windows下Vmware虚拟机文件出现“无法打开虚拟机…未找到文件”的问题,本文将带你立马解决。。。。
一、问题描述
windows版本:win10 专业版
VMWare版本:VMware® Workstation 12 Pro -12.5.7 build-5813279
虚拟机的版本:ubuntu 16.04 64Bit
在windows下使用的ubuntu虚拟机,但是突然有一天出现了一个比较严重的问题,就是在虚拟机文件**“无法打开虚拟机…未找到文件”**,额,这是什么情况,怎么突然间不行了呢,问题就是这样:
然后到虚拟机的目录下查看文件,果然没有找到 “Ubuntu-64.vmx”,如下这样:
然后,在同级目录下可以看到有一个名为 “found.000” 的文件夹,里面有文件 “file00000000.chk”。
在虚拟机同级是我目录下,有一个日志文件 “vmware-2.log” 显示创建或者修改的日期是 “2020/6/17” :
并且 **“file00000000.chk”**文件,显示创建或者修改的日期是 “2020/6/17” :
那就是说明,在这一天出了事情。。。。。。。
二、解决办法
2.1、当时的紧急解决办法
首先从别的地方拷贝一个后缀为 .vmx (最好是跟目前的虚拟机版本一致,类型一致的,出自同一版本的VMWare的文件)的文件,打开并修改文件内容。
最要紧的一句话其他的可修改可不修改:
scsi0:0.fileName = ""
将自己需要的虚拟机文件的名称复制过去,然后保存退出,重新用VMWare打开一次即可。以下是 .vmx 文件的全部内容,需要修改的地方已做了注释。
.encoding = "GBK"
config.version = "8"
virtualHW.version = "12"
numvcpus = "2"
cpuid.coresPerSocket = "2"
vcpu.hotadd = "TRUE"
scsi0.present = "TRUE"
scsi0.virtualDev = "lsilogic"
sata0.present = "TRUE"
memsize = "4096"
mem.hotadd = "TRUE"
scsi0:0.present = "TRUE"
scsi0:0.fileName = "Ubuntu-64-000001.vmdk" // 最要紧的一句话,打开虚拟机的关键
sata0:1.present = "TRUE"
sata0:1.fileName = "auto detect"
sata0:1.deviceType = "cdrom-raw"
ethernet0.present = "TRUE"
ethernet0.connectionType = "bridged"
ethernet0.virtualDev = "e1000"
ethernet0.wakeOnPcktRcv = "FALSE"
ethernet0.addressType = "generated"
usb.present = "TRUE"
ehci.present = "TRUE"
ehci.pciSlotNumber = "35"
sound.present = "TRUE"
sound.fileName = "-1"
sound.autodetect = "TRUE"
mks.enable3d = "FALSE"
svga.graphicsMemoryKB = "786432"
serial0.present = "TRUE"
serial0.fileType = "thinprint"
pciBridge0.present = "TRUE"
pciBridge4.present = "TRUE"
pciBridge4.virtualDev = "pcieRootPort"
pciBridge4.functions = "8"
pciBridge5.present = "TRUE"
pciBridge5.virtualDev = "pcieRootPort"
pciBridge5.functions = "8"
pciBridge6.present = "TRUE"
pciBridge6.virtualDev = "pcieRootPort"
pciBridge6.functions = "8"
pciBridge7.present = "TRUE"
pciBridge7.virtualDev = "pcieRootPort"
pciBridge7.functions = "8"
vmci0.present = "TRUE"
hpet0.present = "TRUE"
usb.vbluetooth.startConnected = "TRUE"
displayName = "Songshuai Ubuntu" // 在 VMWare 上显示的名称,自己喜欢的就行
guestOS = "ubuntu-64" // VMVare里的的系统,修改一样的就行了
nvram = "Ubuntu-64.nvram" // 修改成一样的
virtualHW.productCompatibility = "hosted"
powerType.powerOff = "soft"
powerType.powerOn = "soft"
powerType.suspend = "soft"
powerType.reset = "soft"
extendedConfigFile = "Ubuntu-64.vmxf" // 修改
uuid.bios = "56 4d 6d 1a 93 c1 d2 00-70 99 5d 18 98 b4 af 60"
uuid.location = "56 4d 6d 1a 93 c1 d2 00-70 99 5d 18 98 b4 af 60"
migrate.hostlog = ".\Ubuntu-64-6f355728.hlog"
scsi0:0.redo = ""
pciBridge0.pciSlotNumber = "17"
pciBridge4.pciSlotNumber = "21"
pciBridge5.pciSlotNumber = "22"
pciBridge6.pciSlotNumber = "23"
pciBridge7.pciSlotNumber = "24"
scsi0.pciSlotNumber = "16"
usb.pciSlotNumber = "32"
ethernet0.pciSlotNumber = "33"
sound.pciSlotNumber = "34"
vmci0.pciSlotNumber = "36"
sata0.pciSlotNumber = "37"
ethernet0.generatedAddress = "00:0C:29:B4:AF:60"
ethernet0.generatedAddressOffset = "0"
vmci0.id = "-1732989088"
monitor.phys_bits_used = "42"
vmotion.checkpointFBSize = "4194304"
vmotion.checkpointSVGAPrimarySize = "33554432"
cleanShutdown = "TRUE"
softPowerOff = "TRUE"
usb:1.speed = "2"
usb:1.present = "TRUE"
usb:1.deviceType = "hub"
usb:1.port = "1"
usb:1.parent = "-1"
svga.guestBackedPrimaryAware = "TRUE"
tools.syncTime = "FALSE"
sata0:1.autodetect = "true"
ethernet0.linkStatePropagation.enable = "true"
annotation = "" // VMWare中显示的描述,可以随便写,如果是为了恢复的,可以在vmware.log中找到
usb:0.present = "TRUE"
usb:0.deviceType = "hid"
usb:0.port = "0"
usb:0.parent = "-1"
sata0:1.startConnected = "FALSE"
floppy0.present = "FALSE"
2.2、通过wmvare.log文件
当然还可以借助 “vmware.log” 文件进行 .vmx 文件的修正,具体内容自己查看即可。与 .vmx 文件中的内容一致的。
至此,应该可以完美打开了,如果在荡开的过程提示下面这样的错误:
或者提示 “字典错误” 等,均是 .vmx 文件的编码不正确导致的,请记住 .vmx 文件的编码要求是:GBK 或者 ANSI,都是一个意思。
更多推荐
所有评论(0)