åã®è¨äº
ãããããä»®æ³åã£ã¦ä½ï¼ãã¨ããæ¹ã¯ãå ã«ãã¡ããã覧ãã ããã
æ¬è¨äºã§ç´¹ä»ãããã¨
æ¬è¨äºã§ã¯ãVirtualBoxã使ãããªãããã§å¿ è¦ã¨ãªããåºæ¬æ¦å¿µãç´¹ä»ãã¾ãã
ä»®æ³åã®åºç¤ç¥èã¨ãVirtualBoxã®ä»®æ³ãããã¯ã¼ã¯ãä¸å¿ã«ç´¹ä»ãã¾ãã
å ·ä½çãªæä½æé ã¯å¥è¨äºã«è²ããããã§ã¯æ¦å¿µãç´¹ä»ãã¾ãã
- åã®è¨äº
- æ¬è¨äºã§ç´¹ä»ãããã¨
- VirtualBoxã®æ¦è¦
- VirtualBoxã®ä»®æ³ãããã¯ã¼ã¯ã«ã¤ãã¦
- æå¾ã«
VirtualBoxã®æ¦è¦
VirtualBoxã¨ã¯
WindowsãMacã«å¯¾å¿ããç¡æã®ãµã¼ãã¼ä»®æ³åã½ããã§ãã
Windowsã®å ´åãä»ã«VMware Workstation Playerãç¡æã®ä»®æ³åã½ããã¨ãã¦ä½¿ãã¾ãã
Macã®å ´åãæåã§ããVMware Fusionã¨ãã製åãããã¾ãã
ãµã¼ãã¼ä»®æ³åã¨ã¯
ããããVM (Virtual Machine: ä»®æ³ãã·ã³) ãä½ãæ©è½ã§ãã
ããOSã®ä¸ã«å¥ã®OSãç«ã¡ä¸ãããã¨ãã§ãã¾ãã
ãµã¼ãã¼ä»®æ³åã«ããã¹ãåããã¤ãã¼ãã¤ã¶åãã³ã³ããåãªã©ããã¤ã種é¡ãããã¾ãã
VirtualBoxã¯ããµã¼ãã¼ä»®æ³åã®ä¸ã§ãããã¹ã(OS)åãã«åé¡ããã¦ãã¾ãã
å種ãµã¼ãä»®æ³åã½ãªã¥ã¼ã·ã§ã³ã®æ§æã¯ãä¸å³ã®ããã«ãªã£ã¦ãã¾ãã
VirtualBoxã¯ãã¹ãPCä¸ã®ã¢ããªã±ã¼ã·ã§ã³ã¨ãã¦åä½ããVMã管çããå½¹å²ãæã£ã¦ãã¾ãã
ä»®æ³åã®ã¿ã¤ãå¥ã®ã¡ãªãã/ãã¡ãªããã®æ¦è¦ã¯ä»¥ä¸ã«ãªãã¾ãã
VirtualBoxãå«ããã¹ãOSåã®ä»®æ³åã¯ç¡åã®è£½åãå¤ãæ軽ã«å°å
¥ã§ãã¾ãã
ä¸ã®ä¸ã§ãå¤ãã®äººã使ã£ã¦ãããå
人ã®ç¥æµãå¤ãèç©ããã¦ãã¾ãã
ãã¹ãOSåã®ä»®æ³å製åã¯ãã¾ãã«å¦ç¿ç¨éã«ãã£ã¦ã¤ããªã®ã§ãã
VirtualBoxã®ä»®æ³ãããã¯ã¼ã¯ã«ã¤ãã¦
ãµããª
VirtualBoxã®æä½æ¹æ³ã¯å¥è¨äºã§ç´¹ä»ãããã¨ã¨ãã¦ãããã§ã¯VirtualBoxã§å¯ä¸ã®é£ããæ¦å¿µã§ããä»®æ³ãããã¯ã¼ã¯ã«ã¤ãã¦èª¬æãã¾ãã
ä»®æ³ãããã¯ã¼ã¯ã«ã¯ä»¥ä¸ã®ããªã¨ã¼ã·ã§ã³ãããã¾ãã
- NAT
- å é¨ãããã¯ã¼ã¯
- ãã¹ããªã³ãªã¼ã¢ããã¿ã¼
- NATãããã¯ã¼ã¯
- ããªãã¸ã¢ããã¿ã¼
- æ±ç¨ãã©ã¤ãã¼
å¤ãã®å ´åããã¹ããªã³ãªã¼ãNATãããªãã¸ãããã°äºè¶³ãã¾ãã
æ©è½ã®ãµããªã¯ä»¥ä¸ã®ããã«ãªã£ã¦ãã¾ãã
ããã ã種é¡ãããã¨ãã©ã使ã£ããã®ãè¿·ã£ã¦ãã¾ãã¾ãããã
ç§ã¯ä»¥ä¸ã®ããã«ä½¿ãåãã¦ãã¾ãã
ã©ã®æ©è½ãå¿
è¦ãªå ´åã1ã¤ã®VMã«3ã¤ã®ãããã¯ã¼ã¯ã¤ã³ã¿ã¼ãã§ã¼ã¹ã追å ãã¦ãã¾ãã
- Host PCããVMã«éä¿¡ããããã¨ã (SSHæ¥ç¶ãããµã¼ããç«ã¦ãå¾ã«ãã©ã¦ã¶ã§è©¦é¨çã«ã¢ã¯ã»ã¹ããæã®ãã)ãVMå士ãéä¿¡ããããã¨ã (ãã¹ããªã³ãªã¼ã¯ã©ããªå ´åã§ã追å ãã¹ãã§ã) â ãã¹ããªã³ãªã¼
- VMããHost PCã®å¤é¨ (ç¹ã«ã¤ã³ã¿ã¼ããã) ã«éä¿¡ããããã¨ã (å¤é¨ããVMã«ã¯ã¢ã¯ã»ã¹ãããªã) â NAT
- VMå士ãéä¿¡ãããããã¤ãã¹ããªã³ãªã¼ã¨ã¯ãããã¯ã¼ã¯ã»ã°ã¡ã³ããåãããã¨ã (ä»®æ³ãã·ã³ã§ã«ã¼ãã£ã³ã°ãNATããããã·ããããã¨ããªã©) â å é¨ãããã¯ã¼ã¯
å¤é¨ããVMã«ã¢ã¯ã»ã¹ããããå ´åã¯ã以ä¸ã®ã©ã¡ããã§å¯¾å¦ãã¾ãã
- åºæ¬çã«ã¯ ããªã㸠ãå©ç¨ãã
- Host PCãå±ãããããã¯ã¼ã¯ã®IPã¢ãã¬ã¹ãVMã«å²ãå½ã¦ãããªãå ´å (ä¾ãã°ãèªåã管çãã¦ããªããããã¯ã¼ã¯ããåºå®ã®IPã¢ãã¬ã¹ãã¢ãµã¤ã³ããã¦ããã¨ã) â NAT + ãã¼ããã©ã¯ã¼ãã£ã³ã° ãå©ç¨ãã
NATãããã¯ã¼ã¯ã¨æ±ç¨ãã©ã¤ãã¼ã«ã¤ãã¦ã¯ãæããä»å¾ãå©ç¨ãããã¨ã¯ãªãã¨æãã¾ãã
次ã«ãåä»®æ³ãããã¯ã¼ã¯ã®è©³ç´°ã説æãã¾ãã
NAT
説æ
VMãHost PCã®å¤é¨ (ã¤ã³ã¿ã¼ããããªã©) ã«ã¢ã¯ã»ã¹ããããã«å©ç¨ãã¾ãã
NATã«æå®ããã¤ã³ã¿ã¼ãã§ã¼ã¹ã®IPã¢ãã¬ã¹ã¯ãVirtualBoxã«çµã¿è¾¼ã¾ããDHCPãµã¼ãæ©è½ã«ãã£ã¦èªåçã«ã¢ãµã¤ã³ããã¾ãã
ã¦ã¼ã¶ã¯ã©ã®IPãã¢ãµã¤ã³ãããããæèããå¿
è¦ã¯ããã¾ããã
ãã¹ãPCã®ç©çã¤ã³ã¿ã¼ãã§ã¼ã¹ã®IPã¢ãã¬ã¹ã«NAPTãã¦ãã¾ãã®ã§ãããã©ã«ãã®è¨å®ã§ã¯Host PCå¤é¨ããVMã«éä¿¡ãéå§ãããã¨ã¯ã§ãã¾ãã (ã§ããã®ã¯æãè¿ãéä¿¡ã®ã¿)ã
æå¾ã«æ³¨æç¹ã§ãããNATã«è¨å®ããã¤ã³ã¿ã¼ãã§ã¼ã¹ã§ãVMå士ã¯äºãã«éä¿¡ã§ãã¾ããã
VMå士éä¿¡ããããå ´åã¯ããã¹ããªã³ãªã¼ãå
é¨ãããã¯ã¼ã¯ã®ã¤ã³ã¿ã¼ãã§ã¼ã¹ã使ãã®ãä¸è¬çã§ãã
(åè) ãã¼ããã©ã¯ã¼ãã£ã³ã°ã«ãã£ã¦ãã¹ãPCã¨VMã®IPã¢ãã¬ã¹ã¨ãã¼ãçªå·ãç´ã¥ãããã¨ã§ãã¤ã³ã¿ã¼ãããããVMã«ã¢ã¯ã»ã¹ã§ããããã«ãªãã¾ãã
IPã¢ãã¬ã¹ã®é¨åã空ç½ã«ããã¨ãanyæ±ãã¨ã§ããããã§ã
https://www.virtualbox.org/manual/ch06.html#natforward
https://blogs.oracle.com/scoter/networking-in-virtualbox-v2#NAT-PF
å
¬å¼ããã¥ã¢ã«ã«ããã¨ãNATã«ã¯å¶éãããã¨ã®ãã¨ãªã®ã§ããã¡ããç®ãéãã¦ãããæ¹ãè¯ãããã§ãã
ç§ã¯ä»ã¾ã§ã«å°ã£ããã¨ã¯ããã¾ãããããã¼ããã©ã¯ã¼ãã£ã³ã°ã§ãã¹ãPCå´ã®1023以ä¸ã®ãã¼ãçªå·ãè¨å®ãã¦ããã¾ãåããªããªã©ããã¨ã®ãã¨ã§ãã
https://www.virtualbox.org/manual/ch06.html#nat-limitations
è«çæ§æ
è¨å®æ¹æ³
NATã使ãããã®äºåè¨å®ã¯ä¸è¦ã§ãã
ãã¹ãPCãå¤é¨ãããã¯ã¼ã¯ã¨éä¿¡å¯è½ãªç¶æ
ã§ãããVMå´ã§DHCPãå©ç¨ããè¨å®ããããã°éä¿¡ã§ãã¾ãã
ããããã¯åèæ å ±ã§ãã
NATã¤ã³ã¿ã¼ãã§ã¼ã¹ã«æ¯ãããIPã¢ãã¬ã¹ã¯10.0.x.0/24ããæãåºãããã®ãããã©ã«ãã§ããããã®æãåºãå
ã®IPã¢ãã¬ã¹ã¯å¤æ´ãããã¨ãã§ãã¾ãã
ãã®è¨å®å¤æ´ã¯VirtualBoxã®GUIããã¯ã§ãããVBoxManageã¨ããCLIããã°ã©ã ã使ã£ã¦å¤æ´ãã¾ãã
ã©ããã¦ãå¤æ´ã§ããªãæ¢åã®IPã¢ãã¬ã¹ã¨éè¤ãã¦ããå ´åãé¤ãããã®è¨å®ã¯åºæ¬çã«ä¸è¦ã§ãã
(åè) å ¬å¼ããã¥ã¢ã« https://www.virtualbox.org/manual/ch09.html#changenat
以ä¸ã«ã³ãã³ããµã³ãã«ãè¼ãã¾ãã
ã³ãã³ãã®åå¨ã¯ç¢ºèªæ¸ã¿ã§ãããå®éã«ã¯ä½¿ã£ããã¨ã¯ããã¾ããã
# Windowsã®å ´å # --natnet ã®å¾ã®æ°å¤ã«ã¯ã1以ä¸ã®æ°å¤ãå ¥ããã¤ã³ã¿ã¼ãã§ã¼ã¹çªå·ã¨å¯¾å¿ãã "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyvm "<ä»®æ³ãã·ã³å>" --natnet1 "192.168.100.0/24" # (åè) VBoxManageã®ãã«ã "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe"
ãã¹ããªã³ãªã¼
説æ
ãã¹ããªã³ãªã¼ã¯ãVM - Host PCéãVMéã®éä¿¡ãå®ç¾ãããããã¯ã¼ã¯ã§ãã
ç¹æ®ãªäºæ
ããªããã°ãå
¨ã¦ã®VMã«ãã¹ããªã³ãªã¼ã®ã¤ã³ã¿ã¼ãã§ã¼ã¹ã1ã¤ã¯æè¼ãã¹ãã§ãã
ãã¹ãPCããSSHã¢ã¯ã»ã¹ããã°ã³ããã§ãã¾ãããSCPã§ãã¡ã¤ã«ã®ããã¨ãããããã¨ãã§ãã¾ãã
å¤ãã®æ¤è¨¼ã§ã¯ãVMéã®éä¿¡ãã§ããæ¹ãé½åãè¯ãã¨æãã¾ãã
ãã¹ããªã³ãªã¼ã«è¨å®ããã¤ã³ã¿ã¼ãã§ã¼ã¹ã«ã¯ãåºå®ã®IPã¢ãã¬ã¹ãæ¯ããã¨ãDHCPã§åçã«IPã¢ãã¬ã¹ãæ¯ããã¨ãã§ãã¾ãã
è«çæ§æ
è¨å®æ¹æ³
ãã¹ããªã³ãªã¼ãããã¯ã¼ã¯ã¯ã使ç¨ããåã«äºåã«ãµãããããDHCPãµã¼ãã®è¨å®ãå®ç¾©ããå¿ è¦ãããã¾ãã
ãã¡ã¤ã« > ãã¹ããããã¯ã¼ã¯ããã¼ã¸ã£ã¼ããè¨å®ã§ãã¾ãã
(ã¾ãã¯ãç»é¢å³ä¸ã®ã°ãã¼ãã«ãã¼ã« > ãã¹ããããã¯ã¼ã¯ããã¼ã¸ã£ã¼)
ã¾ã 1ã¤ããã¹ããªã³ãªã¼ãããã¯ã¼ã¯ããªãå ´åã¯ããä½æããã¿ã³ãã追å ãã¾ãããã
è¨å®é
ç®ã¯ä»¥ä¸ã®éãã§ãã
ã¢ããã¿ã¼ã«ã¯Host PCå´ã®IPã¢ãã¬ã¹ã®è¨å®ãå ¥ãã¾ãã
ä¸è¨ã®ãµã³ãã«è¨å®ã§ã¯ãVMã«å¯¾ãã¦éçãªIPã¢ãã¬ã¹ã192.168.10.2-199ã®ç¯å²ã§å²ãæ¯ããã¨ãã§ãã¾ãã
VMå´ã§DHCPãå©ç¨ããè¨å®ã¨ããå ´åã192.168.10.200-254ã®ç¯å²ã§ã¢ãã¬ã¹ãå²ãæ¯ããã¾ãã
å é¨ãããã¯ã¼ã¯
説æ
VMå士ãéä¿¡ããå°ç¨ã®ãããã¯ã¼ã¯è¨å®ã§ãã
ãã®ã¤ã³ã¿ã¼ãã§ã¼ã¹ã§ã¯ãåãå
é¨ãããã¯ã¼ã¯ã«æå±ããVMã¨ã¯éä¿¡ã§ãã¾ãããä»ã®ãã¹ãã¨ã¯ä¸åéä¿¡ã§ãã¾ããã
VMå士ã§éä¿¡ãããã ããªãããã¹ããªã³ãªã¼ (ãNATãããã¯ã¼ã¯ãããªãã¸) ã§ãå¯è½ã§ãã
å¤ãã®å ´åããã¹ããªã³ãªã¼ãVMã«æè¼ããã°ååã«è¦ä»¶ãæºããã§ãããã
ãã¹ããªã³ãªã¼ã¨ã¯å¥ã«ãå
é¨ãããã¯ã¼ã¯ã追å ã§å©ç¨ããå ´é¢ã¯ ãããã¯ã¼ã¯ã»ã°ã¡ã³ããåå²ãããã¨ãã ã ã§ãã
è«çæ§æ
è¨å®æ¹æ³
å é¨ãããã¯ã¼ã¯ãå©ç¨ããããã®äºåè¨å®ã¯ä¸è¦ã§ãã
è¨å®ç®æã¯ã ä»®æ³ãã·ã³ã®è¨å® > ãããã¯ã¼ã¯ > åå ã®ã¿ã§ãã
è¤æ°ã®VMã§åãååã®å
é¨ãããã¯ã¼ã¯ã«æ¥ç¶ããã°ç¸äºã«éä¿¡å¯è½ãç°ãªãå
é¨ãããã¯ã¼ã¯éã§ã¯éä¿¡ä¸å¯ã§ãã
ããã©ã«ãã®ååã¯intnetãªã®ã§ãç¹ã«çç±ããªããã°ãã®ååã使ãã¾ãããã
ååã¨ç´ã¥ãã¦ããããã¯ã¼ã¯ã¢ãã¬ã¹ããµãããããã¹ã¯ãè¨å®ãããã¨ã¯ããã¾ããã
VMä¸ã§ä»»æã®IPã¢ãã¬ã¹ããµãããããã¹ã¯ãåºå®ã§å²ãå½ã¦ã¦ãã ããã
NATãããã¯ã¼ã¯
説æ
â»å½ããã°ã§ã¯ãNATãããã¯ã¼ã¯ã¯æªæ¤è¨¼ã§ãããäºæ¿ãã ããã
NATãããã¯ã¼ã¯ã¯ãNATã¨ã»ã¼åãæ©è½ã§ãã
VMãããã¹ãPCã®å¤é¨ (ã¤ã³ã¿ã¼ããããªã©) ã«ã¢ã¯ã»ã¹ã§ãã¾ãããå¤é¨ããVMã«ã¯ã¢ã¯ã»ã¹ã§ãã¾ããã
NATã¨ç°ãªãã¨ããã¯ãåãNATãããã¯ã¼ã¯ã«æå±ããVMå士ã¯ãNATãããã¯ã¼ã¯è¶ãã«ç¸äºã«éä¿¡ã§ãããã¨ã§ãã
ããã¦ãNATãããã¯ã¼ã¯å
é¨ã§ã¯éçã«IPã¢ãã¬ã¹ãå²ãå½ã¦ããã¨ãã§ãã¾ã (DHCPãå©ç¨å¯è½ã§ã)ã
ãã¤ãNATã¤ã³ã¿ã¼ãã§ã¼ã¹ã¨ãã¹ããªã³ãªã¼ã¤ã³ã¿ã¼ãã§ã¼ã¹ã®çµã¿åããã§è³ã£ã¦ãã¾ãã
ãã®ãããã¯ãç´ç²ã«å¥½ã¿ã®åé¡ã ã¨æãã¾ãã
NATãããã¯ã¼ã¯ãè¨å®ããã¨ãè«çæ§æã¯ä»¥ä¸ã®ããã«ãªãã¾ãã
è«çæ§æ
è¨å®æ¹æ³
NATãããã¯ã¼ã¯ã¯ã使ç¨ããåã«äºåã«ãããã¯ã¼ã¯åããµããããæ å ±ãè¨å®ããå¿ è¦ãããã¾ã
NATãããã¯ã¼ã¯ã®è¨å®ã¯ãVirtualBoxã®ãã¡ã¤ã« > ç°å¢è¨å® > ãããã¯ã¼ã¯ ããå¤æ´ã§ãã¾ãã
ãããã¯ã¼ã¯åã¨ãããã¯ã¼ã¯ã¢ãã¬ã¹ãDHCPã®æå¹åæç¡ãè¨å®ã§ãã¾ãã
ããã©ã«ãã²ã¼ãã¦ã§ã¤ã®ã¢ãã¬ã¹ããDHCPã®å²ãå½ã¦ç¯å²ã«ã¤ãã¦ã¯è¨è¼ãããã¾ããã
å
¬å¼ããã¥ã¢ã«ã確èªãã¾ããããé¨åçã«ãããããã¾ããã§ããã
"ã²ã¼ãã¦ã§ã¤ã®ã¢ãã¬ã¹ã¯ãååã¨ãã¦å
é ã®ã¢ãã¬ã¹ã使ç¨ãããã
ããããå¤æ´ãããå ´åãããã"
https://www.virtualbox.org/manual/ch06.html#network_nat_service
DHCPã®å²ãå½ã¦ç¯å²ã«ã¤ãã¦ã¯è¨åç¡ãã
ãã¯ããã®æ©è½ã¯ä½¿ãããããã¾ããããã
ããªãã¸ã¢ããã¿ã¼
説æ
VMãHost PCã®ç©çã¤ã³ã¿ã¼ãã§ã¼ã¹ã¨L2ã¹ã¤ããè¶ãã«æ¥ç¶ããã¦ãã (ããªãã¸æ¥ç¶ããã¦ãã) ãã®ãããªç¶æ³ãä½ãåºãã¾ãã
ã¹ã¿ã³ãã¢ãã³ã®æ¤è¨¼ç°å¢ã¨Host PCãç´çµããVMã¨æ¤è¨¼ç°å¢ã§éä¿¡ããããã¨ãã«ä¾¿å©ã§ãããã
家ã«ãããã¯ã¼ã¯æ©å¨ãè³¼å
¥ãã¦ããã¨ã³ã¸ãã¢ã®æ¹ã¯ãã使ãã¨æãã¾ãã
NATãå é¨ãããã¯ã¼ã¯ã¨ã®éãã¯ã以ä¸ã®éãã§ãã
- éä¿¡ã«å¶éããªã
- NATã¯VMå士ã§éä¿¡ã§ããªããå¤é¨ã«ã¢ã¯ã»ã¹ã§ããããå¤é¨ããVMã¸ã¯ã¢ã¯ã»ã¹ã§ããªã (ãã¼ããã©ã¯ã¼ãã£ã³ã°ããã°å¥)
- å é¨ãããã¯ã¼ã¯ã¯VMå士ããéä¿¡ã§ããªã
- ããªãã¸ã¯å¤é¨ã¨åæ¹åéä¿¡ã§ãããããªãã¸è¨å®ããã¤ã³ã¿ã¼ãã§ã¼ã¹è¶ãã«ãVMå士ãéä¿¡ã§ããããã¼ãçªå·ãå¤æä¸è¦ã§ããã®ã¾ã¾ä½¿ãã
ããªãã¸ã®ç¹å¾´ã¯ãVMããã¹ãPCã¨ã¯å®å ¨ã«ç¬ç«ãã¦ãããã®ããã«æ¯èãããã¨ã§ãã
ããªãã¸ãããã¯ã¼ã¯ã«æ¥ç¶ãããVMã¯å¤é¨ (ã¤ã³ã¿ã¼ããããªã©) ã¨åæ¹åã«éä¿¡ã§ãããã¼ãçªå·ãèªç±ã«ä½¿ãã¾ãã
ãã®åãæ°ãä»ããªããã°ãªããªããã¨ãããã¾ãã
å¤é¨ããVMã«ç´æ¥ã¢ã¯ã»ã¹ã§ãã¦ãã¾ãã®ã§ãã¤ã³ã¿ã¼ãããã«æ¥ç¶ããå ´åã¯VMã®ã»ãã¥ãªãã£ãä¸å ¨ã«ãã¦ããå¿ è¦ãããã¾ãã
ã¾ãã ããªãã¸ã¤ã³ã¿ã¼ãã§ã¼ã¹ã¨ç´ã¥ããç©çãã¼ããLink Down (ã±ã¼ãã«ãæããªã©) ããã¨ãããªãã¸ã¤ã³ã¿ã¼ãã§ã¼ã¹ãåæã«ä½¿ããªããªã£ã¦ãã¾ãã¾ãã
å¾ã£ã¦ãå人çã«ã¯ããªãã¸ã¤ã³ã¿ã¼ãã§ã¼ã¹ãå©ç¨ããå ´åã«ãããã¹ããªã³ãªã¼ã¤ã³ã¿ã¼ãã§ã¼ã¹ãå¥éè¨å®ãããã¨ããå§ããã¦ãã¾ãã
ããããã°ãPCããã±ã¼ãã«ãæããç¶æ
ã§ãããã¹ãPCããVMéã«SSHãã°ã¤ã³ã§ããç¶æ
ãç¶ç¶ããã¾ãã
VMã®ããªãã¸è¨å®ããã¤ã³ã¿ã¼ãã§ã¼ã¹ã«IPã¢ãã¬ã¹ãè¨å®ããã¨ãã§ãããHost PCã®ç©çã¤ã³ã¿ã¼ãã§ã¼ã¹ã¨åããããã¯ã¼ã¯ã®IPã¢ãã¬ã¹ãå²ãæ¯ãå¿
è¦ãããã¾ãã
IPã¢ãã¬ã¹ã®æ¯æ¸ã«ã¯æ³¨æãã¦ãã ããã
èªå®
å¤ã®ããã«ããã©ã¤ãã¼ãIPã¢ãã¬ã¹ãèªç±ã«ã¢ãµã¤ã³ã§ããªãç°å¢ã§ã¯ãããªãã¸ã¤ã³ã¿ã¼ãã§ã¼ã¹ã®å©ç¨ã«ä¸åãã§ã (å¾è¿°ã®ããã«DHCPã§ã¢ãã¬ã¹ãåãåããã¨ã¯ã§ãã¾ããããã®ãããªç°å¢ã§ã¯ããããNATã§ååã§ããã)ã
ããªãã¸ã¤ã³ã¿ã¼ãã§ã¼ã¹ã«ã¯ãVirtualBoxèªä½ãDHCPãµã¼ãæ©è½ãæä¾ãããã¨ã¯ããã¾ããã
ããããããªãã¸æ¥ç¶ãããããã¯ã¼ã¯ã«ãã¨ãã¨DHCPãµã¼ããåå¨ããå ´åãVMãDHCPã«ãã£ã¦IPã¢ãã¬ã¹ãåãåããã¨ãã§ãã¾ãã
(åè) ããªãã¸ã¤ã³ã¿ã¼ãã§ã¼ã¹ã®èª¬æ
https://blogs.oracle.com/scoter/networking-in-virtualbox-v2#Bridged
è«çæ§æ
è¨å®æ¹æ³
ããªãã¸ãè¨å®ããåã®äºåè¨å®ã¯ä¸è¦ã§ãã
ããªãã¸ã¤ã³ã¿ã¼ãã§ã¼ã¹ãVMã«è¨å®ããã¨ãã«æ°ãä»ãããã¤ã³ããããã®ã§ãããã ãè£è¶³ãã¾ãã
ã¾ããä»®æ³ãã·ã³ã®è¨å® > ãããã¯ã¼ã¯ > å²ãå½ã¦ã§ãããªãã¸ã¢ããã¿ã¼ããæå®ãã¾ãã
ãã®å¾ããååãã«ããªãã¸ã¢ããã¿ã¼ã¨ç´ã¥ããããã¹ãPCã®ã¤ã³ã¿ã¼ãã§ã¼ã¹ã®ãã©ã¤ãåãæå®ãã¾ãã
ããªãã¸ã¯ããã¹ãPCã®ã¤ã³ã¿ã¼ãã§ã¼ã¹ã¨L2æ¥ç¶ãããä»®æ³ãããã¯ã¼ã¯æ©è½ã§ãã
ãã¹ãPCãè¤æ°ã®ã¤ã³ã¿ã¼ãã§ã¼ã¹ãæã£ã¦ããæã«ãã©ã®ã¤ã³ã¿ã¼ãã§ã¼ã¹ã¨ç´ã¥ããããæå®ããããã«ãã®å·¥ç¨ãããã¾ãã
ãã¹ãPCãã¤ã³ã¿ã¼ãã§ã¼ã¹ãï¼ã¤ããæã£ã¦ããªãå ´åã¯æ©ããã¨ã¯ããã¾ããããè¤æ°ããã¨åä»ã§ãã
ãã®å ´åã¯...é å¼µã£ã¦èª¿ã¹ã¦ãã ããã
Windowsã®å ´åãã³ãã³ãããã³ããããipconfig /allã§èª¿ã¹ããã¾ãã
å½åã«ã¤ãã¦ãWindowsã®å ´åãå¤ãã¯ãRealtekãã¨ããæååãå«ãã§ããã¨æãã¾ãã
Macã®å ´åãThunderboltãªã©æ¥ç¶è¦æ ¼ã®ååãã¤ãã¦ããã¨æãã¾ãã
æå¾ã«
VirtualBoxã¯ãç¡æã§ç°¡åã«ä»®æ³ãã·ã³ã«ããæ¤è¨¼ç°å¢ãä½ããã¨ãã§ãã便å©ãªãã¹ã¯ãããä»®æ³å製åã§ãã
å¤ãã®è¨å®ã¯ç´è¦³çã«ç解ã§ããã¨æãã¾ãããä»®æ³ãããã¯ã¼ã¯ã ãã¯é£è§£ãªã®ã§ããã§èª¬æãã¦ã¿ã¾ããã
çããã®èªç¿ã«å½¹ç«ã¦ã°ããããã§ãã
質åã¯å¤§æè¿ã§ãã
è¨äºã®æ¹åã®ãããçããã®çåãææ³ãã¢ããã¤ã¹ãèããã¦ãã ããã
ãé¡ããã¾ãã