前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >vmware找不到vmx文件_虚拟机重启后文件丢失

vmware找不到vmx文件_虚拟机重启后文件丢失

作者头像
全栈程序员站长
发布2022-11-15 13:42:14
2K0
发布2022-11-15 13:42:14
举报
文章被收录于专栏:全栈程序员必看

大家好,又见面了,我是你们的朋友全栈君。

在使用Vmware的过程中,不小心删除了vmx文件,导致Vmware无法启动。经过上网搜查资料,找到解决办法。

vmx只是一个对Vmware文件的简单描述性文件,并不包含任何实质性信息,信息主要包含在vmdk和vmxf 文件中。

对于Ubuntu虚拟机,用记事本创建空白文件,在其中输入下面内容并保存为 ubuntu.vmx 即可。(其中加粗的部分是需要修改的内容,包括 vmdk 文件的名称和vmxf名称。如果找不到对应的文件,删除该行。)用vmware打开该文件即可。

另外,请注意Vmware的版本号。

代码语言:javascript
复制
#!/usr/bin/vmware
.encoding = "GBK"
config.version = "8"
virtualHW.version = "11"
vcpu.hotadd = "TRUE"
scsi0.present = "TRUE"
scsi0.virtualDev = "lsilogic"
sata0.present = "TRUE"
memsize = "2048"
mem.hotadd = "TRUE"
scsi0:0.present = "TRUE"
scsi0:0.fileName = "<strong>Ubuntu_14.04_x64.vmdk</strong>"
sata0:0.present = "TRUE"
sata0:0.fileName = "auto detect"
sata0:0.deviceType = "cdrom-raw"
sata0:1.present = "TRUE"
sata0:1.fileName = "auto detect"
sata0:1.deviceType = "cdrom-raw"
ethernet0.present = "TRUE"
ethernet0.connectionType = "nat"
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 = "TRUE"
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 = "<strong>Ubuntu_14.04_x64</strong>"
guestOS = "ubuntu-64"
nvram = "Ubuntu_14.04_x64.nvram"
virtualHW.productCompatibility = "hosted"
powerType.powerOff = "soft"
powerType.powerOn = "soft"
powerType.suspend = "soft"
powerType.reset = "soft"
extendedConfigFile = "<strong>Ubuntu_14.04_x64.vmxf</strong>"
numvcpus = "1"
gui.lastPoweredViewMode = "fullscreen"
uuid.bios = "56 4d 07 87 43 21 53 06-42 fe c9 a3 47 a7 d6 1f"
uuid.location = "56 4d 07 87 43 21 53 06-42 fe c9 a3 47 a7 d6 1f"
replay.supported = "FALSE"
replay.filename = ""
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:a7:d6:1f"
ethernet0.generatedAddressOffset = "0"
vmci0.id = "1832996382"
vmotion.checkpointFBSize = "134217728"
cleanShutdown = "FALSE"
softPowerOff = "FALSE"
usb:1.speed = "2"
usb:1.present = "TRUE"
usb:1.deviceType = "hub"
usb:1.port = "1"
usb:1.parent = "-1"
tools.syncTime = "TRUE"
checkpoint.vmState = ""
sata0:0.autodetect = "TRUE"
sata0:1.autodetect = "TRUE"
tools.remindInstall = "FALSE"
toolsInstallManager.updateCounter = "6"
unity.wasCapable = "FALSE"
sata0:0.startConnected = "TRUE"
isolation.tools.hgfs.disable = "TRUE"
sharedFolder0.present = "TRUE"
sharedFolder0.enabled = "TRUE"
sharedFolder0.readAccess = "TRUE"
sharedFolder0.writeAccess = "TRUE"
sharedFolder0.guestName = "share-files"
sharedFolder0.expiration = "never"
sharedFolder.maxNum = "1"
annotation = "<strong>Window下为了能使用Linux而专门安装的Ubuntu 14.04</strong>"
migrate.hostlog = "./<strong>Ubuntu_14.04_x64-1a8f0660.hlog</strong>"
monitor.phys_bits_used = "42"
sata0:1.startConnected = "FALSE"
svga.autodetect = "FALSE"
svga.maxWidth = "800"
svga.maxHeight = "600"
svga.vramSize = "134217728"
ethernet0.vnet = "/dev/vmnet1"
usb.generic.autoconnect = "FALSE"
serial0.startConnected = "FALSE"
vmotion.checkpointSVGAPrimarySize = "134217728"
serial1.present = "FALSE"
floppy0.present = "FALSE"
usb:0.present = "TRUE"
usb:0.deviceType = "hid"
usb:0.port = "0"
usb:0.parent = "-1"

