ã³ãã³ãã©ã¤ã³ããVirtualBoxãæä½ãã¦ãä»®æ³ãã·ã³ã«Windowsãå°å ¥ãã
ã³ãã³ãã©ã¤ã³ããVirtualBoxãæä½ãã¦ãä»®æ³ãã·ã³ã«Windowsãå°å ¥ããæé ã§ãã
- VBoxManageã使ã£ã¦ä»®æ³ãã£ã¹ã¯ã®ä½æããã¤ã³ã¹ãã¼ã«ã¾ã§ãX Windowã·ã¹ãã ãªãã®ç°å¢ã§è¡ãã¾ãã
- ä»®æ³ãã·ã³ã¯ãVRDPãµã¼ãã¼ã¨ãã¦åä½ããããã¨ã§ãWindowsã®ããªã¢ã¼ããã¹ã¯ããããã§æä½ã§ãã¾ãã
- ãã¹ã:CentOS4ãã²ã¹ã:WindowsServer2008ã§è©¦ãã¾ããã
ãªããã»ã¨ãã©ãSun xVM VirtualBox - User Manual - 7.4.2 Step by step: creating a virtual machine on a headless serverãã®ã³ãããªã®ã§é度ãªæå¾ ã¯ããªãã§ãã ããã
æ¦è¦
- VMã®ä½æã¨è¨å®
- VMã§ä½¿ãã¹ãã¬ã¼ã¸ã®ä½æã¨å²ãå½ã¦
- WindowsServer2008ã®ã¤ã³ã¹ãã¼ã«ãã£ã¹ã¯ãVMã§ä½¿ãããã«è¨å®ãã
- VMãèµ·å
- ä»®æ³ãã·ã³ã«æ¥ç¶ããOSãã¤ã³ã¹ãã¼ã«ããã
1.VMã®ä½æã¨è¨å®
ã¾ãã¯VMãä½æããã¡ã¢ãªä½¿ç¨éãªã©ã®è¨å®ãè¡ãªãã¾ãã
- VMã®ååã¯"WindowsServer2008"ã¨ãã¾ããã
- 使ç¨ã¡ã¢ãªã¯1GBå²ãå½ã¦ã¦ãã¾ãã
- ãã®ä»ã®è¨å®ã¯ãSun xVM VirtualBox - User Manualã¨åãã«ã
$ VBoxManage createvm -name "WindowsServer2008" -register $ VBoxManage modifyvm "WindowsServer2008" -memory "1024MB" -acpi on -boot1 dvd -nic1 nat
ä½æãããVMã¯ä»¥ä¸ã®ã³ãã³ãã§ç¢ºèªã§ãã¾ãã
$ VBoxManage list vms
2.VMã§ä½¿ãã¹ãã¬ã¼ã¸ã®ä½æã¨å²ãå½ã¦
VMã§ä½¿ãã¹ãã¬ã¼ã¸ãä½æããVMã«å²ãå½ã¦ã¾ãã
- ãã£ã¹ã¯ã¤ã¡ã¼ã¸ã¯ã<ã¦ã¼ã¶ã¼ãã¼ã >/.VirtualBox/VDIã以ä¸ã«ä½æããã¾ãã
- ãã£ã¹ã¯ãµã¤ãºã¯20GBã¨ãã¾ããã
$ VBoxManage createvdi -filename "Win2008.vdi" -size 20000 -register $ VBoxManage modifyvm "WindowsServer2008" -hda "Win2008.vdi"
3.WindowsServer2008ã®ã¤ã³ã¹ãã¼ã«ãã£ã¹ã¯ãVMã§ä½¿ãããã«è¨å®ãã
WindowsServer2008ã®ã¤ã³ã¹ãã¼ã«ãã£ã¹ã¯ãVMã§ä½¿ãããã«è¨å®ãã¾ããã¤ã³ã¹ãã¼ã«ãã£ã¹ã¯ã¯ISOå½¢å¼ã§æ¯çµ¦ãããã®ã§ãã®ã¾ã¾VMã§ãã¦ã³ããã¦ä½¿ç¨ãã¾ããã
$ VBoxManage registerimage dvd <ã¤ã³ã¹ãã¼ã«ãã£ã¹ã¯ã®çµ¶å¯¾ãã¹> $ VBoxManage modifyvm "WindowsServer2008" -dvd <ã¤ã³ã¹ãã¼ã«ãã£ã¹ã¯ã®çµ¶å¯¾ãã¹>
4.VMãèµ·å
以ä¸ã®ã³ãã³ãã§ãVMãããã¯ã°ã©ã¦ã³ãã§èµ·åãã¾ãã
$ VBoxManage startvm "WindowsServer2008" -type vrdp
ãã¾ãèµ·åããªãå ´åã¯ã
$ VBoxHeadless -startvm "WindowsServer2008"
ã¨ãã¦ãã©ã¢ã°ã©ã¦ã³ãã§åä½ããããã°ã確èªããã¨åã§ãã
ãªããVMã®åæ¢ã¯ã©ã¡ãã®å ´åããVBoxManage controlvmãã使ã£ã¦è¡ãªãã¾ãã
$ VBoxManage controlvm "WindowsServer2008" poweroff
VMããã©ã¢ã°ã©ã¦ã³ãã§åä½ããã¦ããå ´åã¯å¥ã®ã·ã§ã«ããå®è¡ãã¾ããCtrl+Cã¨ãã§æ¢ããªããã注æã(試ããç°å¢ã§ã¯kernel panicã¨ãã«ãªãã¾ãããã)
5.ä»®æ³ãã·ã³ã«æ¥ç¶ããOSãã¤ã³ã¹ãã¼ã«ããã
VMèµ·åå¾ãWindowsä»å±ã®ããªã¢ã¼ããã¹ã¯ãããæ¥ç¶ãã使ç¨ãã¦ä»®æ³ãã·ã³ã«ã¢ã¯ã»ã¹å¯è½ã§ããè¨å®ã¯ä»¥ä¸ã®éãã
- ã³ã³ãã¥ã¼ã¿å
- ãã¹ããã·ã³ã®ååãæå®ãã¾ããã²ã¹ããã·ã³(ä»®æ³ãã·ã³)ã§ã¯ãªãã®ã§æ³¨æã
- ã¦ã¼ã¶ã¼å/ãã¹ã¯ã¼ã
- èªè¨¼ã®è¨å®ãè¡ãªã£ã¦ããªãã®ã§æªè¨å®ã§ã
ãã¨ã¯ãUIã«ãããã£ã¦OSãã¤ã³ã¹ãã¼ã«ããã°OKã§ãããªããããã©ã«ãã®ç¶æ ã ã¨ããã¦ã¹ã«ã¼ã½ã«ãããã(æ©ãåããã¨å è¡ãããã£ããåããã¨å¾ã ã«é ããã»ã»)åé¡ãããã¾ãããããGuest Additionsããã¤ã³ã¹ãã¼ã«ããã°è§£æ¶ããã¾ããã
ãGuest Additionsãã¯isoã¤ã¡ã¼ã¸ã§æä¾ããã¦ããã®ã§ãOSã¤ã³ã¹ãã¼ã«å¾ã«ä»®æ³ãã·ã³ã§ãã¦ã³ããã¦ãã£ã¹ã¯å ã®ãVBoxWindowsAdditions.exeããå®è¡ããã°OKã
$ VBoxManage registerimage dvd /usr/share/virtualbox/VBoxGuestAdditions.iso $ VBoxManage modifyvm "WindowsServer2008" -dvd /usr/share/virtualbox/VBoxGuestAdditions.iso