VMware Fusion 启动物理磁盘及U盘的方法

OSX下vmware fusion 跟windows下vmware workstation 差不多,都是利用vm工具生成一个物理硬盘/USB的vmdk映射文件,然后加载这个vmdk启动即可.

首先查看磁盘

bash-3.2$ diskutil  list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.3 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:          Apple_CoreStorage                         499.4 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                  Apple_HFS Macintosh HD           *499.1 GB   disk1
                                 Logical Volume on disk0s2
                                 10883316-E3DC-41E3-80B9-193C97F65019
                                 Unencrypted
/dev/disk2
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *842.6 MB   disk2
   1:                  Apple_HFS VMware Fusion           842.5 MB   disk2s1
/dev/disk3
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *880.0 MB   disk3
   1:                  Apple_HFS VMware Fusion           880.0 MB   disk3s1
/dev/disk4
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *16.0 GB    disk4
   1:                      Linux                         16.0 GB    disk4s1

这里使用的是 /dev/disk4 16G U盘.

创建vmdk映射文件, 这里采用的是ide模式

/Applications/VMware\ Fusion.app/Contents/Library/vmware-rawdiskCreator  create /dev/disk4 fullDevice usb-hdd ide

将会在当前目录下生成一个usb-hdd.vmdk.

重新创建一个新的VM,删除掉所有硬盘及CDROM,将usb-hdd.vmdk移动到当前VM目录,然后手动修改 vmx 配置文件,加入以下两行

ide1:0.present="TRUE"
ide1:0.fileName="usb-hdd.vmdk"

重新启动VM即可从U盘启动.

以下是我的VM 配置.

.encoding = "UTF-8"
config.version = "8"
virtualHW.version = "11"
scsi0.present = "TRUE"
scsi0.virtualDev = "lsilogic"
sata0.present = "TRUE"
memsize = "1024"
ethernet0.present = "TRUE"
ethernet0.connectionType = "nat"
ethernet0.wakeOnPcktRcv = "FALSE"
ethernet0.addressType = "generated"
ethernet0.linkStatePropagation.enable = "TRUE"
usb.present = "TRUE"
ehci.present = "TRUE"
ehci.pciSlotNumber = "35"
sound.present = "TRUE"
sound.fileName = "-1"
sound.autodetect = "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"
tools.syncTime = "TRUE"
displayName = "USB"
guestOS = "rhel5"
nvram = "USB.nvram"
virtualHW.productCompatibility = "hosted"
tools.upgrade.policy = "upgradeAtPowerCycle"
powerType.powerOff = "soft"
powerType.powerOn = "soft"
powerType.suspend = "soft"
powerType.reset = "soft"
extendedConfigFile = "USB.vmxf"
sata0:1.present = "FALSE"
scsi0:0.present = "FALSE"
floppy0.present = "FALSE"
ide1:0.present="TRUE"
ide1:0.fileName="usb-hdd.vmdk"
uuid.bios = "56 4d e9 81 a9 3c 22 1a-58 50 5e 72 84 2a 4d ec"
uuid.location = "56 4d e9 81 a9 3c 22 1a-58 50 5e 72 84 2a 4d ec"
replay.supported = "FALSE"
replay.filename = ""
migrate.hostlog = "./USB-35f5ba49.hlog"
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"
ide1:0.redo = ""
ethernet0.generatedAddress = "00:0c:29:2a:4d:ec"
ethernet0.generatedAddressOffset = "0"
vmci0.id = "-2077602324"
monitor.phys_bits_used = "42"
vmotion.checkpointFBSize = "67108864"
vmotion.checkpointSVGAPrimarySize = "67108864"
cleanShutdown = "TRUE"
softPowerOff = "TRUE"
usb:0.present = "TRUE"
usb:0.deviceType = "hid"
usb:0.port = "0"
usb:0.parent = "-1"
usb:1.speed = "2"
usb:1.present = "TRUE"
usb:1.deviceType = "hub"
usb:1.port = "1"
usb:1.parent = "-1"
ehci:0.present = "TRUE"
ehci:0.deviceType = "video"
ehci:0.port = "0"
ehci:0.parent = "-1"





你可能感兴趣的:(VMware Fusion 启动物理磁盘及U盘的方法)