2018-04-25 檢查 vm程序如下: (找 vmx) [root@localhost ~]# ps -ef | grep vmware root 1574 1 25 10:47 ? 00:00:54 /usr/lib/vmware/bin/vmware-vmx -s vmx.noUIBuildNumberCheck=TRUE -# product=4;name=VMware Player;version=14.0.0;buildnumber=6661328;licensename=VMware Player;licenseversion=14.0; -@ duplex=3;msgs=ui /root/vmware/ICQos-v1.0/ICQos-v1.0.vmx root 1576 1 0 10:47 ? 00:00:00 /usr/lib/vmware/bin/vmware-vmblock-fuse -o subtype=vmware-vmblock,default_permissions,allow_other /var/run/vmblock-fuse root 1787 1 0 10:47 ? 00:00:00 /usr/bin/vmnet-dhcpd -s 6 -cf /etc/vmware/vmnet1/dhcpd/dhcpd.conf -lf /etc/vmware/vmnet1/dhcpd/dhcpd.leases -pf /var/run/vmnet-dhcpd-vmnet1.pid vmnet1 root 1790 1 0 10:47 ? 00:00:00 /usr/bin/vmnet-natd -s 6 -m /etc/vmware/vmnet8/nat.mac -c /etc/vmware/vmnet8/nat/nat.conf root 1846 1 0 10:47 ? 00:00:00 /usr/bin/vmnet-dhcpd -s 6 -cf /etc/vmware/vmnet8/dhcpd/dhcpd.conf -lf /etc/vmware/vmnet8/dhcpd/dhcpd.leases -pf /var/run/vmnet-dhcpd-vmnet8.pid vmnet8 root 1860 1 0 10:47 ? 00:00:00 /usr/sbin/vmware-authdlauncher root 1869 1 0 10:47 ? 00:00:00 /usr/bin/vmware-usbarbitrator root 2269 2144 0 10:51 pts/0 00:00:00 grep --color=auto vmware ---------- 2018-04-19 VMWare Workstation start on boot CentOS ref: https://itekblog.com/vmware-workstation-start-on-boot-centos/ If you are like me, using VMWare workstation on Linux (CentOS 6.4), and you want to start your virtual machines on boot, I have the answer. Prerequisities CentOS 6.x. – although the vmrun command may be working in other distributions too. VMWare Workstation 4.0+ The Solution Edit rc.local add to the end of the following file: /etc/rc.d/rc.local the following: vmrun -T ws start /path/to/machine.vmx nogui vmrun -T ws start /root/vmware/ICQos-v1.0/ICQos-v1.0.vmx nogui vmrun -T player start /root/vmware/ICQos-v1.0/ICQos-v1.0.vmx nogui /usr/bin/vmrun -T player start /root/vmware/ICQos-v1.0/ICQos-v1.0.vmx nogui 20180419: 以上自動啟動失效! 但是以root輸入最後兩個指令卻可以啟動VM....? 應該是rc.local的權限沒有執行權限: #chmod +x /etc/rc.d/rc.local 確認ok! /etc/rc.d/rc.local內容參考如下: #!/bin/bash # THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES # # It is highly advisable to create own systemd services or udev rules # to run scripts during boot instead of using this file. # # In contrast to previous versions due to parallel execution during boot # this script will NOT be run after all other services. # # Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure # that this script will be executed during boot. touch /var/lock/subsys/local /usr/bin/vmrun -T player start /root/vmware/ICQos-v1.0/ICQos-v1.0.vmx nogui 2018-04-25, 以上自動啟動程序測試確認OK. create new line for each machine you want to start on boot. ref screen: VMwareAutoStartVM.png 如果沒有rmrun工具程式: 首先要到官網下載安裝VMware-VIX, 例如: VMware-VIX-1.17.0-6661328.exe VMware-VIX-1.17.0-6661328.x86_64.bundle 安裝成功後多出了vmrun命令,運行該命令可看到提示。 啟動虛擬機: ---------- 無法啟動參考: https://communities.vmware.com/thread/517618 檔案位置: /usr/lib/vmware-vix/vixwrapper-config.txt ---------- windows 自動啟動 ref: https://hk.saowen.com/a/92b36d8f43cddc13ca8089026b4bc63555f605aedb0333f61f157890cd3427e5 很多用Windows系統電腦開發的童鞋,會在自己電腦上裝一個虛擬機,然後在裝一個linux系統當作服務器來使用。但每次電腦開機都要去重啟一下虛擬機電源,實在是不划算。下面博主教大家在windows系統上,設置VMware開機自動啟動,虛擬機也啟動。    首先在某個盤裏,找個安靜的角落,首先新建一個 vm_start.bat 的文檔,然後用編輯器打開,寫下 D:\Program Files\VMware\vmrun.exe" start "E:\system\CentOS6.5-1\centos6.5-1-bit.vmx" nogui 這行開啟腳本。   注:start前面部分是你VMware的安裝路徑,後面到nogui部分是你Linux系統文檔路徑。 後,我們再建一個 vm_stop.bat 的文檔,寫下 "D:\Program Files\VMware\vmrun.exe" stop "E:\system\centos6.5-1\centos6.5-1-bit.vmx" soft 腳本,路徑和剛才的一樣。   如果寫完可以測試自己寫沒寫對,可以雙擊一下文檔,如果彈出下面的dos界面,並且開啟了你的虛擬機,那就説明你寫的是對的啦!^_^ 接下來,我們就可以往Windows的“腳本(登錄/註銷)”添加了,運行 > gpedit.msc > 用户配置 > windows設置 > 腳本(登錄/註銷) > 添加 分別在“登錄”和“註銷”雙擊一下,然後點擊“添加”,選擇我們剛才創建的腳本文檔的路徑。