vmrun.exeã§ï¼ä»®æ³ãã·ã³ã®æä½ããããããèªååããã ï¼VMWare Server 2ã§ï¼WindowsããLinuxãOSãã¨èªåæä½ï¼
ã¢ããªã±ã¼ã·ã§ã³éçºã«ããã¦ï¼ãããããã¹ãä½æ¥ãèªååãã¦ããã¨ï¼ä»¥ä¸ã®ãããªå£ã«çªãå½ããã
- OSå ã®ãç°å¢ã®å¤§å¤åãããã¹ãããããä¾ãã°ãOSã®ç ´å£ãã¨ããï¼ã§ãï¼å¾å§æ«ãåç¾ã大å¤ã»ã»ã»ï¼
- Windowsããï¼Linuxãèªåæä½ããããï¼ã§ãï¼ã¤ãªãæ¹ãããããªãã»ã»ã»ï¼
- è¤æ°ã®ãã·ã³ã«ã¾ããã£ãæä½ãå帰ãã¹ãããããï¼ã§ãï¼PCã¯ï¼å°ãããªãã»ã»ã»ï¼
- OSã®ãé»æºON/OFFæä½ããèªåãã¹ãããããï¼ã§ãï¼ãã¼ãã®æä½ã¯ç°¡åã«èªååã§ããªãã»ã»ã»ï¼
â
VMWare Server 2 㧠vmrun.exe ã使ãã°ï¼ãããã¯ãã¹ã¦ç¡æã§å¯è½ã
æå
ã«ã¯ï¼Windowsãã·ã³ãï¼å°ããã°ããã
ãæ©ããVMware Server 2ã移è¡ãã¹ãã
http://blog.livedoor.jp/u_26/archives...
- VMWare Serverã¯2ã«ãªã£ã¦Web UIãå°å ¥ããGUIåãããï¼CUIãããå¶å¾¡å¯è½
æè¡çéè«-Windowsä¸ã®VMWareServer2.0å ã®VMãã³ãã³ãã©ã¤ã³ã§æä½ãã
http://www.himajin2001.com/wiki.cgi?p...
vmrunã®ã³ãã³ãä¸è¦§
http://sites.google.com/site/xisite/H...
ä»®æ³åæè¡ã¯ï¼ITãµã¼ãã¹ã®éç¨ã³ã¹ããåæ¸ããããã«æ¨ä»é常ã«å¤ãç¨ããããããã«ãªã£ãã
ãã®åãæè¡ãï¼ã·ã¹ãã éçºããã»ã¹ã®èªååã«ãæå¹æ´»ç¨ãããã¨ãã§ããã
ï¼ã¤ã®OSãåãªãï¼ã¤ã®ããã¡ã¤ã«ãã¨ãã¦æ±ãäºãå¯è½ã«ãªãã°ï¼ããã·ã³ã®ç ´å£ãããèªåå帰ãã¹ãã§ããï¼ã¨ããããã ã
以ä¸ã§ã¯ï¼vmrun.exeãå¼ã³åºããããã®ãµã³ãã«ã³ã¼ããæ²è¼ã
ä»®æ³ãã·ã³ãèªåæä½ãã¦çµæã調ã¹ããµã³ãã«ã³ã¼ã
ç°å¢ã¯ï¼
- Host OS: Windows XP
- Guest OS: CentOS
ãæ³å®ã
ã¾ãï¼ä»®æ³ãã·ã³å
ã«ãVMWare Toolsããã¤ã³ã¹ãã¼ã«ããã¦ããå¿
è¦ãããã
ã¤ã³ã¹ãã¼ã«æé ã¯ï¼ãã®è¨äºã®æ«å°¾ã«è¨è¼ããã
ã¹ã¯ãªããã®æµãï¼
- ã¯ãªã¼ã³ãªLinuxç°å¢ãæºåãããï¼ï¼è©¦é¨ç°å¢ãæ´ãããï¼ããã«ã¯ï¼ä»®æ³ãã·ã³ã®ã¹ãããã·ã§ããã使ãã
- Windowsãã·ã³ããï¼Linuxä»®æ³ãã·ã³ã¸ï¼ä½ããã®ã¹ã¯ãªãããéããï¼ï¼è©¦é¨å¯¾è±¡ããã°ã©ã ã試é¨å ´ã®ä¸ã§ççºãããçå¼¾ã®ãããªãã®ãï¼
- Linuxä»®æ³ãã·ã³å ã§ï¼ã¹ã¯ãªãããå®è¡ããã
- å®è¡çµæãåå¾ãï¼é²è¦§ããã
以ä¸ããã®ã³ã¼ãã
ã²ã¹ãOSã§ã¹ã¯ãªããå®è¡.bat
@rem ---------- VMWare Server 2 ã®ã¤ã³ã¹ãã¼ã«æ å ± ---------- @set SDKPATH=https://localhost:8333/sdk @set VMROOT=C:\Program Files\VMWare\VMWare Server @rem ---------- ãã¹ãOSå´ã®è¨å®æ å ± ---------- @set HOSTUSER=ãWINDOWSã®ã¦ã¼ã¶åã @set HOSTPASS=ãWINDOWSã®ãã¹ã¯ã¼ãã @rem ---------- ã²ã¹ãOSå´ã®è¨å®æ å ± ---------- @set GUESTUSER=ãLinuxã®ã¦ã¼ã¶åã @set GUESTPASS=ãLinuxã®ãã¹ã¯ã¼ãã @set GUESTVMX="[standard] hoge/hoge.vmx" @rem ---------- å¦ç ãããã ---------- @rem ---------- äºåæºå ---------- @echo ãã¹ãå ã§vmrun.exeã®åå¨ãããã£ã¬ã¯ããªã«ç§»åãã¾ãã @c: @cd %VMROOT% @cd @echo VMWare Server 2 ã®SDKã«æ¥ç¶å¯è½ãã©ãã確èªãã¾ãã @netsh diag connect iphost localhost 8333 @rem ---------- ã¯ãªã¼ã³ãªLinuxç°å¢ãä½æ ---------- @echo ã²ã¹ãOSãã¹ãããã·ã§ããã«æ»ãã¾ãã @vmrun -T server -h %SDKPATH% -u %HOSTUSER% -p %HOSTPASS% ^ revertToSnapshot %GUESTVMX% @echo ã²ã¹ãOSã®é»æºãONãã¾ãã @vmrun -T server -h %SDKPATH% -u %HOSTUSER% -p %HOSTPASS% ^ start %GUESTVMX% @echo é»æºONãæ£å¸¸ã«å®äºããã®ã確èªããããã«ï¼ç¾å¨èµ·åä¸ã®ä»®æ³ãã·ã³ãä¸è¦§è¡¨ç¤ºï¼ @vmrun -T server -h %SDKPATH% -u %HOSTUSER% -p %HOSTPASS% ^ list @rem ---------- Linuxç°å¢ã§ã¹ã¯ãªãããæºå ---------- @echo ãã¹ãOSããã²ã¹ãOSã«ï¼å®è¡ç¨ã¹ã¯ãªããã®è³æãã³ãã¼ãã¾ãã @vmrun -T server -h %SDKPATH% -u %HOSTUSER% -p %HOSTPASS% -gu %GUESTUSER% -gp %GUESTPASS% ^ copyFileFromHostToGuest %GUESTVMX% ^ "C:\\shizai.tar.gz" ^ "/tmp/shizai.tar.gz" @echo ã³ãã¼ã®æ£å¸¸çµäºã確èªããããã«ï¼ã³ãã¼å ãã£ã¬ã¯ããªå ã®ãã¡ã¤ã«ãä¸è¦§è¡¨ç¤ºï¼ @vmrun -T server -h %SDKPATH% -u %HOSTUSER% -p %HOSTPASS% -gu %GUESTUSER% -gp %GUESTPASS% ^ listDirectoryInGuest %GUESTVMX% ^ "/tmp/" @echo ã²ã¹ãOSã§ï¼å®è¡ç¨ã¹ã¯ãªããã®è³æãå±éï¼è§£åï¼ãã¾ãã @vmrun -T server -h %SDKPATH% -u %HOSTUSER% -p %HOSTPASS% -gu %GUESTUSER% -gp %GUESTPASS% ^ runProgramInGuest %GUESTVMX% ^ "/bin/tar" ^ -xvzf /tmp/shizai.tar.gz -C /tmp @echo å±éã®æ£å¸¸çµäºã確èªããããã«ï¼å®è¡å¯¾è±¡ã¹ã¯ãªããã®åå¨ãå¤å®ï¼ @vmrun -T server -h %SDKPATH% -u %HOSTUSER% -p %HOSTPASS% -gu %GUESTUSER% -gp %GUESTPASS% ^ fileExistsInGuest %GUESTVMX% ^ /tmp/target.sh @rem ---------- Linuxç°å¢ã§ã¹ã¯ãªãããå®è¡ ---------- @echo ã²ã¹ãOSã§ï¼ã¹ã¯ãªãããå®è¡ãã¾ããå®è¡çµæã¯ãã°ã«ãªãã¤ã¬ã¯ããã¾ãã @vmrun -T server -h %SDKPATH% -u %HOSTUSER% -p %HOSTPASS% -gu %GUESTUSER% -gp %GUESTPASS% ^ runProgramInGuest %GUESTVMX% ^ "/bin/sh" ^ -c "sh /tmp/target.sh > /tmp/sh_log.txt 2>&1" @echo ã²ã¹ãOSå ã§ã®ã¹ã¯ãªããå®è¡ãçµäºãã¾ããããã°ãåå¾ãã¾ãã @vmrun -T server -h %SDKPATH% -u %HOSTUSER% -p %HOSTPASS% -gu %GUESTUSER% -gp %GUESTPASS% ^ copyFileFromGuestToHost %GUESTVMX% ^ "/tmp/sh_log.txt" ^ "C:\\Documents and Settings\\%HOSTUSER%\\ãã¹ã¯ããã\\sh_log.txt" @echo ã¹ã¯ãªããå®è¡ã®è¨¼è·¡ã¨ãã¦ï¼ã²ã¹ãOSå ã®ã¹ã¯ãªã¼ã³ã·ã§ãããåå¾ãã¾ãã @vmrun -T server -h %SDKPATH% -u %HOSTUSER% -p %HOSTPASS% -gu %GUESTUSER% -gp %GUESTPASS% ^ captureScreen %GUESTVMX% ^ "C:\\cap.png" @echo åå¾ãããã°ã®å 容ã表示ãã¾ãã @pause more "C:\\Documents and Settings\\%HOSTUSER%\\ãã¹ã¯ããã\\sh_log.txt" @rem ---------- çµäº ---------- @echo ããããã¡ã¤ã«ã®å®è¡ãçµäºãã¾ãã @pause
å 容ã«ã¤ãã¦ã®åèURLï¼
ãã¼ãã®ãªãã¹ã³ç¶æ ã調æ»ãã
http://www.atmarkit.co.jp/fwin2k/win2...
- ãµã¼ãã®æ»æ´»ç£è¦ã®éï¼pingã³ãã³ãã§ã¯ãã¼ããæå®ã§ããªãã
- ç¹å®ã®ãã¼ããéãã¦ãããã©ãã確èªããã«ã¯ï¼telnetãªããnetshã³ãã³ããå©ç¨ããã
- ããã§ã¯ï¼8333çªãã¼ãã®ç¶æ³ï¼ã¤ã¾ãï¼VMWare Server SDKãå©ç¨å¯è½ãã©ããï¼ã調ã¹ã¦ããã
ããããã¡ã¤ã« ãã¡ã¤ã«å ã§æ¹è¡ããã
http://okwave.jp/qa/q4217665.html
- è¡æ«ãã^ãï¼ãã£ã¬ããï¼ã§çµããã°ãã
ã¨ã©ã¼åºåãæ¨æºåºåã«ãã¼ã¸ãã
http://flex.ee.uec.ac.jp/texi/sh/node...
- æ¨æºåºåã®è¨é²ã¨ã¨ã©ã¼å±¥æ´ãä¸ç·ã«åã
- $ command ï¼foo 2ï¼&1
- ï¼& ã®åãã¯ãå·¦å´ã«æ¸ããããã¡ã¤ã«ãã£ã¹ã¯ãªãã¿ã®åºåãå³å´ã«æ¸ããããã¡ã¤ã«ãã£ã¹ã¯ãªãã¿ã«å¤æ´ãããã¨
cdã®ç´åã«c:ã¨æ¸ãã¦ããçç±ï¼
- ãã®ããããDãã©ã¤ãã§å®è¡ããããï¼Cãã©ã¤ãã«ç´æ¥cdãããã¨ã¯ã§ããªãããã
- Cãã©ã¤ãã«ããæã«ãcd d:ãã¯ç¡å¹ã
- /dãªãã·ã§ã³ãä»ãããcd /d d:ãã¯æå¹ãªã®ã§ããã§ããã
ä»®æ³ãã·ã³ãæå®ããæ¹æ³ã»ã»ã»ãã¼ã¿ã¹ãã¢ãã¹ã«ã¤ãã¦ï¼
VMware server 㧠vmrunããã¾ãèµ°ããªã
http://d.hatena.ne.jp/hon53/20090915/...
- VMware Workstationã ã¨ï¼vmrunã§ä»®æ³ãã·ã³ãæå®ããéï¼VMXãã¡ã¤ã«ã®ãã¡ã¤ã«ãã¹ã使ããã
- VMware Serverã ã¨ï¼vmrunã§ä»®æ³ãã·ã³ãæå®ããéï¼VMXãã¡ã¤ã«ã®ããã¼ã¿ã¹ãã¢ãã¹ãã使ãå¿ è¦ãããã
- åä»®æ³ãã·ã³ã®ç®¡çç»é¢ãéãã¦ããï¼å³å´ã®ãCommandsãã»ã¯ã·ã§ã³ã®ä¸ã®ãConfigure VMããã¯ãªãã¯ããã°ãVirtual Machine Configuration Fileãã®é ç®ã«ãã¼ã¿ã¹ãã¢ãã¹ã表示ãããããããã³ããããã°ããã
- VMã®Web管çç»é¢ã®ãããã®ãDatastoresãã®è¦åºãå ãè¦ãã°ï¼vmxã®åå¨ãããã£ã¬ã¯ããªãã¹ã [ãã¼ã¿ã¹ãã¢å] ã§ç½®ãæãã£ã¦ããã®ããããã
åã³ãã³ããèµ°ããããã³ã«ï¼æ¯åãã¡ãã¡ããã¡ã¤ã«ã®åå¨ç¢ºèªãã¨ãããã£ã¬ã¯ããªå
ã®ä¸è¦§è¡¨ç¤ºãããã¦ããçç±ï¼
- ã²ã¹ãOSå´ã§æ®éã«ã³ãã³ãã©ã¤ã³ããã³ãã³ããå®è¡ããå ´åï¼åã³ãã³ãã®å®è¡çµæã¯ï¼ã³ã³ã½ã¼ã«ä¸ã§ãªã¢ã«ã¿ã¤ã ã«åºåãã確èªãããã¨ãå¯è½ã
- ãããï¼vmrunããã³ãã³ããå®è¡ããå ´åï¼ã³ã³ã½ã¼ã«åºåãç´æ¥ç¢ºèªãããã¨ãã§ããªãã
- ãªã®ã§ï¼vmrunã®çµã¿è¾¼ã¿å¤å®ã³ãã³ãã使ã£ããï¼ãªãã¤ã¬ã¯ãã§å®è¡çµæãããã¹ãã«åºåããããã¦ï¼éæ¥çã«å®è¡çµæã確ãããã
runProgramInGuestã¨ãrunScriptInGuestã使ãéã®æ³¨æç¹ï¼
- ã³ãã³ãã©ã¤ã³ããæ®éã«å®è¡ããã¨ãã¨ã¯ï¼PATHãç°ãªã£ãããããPATHããã¦ã«ããï¼ãã«ãã¹ã§æ¸ããã¨ã
- ä¾ãã°ï¼ã·ã§ã«ã¹ã¯ãªããå ã§ãrubyãã¨æ¸ãã¦ããã ãã ã¨ï¼runProgramInGuestçµç±ã§ãã®ã·ã§ã«ãå©ããæã«ã¨ã©ã¼ã«ãªããã¡ããã¨ã/usr/local/bin/rubyãã®ããã«è¨è¿°ãã¦ããã°å®å¿ã
captureScreenã«ã¤ãã¦ï¼
- ä»®æ³ãã·ã³ä¸ã§è¡¨ç¤ºããã¦ããã®ãCUIã®ç»é¢ã§ãã£ã¦ãï¼ç»é¢ãã£ããã£ãåå¾ã§ãããã¨ããç¹ããããã
- ããã¯ï¼ãããããç»é¢ãã£ããã£ãããããã®å¼·åãªæ¹æ³ã®ä¸ã¤ã ãOSã®ç¨®é¡ã«å¶éããªããããã«ä»®æ³ããã¤ã¹ãªã®ã§ï¼ã¢ãã¿ã«åºåãããæ åãç´æ¥åå¾ã§ããã
ç»é¢ã®ã¹ã¯ãªã¼ã³ã·ã§ãããï¼Excelããã¯å ã«èªåçã«ä¿åããããã
http://language-and-engineering.hatenablog.jp/entry/20100425/p1
- VBAã使ãæ¹æ³
ç»é¢ãã³ãã³ãã©ã¤ã³ãããã£ããã£ããæ¹æ³ãï¼WSHãããã§PrintScreenï¼
http://language-and-engineering.hatenablog.jp/entry/20081121/1227203100
- ms paintã使ãæ¹æ³
ããï¼vmrunã®æä½ãå
±éã¢ã¸ã¥ã¼ã«åãã¦batã¨ãã¦ä¿åãããå ´åã¯ï¼
親batã§ç°å¢å¤æ°ãå®ç¾©ãï¼åbatãcallããã°ï¼
åbatå
ã§è¦ªbatã®å¤æ°å¤ãå©ç¨ãã¦å¦çãå®è¡ã§ããã
callã®ãã¤ãå¦çã§ç°å¢å¤æ°ã¸ã®ä»£å ¥ãæ¶æ» ãã¦ãã¾ã
http://fpcu.on.coocan.jp/dosvcmd/bbs/...
- 親batããåbatãcallããå ´åï¼ç°å¢å¤æ°ã¯å¼ãç¶ããããåã§ã®å¤æ´ã¯è¦ªã«ãå½±é¿ãä¸ããããããï¼åãcallããè¡ã§ãã¤ãå¼ã³åºãããã¨ï¼å¥ããã»ã¹ã¿ãããªæ±ãã«ãªãï¼åå ã§ã®å¤æ´ã親ã«å½±é¿ãä¸ããªãã
è£è¶³ï¼ï¼ï¼VMWare Host Agent ãµã¼ãã¹ã«ã¤ãã¦
ä¸è¨ã®ããããå®è¡ããéã«ï¼ã¾ã ãã¹ãå´ã§VMãç«ã¡ä¸ãã£ã¦ããªãå ´åãããã
äºåã«ãã¹ãå´ã§VMãç«ã¡ä¸ãã¦ããããã®ãããï¼
VMèµ·å.bat
net stop "VMWare Host Agent" net start "VMWare Host Agent"
èµ·åä¸ã®ãµã¼ãã¹ã®ä¸è¦§ã¯
net start
ã¨ããã°è¡¨ç¤ºã§ããããã®åºåçµæã®ä¸ã«ï¼ãVMWare Host Agentããå«ã¾ãã¦ããã°OKã
åèï¼
VMware Server 2ã®Web Accessã«ã¢ã¯ã»ã¹ã§ããªãå ´åã®å¯¾å¦
http://blog.mynet.co.jp/nakamoto/2008...
ããããã¡ã¤ã«ã§Windows ã®ãµã¼ãã¹ãåèµ·åããæ¹æ³
http://fdays.blogspot.com/2008/03/win...
net startã«ã¤ãã¦
http://pckida.hp.infoseek.co.jp/msnet...
ãªãWindows Vista以éã§ã¯ï¼batãã¡ã¤ã«ã§ãµã¼ãã¹èµ·åã®ããnet startãããã¨ãã¦ã権éä¸è¶³ã§æå¦ãããã
ããããå³ã¯ãªãã¯â管çè ã¨ãã¦å®è¡ãããã®ã¯é¢åã
ã¾ãï¼batãã¡ã¤ã«ã«ã¯ããããã£ãã管çè å®è¡è¨å®ãã§ããªãã
ããã§ï¼batãã¡ã¤ã«ã«ã·ã§ã¼ãã«ãããä½ãï¼ãã®ã·ã§ã¼ãã«ãããã¡ã¤ã«ã®ããããã£ããï¼ã·ã§ã¼ãã«ããã¿ãä¸ã§ã管çè ã¨ãã¦å®è¡ãã®è¨å®ãããã°ããã
ããããã¡ã¤ã«ã管çè 権éã§
http://daiworks.asablo.jp/blog/2007/0...
è£è¶³ï¼ï¼ï¼VMWare Toolsã«ã¤ãã¦
ä»®æ³ãã·ã³ã®å é¨ãèªåæä½ããããã«ã¯ï¼
ãã®ä»®æ³ãã·ã³ã«VMWare Toolsãã¤ã³ã¹ãã¼ã«ããã¦ããå¿ è¦ãããã
Web UIã§å¯¾è±¡ä»®æ³ãã·ã³ã®ç®¡çç»é¢ãéãï¼å³å´ã®ãStatusãã®ã»ã¯ã·ã§ã³å ã§ï¼ãVMWare ToolsããRunningã¨ãªã£ã¦ããã°ï¼ã¤ã³ã¹ãã¼ã«æ¸ã¿ã
ã¤ã³ã¹ãã¼ã«ããã¦ããªãå ´åã¯ï¼ä¸è¨ã®æé ãåç §ã
VMWare Toolsã¤ã³ã¹ãã¼ã«æé
- 対象仮æ³ãã·ã³ã®é»æºãOFFã§ãããã¨ã確èªããã
- Web UIã§å¯¾è±¡ä»®æ³ãã·ã³ã®ç®¡çç»é¢ãéãï¼å³å´ã®ãStatusãã®ã»ã¯ã·ã§ã³å ã§ï¼ãVMWare ToolsãããTools Not Installedãã¨ãªã£ã¦ãããã¨ã確èªããã
- 対象仮æ³ãã·ã³ã®é»æºãONããã
- Web UIã§å¯¾è±¡ä»®æ³ãã·ã³ã®ç®¡çç»é¢ãéãï¼å³å´ã®ãStatusãã®ã»ã¯ã·ã§ã³å ã§ï¼ãVMWare ToolsãããInstall VMWare Toolsãã¨ãããªã³ã¯ã«ãªã£ã¦ãããã¨ã確èªããã
- åé ã®ãªã³ã¯ãæ¼ä¸ãåºç¾ãããã¤ã¢ãã°ä¸ã§ãInstallããã¯ãªãã¯ã
- VMWare Toolsã®ã¤ã³ã¹ãã¼ã«è³æãå梱ãããCDROMã¤ã¡ã¼ã¸ãï¼å¯¾è±¡ä»®æ³ãã·ã³ã®CDãã©ã¤ãã«ï¼ä»®æ³çã«æ¿å ¥ãããã
- ããããã¯ï¼å¯¾è±¡ä»®æ³ãã·ã³ãï¼CUIã§æä½ãããVMã³ã³ã½ã¼ã«çµç±ã§ããããï¼puttyãªã©ã®sshãã¼ã«çµç±ã§ãããã
- 以ä¸ã®ã³ãã³ããå®è¡ãã¦ï¼VMWare Toolsã®ã¤ã³ã¹ãã¼ã«è³æããã¼ã«ã«ã«å±éã
- mount /dev/hdc /media/cdrom
- cd /media/cdrom
- cp -p VMwareTools-7.7.5-156740.tar.gz /tmp/
- cd /tmp
- tar -xvzf VMwareTools-7.7.5-156740.tar.gz
- cd vmware-tools-distrib/
- ./vmware-install.pl
- vmware-install.plãèãã¦ãã質åã¯å ¨é¨yesï¼ã¨ã³ã¿ã¼ãã¼æ¼ä¸ï¼
- Web UIã§å¯¾è±¡ä»®æ³ãã·ã³ã®ç®¡çç»é¢ãéãï¼å³å´ã®ãStatusãã®ã»ã¯ã·ã§ã³å ã§ï¼ãVMWare ToolsãããRunningãã¨ãªã£ã¦ãããã¨ã確èªããã
- VMWare Toolsã®ã¤ã³ã¹ãã¼ã«å®äºã
VMwareTools-7.7.5-156745.tar.gz ã®å±é
http://d.hatena.ne.jp/Guernsey/200907...ãã¹ãOSï¼Winsowsãã²ã¹ãOSï¼Linuxãã®å ´åã®ã¤ã³ã¹ãã¼ã«æ¹æ³
http://www.nurs.or.jp/~sugi/vmware.htm
ã
ã