How to Use the VirtualBox Unattended Installation Feature

Jack Wallen shows you how to do a silent install of Linux with the new version of VirtualBox 7.0 to make your virtual machine deployment even easier.

Modern office: portrait of a motivated black IT programmer working on a laptop.
Image: Gorodenkoff/Adobe Stock

VirtualBox 7.0 is now ready to be installed and offers a host of very important new features. One of the more impressive features is the addition of an unattended installation configuration within the GUI. Now you don’t have to run those unattended installs from the command line anymore.

SEE: 40+ Open Source and Linux Terms You Need to Know (TechRepublic Premium)

But it’s not all roses with the new feature, as there’s one aspect that can be a bit tricky. Let’s dive in and find out how it works.

What is an unattended installation?

Before we get into that, you may need to know what an unattended installation is. Simply put, you configure the installation before you start the VM, and VirtualBox takes care of everything – even creating your default user.

The only limitation of installing VirtualBox silently is that your user is not added to the sudo group. Since you cannot access the root user without sudo privileges, this can pose a problem. Fortunately there is a way out.

What you need for an unattended installation in VirtualBox

The only things you need for this are a running instance of VirtualBox 7.0 and an ISO image to use for the installation. If you still need to upgrade to VirtualBox 7.0, here’s how. You can perform an unattended installation for any Linux guest.

How to create a VM via an unattended installation

You’ll immediately notice that the VM creation wizard in VirtualBox 7.0 differs from previous iterations. You will also notice that the unattended installation step is enabled by default.

When you get to the wizard unattended installation screen (Figure A), you need to enter the username, password, hostname, and domain name.

Figure A

The setup screen for the VirtualBox Wizard unattended guest operating system installation.
The setup screen for the VirtualBox Wizard unattended guest operating system installation.

After filling out this information, click Next and you can then configure your base memory, CPU, and storage in the resulting two screens. The last screen (Figure B) displays the settings for the virtual machine.

Figure B

The virtual machine summary page for our new VM.
The virtual machine summary page for our new VM.

Click Finish and the installation will begin. You don’t need to do anything at this point, just wait for the computer to restart and present you with the login prompt. You should see the prompt for the user you added while configuring the VM. Sign in with that username and password you created and you’re there. Nearly.

That damn restriction

After a silent install you will find that your user does not have sudo access. Since you don’t have sudo access, you don’t have root user access, which means you can’t do anything that requires escalation of privilege. How are you? Here are the steps:

  1. Reboot the machine.
  2. Once the VM starts to boot, hold down the Shift key.
  3. Use the cursor keys to select Advanced Options.
  4. select tribe.
  5. If asked for a password, enter the password you created for the default user.
  6. At the root command prompt, type the following sudo usermod -aG sudo USERwhere USER is the username you created for the unattended installation.
  7. Reboot the machine using the reboot command.

Your user now has access to sudo, which means you can perform any necessary administrative tasks on your virtual machine.

Congratulations: you’ve just performed your first unattended virtual machine installation using VirtualBox.

Subscribe to TechRepublic’s How To Make Tech Work on YouTube for the latest tech advice for business professionals from Jack Wallen.

Leave a Reply

Your email address will not be published. Required fields are marked *