
You could actually do this without rebooting the box, (eg. Then reboot this machine sudo reboot, login again and verify that the Same hostname, same IP address.īoot the newly cloned machine and log in as user "foo".Įdit the /etc/network/interfaces file and change the IP address.Įdit the /etc/hostname file and change the hostname.Įdit the /etc/hosts file and adjust the hostname there as well. The cloning itself will take a minute or more depending on the speed of your hard-disk and the size of the image.įrom the point of view of the VirtualBox now each machine has a name and each machine has its own disk.įrom the inside however these two machines are identical. (If it is disabled, it means your machine is still running.) On the VirtualBox management interface select your box, use the right-click Clone menu item. Shut down the Ubuntu box ( sudo shutdown -P now will work well.) Select the "System" tab, and adjust the memory. Select the machine in the VirtualBox gui. So before I cloned the boxes I configured the one I have to have only 256 Mb memory.įor this I had to shut down the linux box. If this setup is mostly to experiment with networking and/or Ansible, then we don't need that much memoryįor the boxes anyway. If our physical computer only has 4 Gb memory then you won't be able to run 4 boxes of 1 Gb each. Later on we'll be able to automate that part as well.įor now however it might be better for you to do all the steps manually so you better understand them and Just remember, currently we are doing the initial configuration manually. If you find all this work exhausting, you are right. Once we have one box ready, we can clone it, so we don't have to go over the installation and basic configuration process with each Once the box is ready, log in and upgrade it. In the /etc/network/interfaces I set the IP address to be 192.168.56.2.


I used ubuntu-ansible as the hostname of the box I installed.

The IP of the host machine will be 192.168.56.1. If you alreadyĪs a default name I used "Foo Bar" and the user "foo", so the text will assume that. Install a Virtual box using Ubuntu as described in the beginning of the Linux series. So make sure you have enough space for all the machines.įor 4 machines make sure you have at least 14 Gb space.īTW the actual disk images are by default in the ~/VirtualBox\ VMs/ on my Mac. Uses 2.3 Gb disk, but it will quickly grow to 3-3.5 Gb. We are going to set up multiple Virtual Boxes using Ubuntu Server.
