{"id":1065,"date":"2018-10-24T23:35:08","date_gmt":"2018-10-24T20:35:08","guid":{"rendered":"http:\/\/kifarunix.com\/?p=1065"},"modified":"2024-03-11T19:59:32","modified_gmt":"2024-03-11T16:59:32","slug":"automate-virtual-machine-installation-on-virtualbox","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/automate-virtual-machine-installation-on-virtualbox\/","title":{"rendered":"Automate Virtual Machine Installation on VirtualBox"},"content":{"rendered":"\n

In this tutorial, you will learn how to automate virtual machine installation on VirtualBox. Many times, not once, not twice when you would want to create virtual machine on VirtualBox. So just imagine how tedious and time consuming it is to create a VM manually every time you need a virtual lab to play with. No, that manual procedure is not for you.<\/p>\n\n\n\n

Automating Virtual Machine Installation on VirtualBox<\/h2>\n\n\n\n

To automate virtual machine creation on VirtualBox, we are going to use the unattended install<\/a><\/strong> feature of VBoxManage command. With this feature, you can get the VM automatically installed with very little human interaction while setting up installation variables.<\/p>\n\n\n\n

You can also script the whole of this procedure to achieve full blown automation.<\/strong><\/p>\n\n\n\n

Install VirtualBox on your Host system<\/h3>\n\n\n\n

To begin with, you need to have installed VirtualBox on your host system. You can check the link below on how to install VirtualBox;<\/p>\n\n\n\n

How to install VirtualBox on Linux system<\/a><\/p>\n\n\n\n

Create and Register a Virtual Machine<\/h3>\n\n\n\n

As a first step on how to automatatically install a virtual machine on VirtualBox, run the command below to create and register the vm.<\/p>\n\n\n\n

VBoxManage createvm --name ubuntu18server --ostype Ubuntu_64 --register<\/code><\/pre>\n\n\n\n

Sample output;<\/p>\n\n\n\n

Virtual machine 'ubuntu18server' is created and registered.\nUUID: 41d12b9c-10b2-46a1-8710-7f00a9a02de7\nSettings file: '\/home\/kifarunix\/VirtualBox VMs\/ubuntu18server\/ubuntu18server.vbox'<\/code><\/pre>\n\n\n\n