Difference between revisions of "Guide to install VirtualBox on GhostBSD"

From GhostBSD Wiki
Jump to: navigation, search
(Finish)
(Installing following Packages)
 
(8 intermediate revisions by 2 users not shown)
Line 10: Line 10:
  
  
<code>virtualbox-ose-5.2.34</code><br/>
+
<code>virtualbox-ose-6.1.36_1</code><br/>
<code>virtualbox-ose-additions-5.2.34</code><br/>
+
<code>virtualbox-ose-additions-6.1.36_1</code><br/>
<code>virtualbox-ose-kmod-5.2.3</code>
+
<code>virtualbox-ose-kmod-6.1.36</code>
  
===Loaded Kernel Module===
+
===Load Kernel Module===
  
 
<nowiki>#</nowiki> <code>kldload vboxdrv</code>
 
<nowiki>#</nowiki> <code>kldload vboxdrv</code>
Line 33: Line 33:
 
<code>pw groupmod vboxusers -m yourusername</code><br/>
 
<code>pw groupmod vboxusers -m yourusername</code><br/>
  
 
===Enable atapicam kernel module at boot===
 
 
Edit /boot/loader.conf file: Add the following line:
 
 
<code>atapicam_load="YES"</code>
 
  
 
===Add these lines to /etc/devfs.conf===
 
===Add these lines to /etc/devfs.conf===
Line 45: Line 39:
 
<code>perm    vboxnetctl 0660</code><br/>
 
<code>perm    vboxnetctl 0660</code><br/>
  
===Fore using USB Device===
+
===For using USB Device===
  
 
<nowiki>#</nowiki> <code>pw groupmod operator -m yourusername</code>
 
<nowiki>#</nowiki> <code>pw groupmod operator -m yourusername</code>
Line 68: Line 62:
 
'''Restart your Machine'''
 
'''Restart your Machine'''
  
'''Note:''' It is possible that the virtual machine crashes after connecting it to the host DVD device. It seems there is a bug in a older version of VirtualBox.
+
'''Note:''' It is possible that the virtual machine crashes after connecting it to the host DVD device. It seems there is a bug in a older version of VirtualBox. [https://forums.virtualbox.org/viewtopic.php?f=3&t=64160#p306005 See here.]<br/>
 +
Addition: "If you import a virtual machine from another virtualization product, the OS in that machine may expect a particular controller type and crash if it is not found." [https://www.virtualbox.org/manual/ch05.html VirtualBox 5.1. Hard Disk Controllers -> IDE]
  
 
==Further Information==
 
==Further Information==
Line 79: Line 74:
  
  
 +
==Trouble shooting==
 +
 +
There are some commands, which could help, to find the issue:
 +
 +
===Usage===
 +
 +
<code>VBoxManage [<general option>] <command></code>
 +
 +
 +
===General Options===
 +
 +
* [-v|--version]............print version number and exit
 +
* [-q|--nologo].............suppress the logo
 +
* [--settingspw <pw>].......provide the settings password
 +
* [--settingspwfile <file>].provide a file containing the settings password
 +
* [@<response-file>]........load arguments from the given response file (bourne style)
 +
 +
 +
===Commands===
 +
 +
* list [--long|-l] [--sorted|-s]       
 +
 +
vms|runningvms|ostypes|hostdvds|hostfloppies|intnets|bridgedifs|
 +
hostonlyifs|natnets|dhcpservers|hostinfo|hostcpuids|hddbackends|hdds|dvds|
 +
floppies|usbhost|usbfilters|systemproperties|extpacks|
 +
groups|webcams|screenshotformats
 +
 +
'''Example 1:''' VBoxManage list extpacks
 +
 +
* showvminfo ...............<uuid|vmname> [--details]
 +
 +
 +
'''Example 2''': VBoxManage showvminfo "Windows 7" --details
 +
 +
===If you like more info===
 +
 +
* <code>VBoxManage -help</code>
 +
 +
* [https://www.virtualbox.org/manual/ch12.html VirtualBox Chapter 12. Troubleshooting]
  
  

Latest revision as of 11:24, 12 March 2023

Welcome to Icon Disti GhostBSD.png Guide to install VirtualBox on GhostBSD.

Introduction[edit]

On this page we will collect information, tips and tricks for installing and preparation VirtualBox on GhostBSD.

Steps[edit]

Installing following Packages[edit]

virtualbox-ose-6.1.36_1
virtualbox-ose-additions-6.1.36_1
virtualbox-ose-kmod-6.1.36

Load Kernel Module[edit]

# kldload vboxdrv

Entry in /boot/loader.conf[edit]

vboxdrv_load="YES"

Entry in /etc/rc.conf[edit]

vboxnet_enable="YES"
vboxguest_enable="YES"
vboxservice_enable="YES"

User Permissions need to be manually added[edit]

pw groupadd vboxusers
pw groupmod vboxusers -m yourusername


Add these lines to /etc/devfs.conf[edit]

own vboxnetctl root:vboxusers
perm vboxnetctl 0660

For using USB Device[edit]

# pw groupmod operator -m yourusername

VirtualBox™ Host DVD/CD Access[edit]

Access to the host DVD/CD drives from guests is achieved through the sharing of the physical drives. Within VirtualBox™, this is set up from the Storage window in the Settings of the virtual machine. If needed, create an empty IDE CD/DVD device first. Then choose the Host Drive from the popup menu for the virtual CD/DVD drive selection. A checkbox labeled Passthrough will appear. This allows the virtual machine to use the hardware directly. For example, audio CDs or the burner will only function if this option is selected.

HAL needs to run for VirtualBox™ DVD/CD functions to work, so enable it in /etc/rc.conf and start it if it is not already running:

hald_enable="YES"


In order for users to be able to use VirtualBox™ DVD/CD functions, they need access to /dev/xpt0, /dev/cdN, and /dev/passN. This is usually achieved by making the user a member of operator. Permissions to these devices have to be corrected by adding these lines to /etc/devfs.conf:

perm cd* 0660
perm xpt0 0660
perm pass* 0660

Finish[edit]

Restart your Machine

Note: It is possible that the virtual machine crashes after connecting it to the host DVD device. It seems there is a bug in a older version of VirtualBox. See here.
Addition: "If you import a virtual machine from another virtualization product, the OS in that machine may expect a particular controller type and crash if it is not found." VirtualBox 5.1. Hard Disk Controllers -> IDE

Further Information[edit]


Trouble shooting[edit]

There are some commands, which could help, to find the issue:

Usage[edit]

VBoxManage [<general option>] <command>


General Options[edit]

  • [-v|--version]............print version number and exit
  • [-q|--nologo].............suppress the logo
  • [--settingspw <pw>].......provide the settings password
  • [--settingspwfile <file>].provide a file containing the settings password
  • [@<response-file>]........load arguments from the given response file (bourne style)


Commands[edit]

  • list [--long|-l] [--sorted|-s]
vms|runningvms|ostypes|hostdvds|hostfloppies|intnets|bridgedifs|
hostonlyifs|natnets|dhcpservers|hostinfo|hostcpuids|hddbackends|hdds|dvds|
floppies|usbhost|usbfilters|systemproperties|extpacks|
groups|webcams|screenshotformats

Example 1: VBoxManage list extpacks

  • showvminfo ...............<uuid|vmname> [--details]


Example 2: VBoxManage showvminfo "Windows 7" --details

If you like more info[edit]

  • VBoxManage -help