# VirtualBox筆記

#### 指令使用無標頭啟動（headless）

```
VBoxManage startvm "VM名稱|uuid" --type headless

VBoxHeadless --startvm {VM名稱|uuid}
```

### 問題處理

##### l開啟虛擬機出現kernel driver not installed(rc=-1908)

執行虛擬機出現以下圖示

[![Screenshot at 2025-04-25 10-29-13.png](https://book.4inlibra.com/uploads/images/gallery/2025-04/scaled-1680-/screenshot-at-2025-04-25-10-29-13.png)](https://book.4inlibra.com/uploads/images/gallery/2025-04/screenshot-at-2025-04-25-10-29-13.png)

使用root或sudo執行下方指令進行virtualbox設定

```
sudo /sbin/vboxconfig
```

會出現下方回應

[![image.png](https://book.4inlibra.com/uploads/images/gallery/2025-04/scaled-1680-/image.png)](https://book.4inlibra.com/uploads/images/gallery/2025-04/image.png)

這是因為安裝的時候少了一些重要核心程式所致

安裝以下套件

```
sudo apt install build-essential dkms

sudo apt install linux-headers-generic-hwe-24.04
```

備註：Linux-headers-generic-hwe要注意一下host本機系統版本

完成後在執行

```
sudo /sbin/vboxconfig
```

出現以下完成圖示

[![image.png](https://book.4inlibra.com/uploads/images/gallery/2025-04/scaled-1680-/cIiimage.png)](https://book.4inlibra.com/uploads/images/gallery/2025-04/cIiimage.png)

#### 虛擬機無法使用usb

將host的使用者加入vboxusers群組即可。