Perform Unattended VM Installation on VirtualBox 7

0
31

What is VirtualBox unattended installation? Follow through this tutorial to learn how to perform unattended VM installation on VirtualBox 7. VirtualBox provides a feature that enables you to provide required OS parameters when you are creating a VM and automatically install it with minimal interactions. According to VirtualBox 7.0 changelog, this feature has been reworked on, “Reworked the new vm wizard to integrate the unattended guest OS installation and to have a more streamlined work flow“. Most of the OS distributions support unattended installation feature while some doesn’t support it out of the box, at least from what I found out!

Perform Unattended VM installation on VirtualBox 7

So, how you can you perform unattended VM installation on VirtualBox 7?

You can do unattended VM installation using vboxmanage command;

Automate Virtual Machine Installation on VirtualBox

Or, utilize the unattended install feature of VirtualBox 7.x manager. For this, method, you need to upgrade VirtualBox 6.x to 7.x;

Upgrade VirtualBox 6.x to VirtualBox 7.x on Ubuntu/Debian

In this tutorial, we will use VirtualBox 7 manager to demonstrate how you can be able to perform unattended VM installation. As already mentioned above that we found out that some OS distros didnt support this feature from what we gathered, we will be using Ubuntu 22.04 LTS desktop to demonstrate the VirtualBox 7 unattended guest OS installation.

Thus;

Create New VirtualBox VM

Just like you would always create a VM, create your new guest vm on VirtualBox manager by either pressing Ctrl+N or by navigating to Machine > New menu options.

New VM creation wizard launches;

  • Proceed to provide a descriptive name
  • destination folder for the new virtual machine.
  • Additionally, you can select an ISO image which may be used to install the guest operating system.
  • OS type and version should automatically be detected. If not, choose the appropriate values!
Perform Unattended VM Installation on VirtualBox 7

VirtualBox 7.x enables unattended Guest OS installation feature by default. So ensure the option “Skip Unattended installation” remains unchecked!

Define Unattended Guest OS Installation Parameters

In the next step, you need to provide unattended guest OS installation parameters such as;

  • username (set to vboxuser by default)
  • password (set to changeme by default)
  • hostname
  • domain name
  • Additionally you can enable guest additions install (Check the Guest Additions checkbox and select the correct path on your hos to the Guest Additions ISO file).
  • For Microsoft Windows guests it is possible to provide a product key.
  • If you want to install in the background, enable that option.
unattended os install parameters

Set the VM RAM and DISK

In the next page, set the VM and disk.

Start VirtualBox 7 VM unattended Install

Go through the summary and click Finish to start unattended VM installation;

Perform Unattended VM installation on VirtualBox 7

And that is it. Go get your coffee and wait for the VirtualBox guest OS unattended installation to complete!

Once the installation is done, login to your vm!

perform unattended VM installation on VirtualBox 7

Note that with VirtualBox 7 unattended installation method, the user created will not have sudo rights.

However, root password is set to the same password for the user that we created. So to give sudo rights to the non root user you created with unattended installation, simply switch to root;

su -

Login with the same password as for the user;

Next, assign the user sudo rights;

usermod -aG sudo <username>

And it looks like you need to reboot the system to effect the sudo rights assignment for the user.

systemctl reboot -i

And that is it. That marks the of our tutorial on how to perform unattended VM installation on VirtualBox 7.

Other Tutorials

Create and Upload Custom Linux Image into OpenStack

Deploy OpenStack using DevStack on Ubuntu 22.04/Ubuntu 20.04

LEAVE A REPLY

Please enter your comment!
Please enter your name here