[VirtualBox] 利用指令啟動Virtual Machine

在Type 1 Hypervisor 中要啟動VM, 以前須要自行寫Program 並叫用其API 才可, 現在這些基本指令已經內建於Command 中, 並可透過指令叫用. 方法如下:

  1. 建立一個Batch 檔, 命名為VBoxVMStart.bat, 並輸入以下內容:
    @echo off
    set VMName=%1
    set VBoxManagerPath="C:\Program Files\Oracle\VirtualBox\VBoxManage.exe"
    %VBoxManagerPath% startvm %VMName% --type headless
  2. 叫用指令執行:
    VBoxVMStart.bat <<VM_NAME>>

     

About C.H. Ling 262 Articles
a .net / Java developer from Hong Kong and currently located in United Kingdom. Thanks for Google because it solve many technical problems so I build this blog as return. Besides coding and trying advance technology, hiking and traveling is other favorite to me, so I will write down something what I see and what I feel during it. Happy reading!!!

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.