Skip to content

Instantly share code, notes, and snippets.

@Elliria
Last active August 18, 2023 14:53
Show Gist options
  • Save Elliria/9e1bd64c1cfa4ed1a7d6d1bfbad6bc98 to your computer and use it in GitHub Desktop.
Save Elliria/9e1bd64c1cfa4ed1a7d6d1bfbad6bc98 to your computer and use it in GitHub Desktop.

VirtualBox Installation and Use

One of the popular virtual-machine programs is VirtualBox. Below are basic instructions for installing it and using it.

Installation

  1. Go to the VirtualBox LinuxDownloads page.
  2. Click your GNU/Linux distribution's name in the list to download a .deb file.
  3. Click the SHA256 checksums link to download a list of SHA checksums.
  4. Click the MD5 checksums link to download a list of MD5 checksums.
  5. Open a terminal window in the download folder on your computer.
  6. Run this command to generate the SHA checksum for the .deb file you downloaded: sha256sum virtualbox*.deb
  7. Compare the result with the SHA checksum matching your Linux distribution in the SHA256SUMS file you downloaded to make sure they're identical. If they're not, delete the .deb file and go back to step 2 above.
  8. Run this command to generate the MD5 checksum for the .deb file you downloaded: md5sum virtualbox*.deb
  9. Compare the result with the MD5 checksum matching your Linux distribution in the MD5SUMS file you downloaded to make sure they're identical. If they're not, delete the .deb file and go back to step 2 above.
  10. Install VirtualBox by double-clicking the .deb file in your file manager or by running this command: sudo dpkg -i Virtual*.deb
  11. Install the dependencies for VirtualBox and configure VirtualBox with this command: sudo apt-get install -f
  12. Once VirtualBox is installed, you should find a shortcut to it in your main menu (possibly in the System section of your menu under the name of Oracle VM VirtualBox).

Use

  1. Download an .iso file from a Linux distribution onto your host computer (from Ubuntu, for example).
  2. Put the ISO into your default machine folder (if you don't remember where that is, click the File menu in VirtualBox, choose Preferences... from the context menu, and look in the Default Machine Folder text box.
  3. Open VirtualBox.
  4. Click the New entry in the Machine menu or click the New button in the center panel.
  5. Give your virtual machine a meaningful name.
  6. Click the ISO Image drop-down arrow and choose the ISO you just downloaded.
  7. Put a check-mark in the Skip Unattended Installation box.
  8. Click the Next button.
  9. Examine and optionally adjust your hardware settings.
  10. Click the Next button.
  11. Examine and optionally adjust the Virtual Hard disk settings.
  12. Examine the Summary and click the Next button if you're satisfied or click the Back button and make changes.
  13. Double-click the new virtual machine in the left pane of VirtualBox.
  14. Follow the on-screen instructions to install the operating system in the virtual machine.

Troubleshoot a known issue in VirtualBox

If VirtualBox gives you a Spectre v2 and RETBleed warning about data leaks when you boot into a VM:

  1. Shut down the VM completely (if offered, not in a save-state).
  2. Issue this command in a terminal window on your host computer, replacing FOO with your VM's name:
    VBoxManage modifyvm "FOO" --spec-ctrl on
    
    What it does: The --spec-ctrl on|off option enables or disables the exposure of speculation control interfaces to the guest if they're available on the host. Depending on the host CPU and workload, enabling speculation control may significantly reduce performance. Note that it didn't seem to reduce performance for me and it solved the issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment