SlideShare une entreprise Scribd logo
1  sur  11
Télécharger pour lire hors ligne
4 Ways to Manage VirtualBox
1) VirtualBox ใชงานผาน Graphic User Interface (GUI) แบบที่ใชงานตามปกติ
2) VBoxManage ใชงานผาน Command Line Interface (CLI) สามารถสั่งงานผาน
Command เลยสะดวกในการทำงานอัตโนมัติ
3) VBoxSDL ใชงานผานกราฟฟกแบบงายๆ (ไมมี Config ใหเลือก)
4) VBoxHeadless ใชงานผาน Command Line Interface (CLI) โหมดนี้จะทำตัวเปน
RDP Server [1]
VBoxManage --type headless VS. VBoxHeadless
ควรใช VBoxHeadless แทน VBoxManage --type headless เพราะดูขอผิดพลาดได และ
VBoxHeadless มีคา default เปน force start VRDE (VirtualBox Remote Desktop
Extension) ทำให Remote ไปที่ VM instance ได [2] เปน Remote ในระดับ Machine
ไมตองรอ OS พรอมทำให Config บางอยางได เชนเขา Safe mode
- ตองติดตั้ง Extensions ใน Host VM เพิ่ม
- VBoxManage ก็ทำของคลายกันไดแตเพิ่มคำสั่ง
- การใช VRDE ตอง Remote ไปที่ IP ของ Host VM (Default port : 3389)
Create new VM
VBoxManage createvm --name [ชื่อ VM] --register
* สรางแลวตอง register ดวย ไมงั้นจะไมเห็นในระบบ (แตสั่ง Register ทีหลังผาน VBoxManage
registervm '[Full path]' ก็ได)
List of VMs
VBoxManage list vms
จะพบ ชื่อ VM ภายในเครื่องหมายอัญประกาศ (Quote) และ UUID ของ VM
ในวงเล็บปกกา (Curly braces)
Show VM information
VBoxManage showvminfo [ชื่อVM]
Modify VM
VBoxManage modifyvm [ชื่อ VM] [option] [option parameters]
Ex.
VBoxManage modifyvm HomeWork --memory 512
Example options :
--name [new name]
--ostype [new ostype]
--usb [on/off]
--memory [new memory size in MB]
etc.
Create virtual disk
VBoxManage createhd --filename [ชื่อ HD] --size [ขนาด HD]
Binding virtual harddisk drive
1) VBoxManage storagectl [ชื่อ VM] --name [ชื่อตัวควบคุม]--add sata
Ex. VBoxManage storagectl HomeWork --name HWDriver --add sata
VBoxManage storageattach [ชื่อ VM] --storagectl HWDriver --type HDD
2) --port 0 --device 0 --medium [Disk full path]
Ex. VBoxManage storageattach HomeWork --storagectl HWDriver --type HDD
--port 0 --device 0 --medium /Users/dekcom/HWData.vdi
Binding virtual dvd-drive
Ex. VBoxManage storageattach HomeWork --storagectl HWDriver --type DVDDRIVE
--port 1 --device 0 --medium /Users/dekcom/Downloads/ubuntu-14.04.2-server-
amd64.iso [3]
Start VM
VBoxHeadless --startvm HomeWork
(ถาอยากใหทำงานเปน Background process ใสเวนวรรคแลวใส & ขางหลัง)
Control VM
VBoxManage controlvm [ชื่อ VM] [option] [option parameters]
Ex. VBoxManage controlvm HomeWork acpipowerbutton
Example options :
pause
resume
poweroff
draganddrop [disabled/hosttoguest]
etc.
Clone VM
VBoxManage clonevm [ชื่อ VM ตนแบบ] --name [ชื่อ VM ใหม] --register
Ex. VBoxManage clonevm HomeWork --name HomeWork2 --register
VBoxManage unregistervm [ชื่อ VM] --delete
Ex. VBoxManage unregistervm HomeWork2 --delete
Delete VM
Citations
[1] https://www.virtualbox.org/manual/ch01.html#frontends
[2] https://www.virtualbox.org/manual/ch07.html#vboxheadless
[3] http://superuser.com/questions/741734/virtualbox-how-can-i-add-mount-an-iso-image-file-from-command-line

