vmware虚拟机,丢失虚拟机文件

投稿:秋妆斜 优质问答领域创作者 发布时间:2023-10-23 14:45:08
vmware虚拟机,丢失虚拟机文件

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

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

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

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

#!/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 文件如下所示:#!/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"