一个 Windows 8 的虚拟机的vmx 文件如下所示:

代码语言:javascript
复制
#!/usr/bin/vmware
.encoding = "UTF-8"
config.version = "8"
virtualHW.version = "11"
scsi0.present = "TRUE"
scsi0.virtualDev = "lsisas1068"
sata0.present = "TRUE"
memsize = "4096"
mem.hotadd = "TRUE"
scsi0:0.present = "TRUE"
scsi0:0.fileName = "Windows 8 x64.vmdk"
sata0:1.present = "TRUE"
sata0:1.fileName = "auto detect"
sata0:1.deviceType = "cdrom-raw"
ethernet0.present = "TRUE"
ethernet0.connectionType = "nat"
ethernet0.virtualDev = "e1000e"
ethernet0.wakeOnPcktRcv = "FALSE"
ethernet0.addressType = "generated"
usb.present = "TRUE"
ehci.present = "TRUE"
ehci.pciSlotNumber = "34"
usb_xhci.present = "TRUE"
sound.present = "TRUE"
sound.virtualDev = "hdaudio"
sound.fileName = "-1"
sound.autodetect = "TRUE"
mks.enable3d = "TRUE"
svga.graphicsMemoryKB = "1048576"
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"
sensor.accelerometer = "pass-through"
sensor.ambientLight = "pass-through"
sensor.compass = "pass-through"
sensor.gyrometer = "pass-through"
sensor.inclinometer = "pass-through"
sensor.location = "pass-through"
sensor.orientation = "pass-through"
displayName = "Windows 8 x64"
guestOS = "windows8-64"
nvram = "Windows 8 x64.nvram"
virtualHW.productCompatibility = "hosted"
powerType.powerOff = "soft"
powerType.powerOn = "soft"
powerType.suspend = "soft"
powerType.reset = "soft"
extendedConfigFile = "Windows 8 x64.vmxf"
uuid.bios = "56 4d 6e 33 e3 57 6e 8d-e2 f6 08 60 95 0e f1 67"
uuid.location = "56 4d 6e 33 e3 57 6e 8d-e2 f6 08 60 95 0e f1 67"
replay.supported = "FALSE"
replay.filename = ""
migrate.hostlog = "./Windows 8 x64-fd08c667.hlog"
scsi0:0.redo = ""
pciBridge0.pciSlotNumber = "17"
pciBridge4.pciSlotNumber = "21"
pciBridge5.pciSlotNumber = "22"
pciBridge6.pciSlotNumber = "23"
pciBridge7.pciSlotNumber = "24"
scsi0.pciSlotNumber = "160"
usb.pciSlotNumber = "32"
ethernet0.pciSlotNumber = "192"
sound.pciSlotNumber = "33"
usb_xhci.pciSlotNumber = "224"
vmci0.pciSlotNumber = "35"
sata0.pciSlotNumber = "36"
scsi0.sasWWID = "50 05 05 63 e3 57 6e 80"
ethernet0.generatedAddress = "00:0C:29:0E:F1:67"
ethernet0.generatedAddressOffset = "0"
vmci0.id = "-353266240"
vm.genid = "2228495939040755305"
vm.genidX = "-3734463497954494046"
monitor.phys_bits_used = "42"
vmotion.checkpointFBSize = "4194304"
vmotion.checkpointSVGAPrimarySize = "33554432"
cleanShutdown = "TRUE"
softPowerOff = "FALSE"
usb_xhci:6.speed = "2"
usb_xhci:6.present = "TRUE"
usb_xhci:6.deviceType = "hub"
usb_xhci:6.port = "6"
usb_xhci:6.parent = "-1"
usb_xhci:7.speed = "4"
usb_xhci:7.present = "TRUE"
usb_xhci:7.deviceType = "hub"
usb_xhci:7.port = "7"
usb_xhci:7.parent = "-1"
sata0:1.autodetect = "TRUE"
tools.syncTime = "FALSE"
checkpoint.vmState = ""
toolsInstallManager.updateCounter = "3"
svga.guestBackedPrimaryAware = "TRUE"
unity.wasCapable = "FALSE"
tools.remindInstall = "FALSE"
gui.exitOnCLIHLT = "TRUE"
gui.lastPoweredViewMode = "fullscreen"
floppy0.present = "FALSE"
sata0:1.startConnected = "TRUE"
usb_xhci.autoConnect.device0 = ""
usb_xhci:4.present = "TRUE"
usb_xhci:4.deviceType = "hid"
usb_xhci:4.port = "4"
usb_xhci:4.parent = "-1"

再也不怕误删除 vmx 文件咯~

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/234045.html原文链接:https://javaforall.cn

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2022年11月3日 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档