edit virtualbox

This commit is contained in:
Malin Freeborn 2025-03-05 16:46:46 +01:00
parent 3bfeacd2d7
commit 0d76eb0531
Signed by: andonome
GPG Key ID: 52295D2377F4D70F

View File

@ -1,21 +1,16 @@
--- ---
title: "virtualbox" title: "virtualbox"
tags: [ "system" ] tags: [ "system" ]
requires: [ "Managing Groups" ]
--- ---
# Setup # Setup
## Arch Linux Load the modules (or just reboot):
```sh ```sh
sudo pacman -S virtualbox-host-modules-arch virtualbox-guest-iso su root
``` modprobe vboxdrv
vboxreload
```sh
sudo modprobe vboxdrv
```
```sh
# vboxreload
``` ```
Make dd image into vdi Make dd image into vdi
@ -30,7 +25,13 @@ If this doesn't work, try to make a new bite size with just
sudo dd if=image.dd of=image2.dd bs=512 conv=sync sudo dd if=image.dd of=image2.dd bs=512 conv=sync
``` ```
## CLI Management ## Arch Linux
```sh
pacman -S virtualbox-host-modules-arch virtualbox-guest-iso
```
# CLI Management
List boxes: List boxes:
@ -50,22 +51,19 @@ To pause the machine:
VBoxManage controlvm "rata" pause --type headless VBoxManage controlvm "rata" pause --type headless
``` ```
You can do a number of things to virtualboxes this way: You can do a number of things to the 'virtual boxes' this way:
- startvm - `startvm`
- `pause`
- pause - `resume`
- `poweroff`
- resume
- poweroff
## Creating Disks ## Creating Disks
Creating a VM requires registering it: Creating a VM requires registering it:
```sh ```sh
VBoxManage createvm --name Ubuntu19.04 --register --ostype Ubuntu VBoxManage createvm --name Ubuntu19.04 --register --ostype Ubuntu
``` ```
```sh ```sh
@ -78,6 +76,7 @@ VBoxManage storagectl Ubuntu19.04 -name IDE --add ide --controller PIIX4 --boot
Create just a disk with: Create just a disk with:
VBoxManageg createhd --filename Ubuntu16.04 --size 5120 ```sh
VBoxManage createhd --filename "$diskname" --size 5120
```