Contenu connexe

Similaire à VBoxManage tutorial

Similaire à VBoxManage tutorial (10)

Ch12 web-app-part2
Ch12 web-app-part2Ch12 web-app-part2
Ch12 web-app-part2
 
php5new
php5newphp5new
php5new
 
Ch07 bind9-part2
Ch07 bind9-part2Ch07 bind9-part2
Ch07 bind9-part2
 
Ch06 bind9
Ch06 bind9Ch06 bind9
Ch06 bind9
 
Server Virtualization System and DR-Site / ระบบ Server Virtualization และ Dis...
Server Virtualization System and DR-Site / ระบบ Server Virtualization และ Dis...Server Virtualization System and DR-Site / ระบบ Server Virtualization และ Dis...
Server Virtualization System and DR-Site / ระบบ Server Virtualization และ Dis...
 
Linux diskless
Linux disklessLinux diskless
Linux diskless
 
Linux diskless
Linux disklessLinux diskless
Linux diskless
 
Docker 101 for developer
Docker 101 for developerDocker 101 for developer
Docker 101 for developer
 
Ch10 web servers
Ch10 web serversCh10 web servers
Ch10 web servers
 
Portable Moodle : Moodle & Server2Go
Portable Moodle  : Moodle & Server2GoPortable Moodle  : Moodle & Server2Go
Portable Moodle : Moodle & Server2Go
 

Plus de Bhuridech Sudsee

Plus de Bhuridech Sudsee (20)

Kafka for developer
Kafka for developerKafka for developer
Kafka for developer
 
Xss and sql injection
Xss and sql injectionXss and sql injection
Xss and sql injection
 
Introduction to Quantum Computing
Introduction to Quantum ComputingIntroduction to Quantum Computing
Introduction to Quantum Computing
 
$ Spark start
$  Spark start$  Spark start
$ Spark start
 
เสี่ยวเอ้อสอน Spark
เสี่ยวเอ้อสอน Sparkเสี่ยวเอ้อสอน Spark
เสี่ยวเอ้อสอน Spark
 
Jpa sa-60
Jpa sa-60Jpa sa-60
Jpa sa-60
 
18 ฝ่ามือพิชิต docker
18 ฝ่ามือพิชิต docker18 ฝ่ามือพิชิต docker
18 ฝ่ามือพิชิต docker
 
Cloud computing
Cloud computingCloud computing
Cloud computing
 
หนังสือภาษาไทย Spark Internal
หนังสือภาษาไทย Spark Internalหนังสือภาษาไทย Spark Internal
หนังสือภาษาไทย Spark Internal
 
Git ฉบับอนุบาล 2
Git ฉบับอนุบาล 2Git ฉบับอนุบาล 2
Git ฉบับอนุบาล 2
 
sample plot 3D form depth map using OpenCV
sample plot 3D form depth map using OpenCVsample plot 3D form depth map using OpenCV
sample plot 3D form depth map using OpenCV
 
illustrator & design workshop
illustrator & design workshopillustrator & design workshop
illustrator & design workshop
 
The bounded buffer
The bounded bufferThe bounded buffer
The bounded buffer
 
operating system
operating systemoperating system
operating system
 
Producer and Consumer problem
Producer and Consumer problemProducer and Consumer problem
Producer and Consumer problem
 
OPD System with ZK Grails
OPD System with ZK GrailsOPD System with ZK Grails
OPD System with ZK Grails
 
Market management with ZK Grails
Market management with ZK GrailsMarket management with ZK Grails
Market management with ZK Grails
 
Websocket & HTML5
Websocket & HTML5Websocket & HTML5
Websocket & HTML5
 
Networking section present
Networking section presentNetworking section present
Networking section present
 
Breast Cancer data mining KDD
Breast Cancer data mining KDDBreast Cancer data mining KDD
Breast Cancer data mining KDD
 

