Optimizing VirtualBox for Debian 11 running SWGEmu

Enhance the speed and performance of your Debian 11 virtual machine by configuring VirtualBox with optimal settings.


1. VirtualBox Settings Configuration

When creating or configuring your Debian 11 VM in VirtualBox, adjust the following settings:

a. General Setup

b. System Settings

  1. Motherboard Tab:
  2. Processor Tab:
  3. Acceleration Tab:

c. Display Settings

d. Storage Settings

  1. Storage Devices:
  2. Disk Type:
  3. Host I/O Cache:

e. Network Settings


2. Creating the Virtual Machine

Proceed with the following steps to create your Debian 11 VM:

a. Name and Operating System

b. Memory Size

c. Hard Disk


3. Install VirtualBox Guest Additions

Enhance VM performance and usability by installing Guest Additions.

Note: You might have to add your new swgemu account to the /etc/sudoers file before you can run sudo commands. You can do this by logging in as root instead of the swgemu account, then editing the file.

a. Update the System

sudo apt update && sudo apt upgrade -y

b. Install Required Packages

This command installs essential packages for building kernel modules and header files necessary for Guest Additions to work correctly.

sudo apt install build-essential dkms linux-headers-$(uname -r) -y

c. Insert Guest Additions CD Image

d. Run the Installer

sudo sh /media/cdrom/VBoxLinuxAdditions.run

e. Reboot the VM

sudo reboot

4. Optimize Debian 11 Settings

a. Adjust Swappiness

Reduce the swappiness value to prevent the system from using swap space too aggressively, which can slow down performance.

echo 'vm.swappiness=10' | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

b. Disable Unnecessary Services

Identify and disable services you don't need to free up system resources.

Identify Enabled Services:

systemctl list-unit-files --type=service | grep enabled

Disable a Service:

sudo systemctl disable <service_name>

Replace <service_name> with the actual name of the service you wish to disable.


5. Additional Tips


Conclusion

By adjusting these VirtualBox settings and optimizing Debian 11, you can significantly enhance your VM's speed and performance. Remember to balance resource allocation to ensure your host system remains responsive.

Note: Always monitor your host system's performance and adjust VM settings accordingly to prevent over-allocation of resources.