Setup Wizard will appear and click at Next button.Įnter your Virtual Machine name, and choose your guest OS and architecture (32- vs.
iso from the virtual optical disk drive before restarting the VM.
They all have user foo and the same password. As these machines were all cloned from one single machine, It will first ask for a yes and then for a password.
ING 192.168.56.11 (192.168.56.11) 56(84) bytes of data.Ħ4 bytes from 192.168.56.11: icmp_seq=1 ttl=64 time=0.806 msĦ4 bytes from 192.168.56.11: icmp_seq=2 ttl=64 time=0.448 msįrom now on we are going to work on the main machine only and we'll want to be able to access the boxes using sshįrom the main machine without typing in a password. Once you logged in to the main machine, check if you can ping the IP address of each one of the other boxes.
Once you have all the machines configured and checked you can see how the whole system works as a remote system.įrom your host machine (your Windows or OSX machine) ssh to the main ubuntu machine using the command line ssh client on OSX: Verify Networking among the Virtual boxes I make sure that the VirtualBox name (the one that we can see in the GUI of VirtualBox) and the hostname internally are the same for every machine. That verifies that even after reboot the values will be set as we wanted them. with sudo hostname your-new-name)īut it is cleaner that we do it with a reboot. 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.