VBoxManage tutorial

  • 1. 4 Ways to Manage VirtualBox 1) VirtualBox ใชงานผาน Graphic User Interface (GUI) แบบที่ใชงานตามปกติ 2) VBoxManage ใชงานผาน Command Line Interface (CLI) สามารถสั่งงานผาน Command เลยสะดวกในการทำงานอัตโนมัติ 3) VBoxSDL ใชงานผานกราฟฟกแบบงายๆ (ไมมี Config ใหเลือก) 4) VBoxHeadless ใชงานผาน Command Line Interface (CLI) โหมดนี้จะทำตัวเปน RDP Server [1]
  • 2. VBoxManage --type headless VS. VBoxHeadless ควรใช VBoxHeadless แทน VBoxManage --type headless เพราะดูขอผิดพลาดได และ VBoxHeadless มีคา default เปน force start VRDE (VirtualBox Remote Desktop Extension) ทำให Remote ไปที่ VM instance ได [2] เปน Remote ในระดับ Machine ไมตองรอ OS พรอมทำให Config บางอยางได เชนเขา Safe mode - ตองติดตั้ง Extensions ใน Host VM เพิ่ม - VBoxManage ก็ทำของคลายกันไดแตเพิ่มคำสั่ง - การใช VRDE ตอง Remote ไปที่ IP ของ Host VM (Default port : 3389)
  • 3. Create new VM VBoxManage createvm --name [ชื่อ VM] --register * สรางแลวตอง register ดวย ไมงั้นจะไมเห็นในระบบ (แตสั่ง Register ทีหลังผาน VBoxManage registervm '[Full path]' ก็ได)
  • 4. List of VMs VBoxManage list vms จะพบ ชื่อ VM ภายในเครื่องหมายอัญประกาศ (Quote) และ UUID ของ VM ในวงเล็บปกกา (Curly braces)
  • 5. Show VM information VBoxManage showvminfo [ชื่อVM]
  • 6. Modify VM VBoxManage modifyvm [ชื่อ VM] [option] [option parameters] Ex. VBoxManage modifyvm HomeWork --memory 512 Example options : --name [new name] --ostype [new ostype] --usb [on/off] --memory [new memory size in MB] etc.
  • 7. Create virtual disk VBoxManage createhd --filename [ชื่อ HD] --size [ขนาด HD] Binding virtual harddisk drive 1) VBoxManage storagectl [ชื่อ VM] --name [ชื่อตัวควบคุม]--add sata Ex. VBoxManage storagectl HomeWork --name HWDriver --add sata VBoxManage storageattach [ชื่อ VM] --storagectl HWDriver --type HDD 2) --port 0 --device 0 --medium [Disk full path] Ex. VBoxManage storageattach HomeWork --storagectl HWDriver --type HDD --port 0 --device 0 --medium /Users/dekcom/HWData.vdi
  • 8. Binding virtual dvd-drive Ex. VBoxManage storageattach HomeWork --storagectl HWDriver --type DVDDRIVE --port 1 --device 0 --medium /Users/dekcom/Downloads/ubuntu-14.04.2-server- amd64.iso [3] Start VM VBoxHeadless --startvm HomeWork (ถาอยากใหทำงานเปน Background process ใสเวนวรรคแลวใส & ขางหลัง)
  • 9. Control VM VBoxManage controlvm [ชื่อ VM] [option] [option parameters] Ex. VBoxManage controlvm HomeWork acpipowerbutton Example options : pause resume poweroff draganddrop [disabled/hosttoguest] etc.
  • 10. Clone VM VBoxManage clonevm [ชื่อ VM ตนแบบ] --name [ชื่อ VM ใหม] --register Ex. VBoxManage clonevm HomeWork --name HomeWork2 --register VBoxManage unregistervm [ชื่อ VM] --delete Ex. VBoxManage unregistervm HomeWork2 --delete Delete VM
  • 11. Citations [1] https://www.virtualbox.org/manual/ch01.html#frontends [2] https://www.virtualbox.org/manual/ch07.html#vboxheadless [3] http://superuser.com/questions/741734/virtualbox-how-can-i-add-mount-an-iso-image-file-from-command-line