Installing virtualbox on windows.
1.Go to Virtualbox Download page, Click Windows hosts.
1.Open VirtualBox exe file and follow below screenshots.
1.Go to Virtualbox Download page, Click Windows hosts.
1.Open VirtualBox exe file and follow below screenshots.
Just to give you an idea, what VirtualBox might look like later, after you have created
many machines, here's another example:
Click on the
"New" button at the top of the VirtualBox Manager window. A wizard will pop up to guide you through setting up a new virtual machine (VM):
On the following pages, the wizard will ask you for the bare minimum of information that is needed to create a VM, in particular:
1.will be used for the VM's files on disk. Even though any name could be used, keep in mind that once you have created a few VMs, you will appreciate if you have given your VMs rather informative names; "ubuntu" would thus be less useful than "Windows XP SP2 with OpenOffice"..
2.For “Operating System Type”, select the operating system that you want to install later.
3.On the next page, select the memory (RAM)that VirtualBox should allocate every time the virtual machine is started. The amount of memory given here will be taken away from your host machine and presented to the guest operating system, which will report this size as the (virtual) computer's installed RAM.
Next, you must specify a virtual hard disk for your VM.
Here you have the following options:
To create a new, empty virtual hard disk, press the"New"button.
You can pick an existing disk image file.
The drop-down list presented in the window contains all disk images which are currently remembered by VirtualBox, probably because they are currently attached to a virtual machine (or have been in the past).
Alternatively, you can click on the small folder button next to the drop-down list to bring up a standard file dialog, which allows you to pick any disk image file on your host disk.
Most probably, if you are using VirtualBox for the first time, you will want to create a new disk image. Hence, press the "New" button.
This brings up another window, the “Create New Virtual Disk Wizard”, which helps you create a new disk image file in the new virtual machine's folder
VirtualBox supports two types of image files:
1.Dynamically allocated file will only grow in size when the guest actually stores data on its virtual hard disk. It will therefore initially be small on the host hard drive and only later grow to the size specified as it is filled with data.
2.A fixed-size file will immediately occupy the file specified, even if only a fraction of the virtual hard disk space is actually in use. While occupying much more space, a fixed- size file incurs less overhead and is therefore slightly faster than a dynamically allocated file
After clicking on “Finish", your new virtual machine will be created. You will then see it in the list on the left side of the Manager window, with the name you entered initially
Installing OS on the newly created VM.
As we are experimenting with ubuntu os vm, we need to download an ubuntu ISO image from ubuntu website, attach the iso file to the vm and start installation. https://www.ubuntu.com/download/server Once you have ISO downloaded, select your vm and click on settings. Go to storage pane, click on Empty optical drive, browse your ISO and attach it to the vm
Once the ISO is attached power on your vm by double clicking it or click on start button.
Follow the installation procedure and setup the vm.
Snapshots
With snapshots, you can save a particular state of a virtual machine for later use. At any later time, you can revert to that state, even though you may have changed the VM considerably since then. To take snapshot of a machine right click on the vm and click on snapshot. When you want to restore machine from snapshot, find the snapshot location on your filesystem and simply double click on it.
Virtual Machine configuration
When you select a virtual machine from the list in the Manager window, you will see a summary of that machine's settings on the right. Right click on the vm and open settings window.You can configure various configuration of the vm’s like RAM size, number of CPU’s, Network etc.
Cloning virtual machines
To experiment with a VM configuration, test different guest OS levels or to simply backup a VM, VirtualBox can create a full or a linked copy of an existing VM.[5]
A wizard will guide you through the clone process:
Full clone: In this mode, all depending disk images are copied to the new VM folder. The clone can fully operate without the source VM
Linked clone: In this mode, new differencing disk images are created where the parent disk images are the source disk images. If you selected the current state of the source VM as clone point, a new snapshot will be created implicitly. Virtualbox gives you many more features which is out of the scope of this tutorial to cover. Creating one single vm with the OS and application setup is time consuming process. You may not have great deal of issue with it if we are talking about one or two vm’s but being a devops you may need to setup lot of vm’s on regular basis. You may test your script or automation tool execution on variety of applications and for that you may have to setup multiple vm’s. One of your job is to research on tools, lots of tools and to learn and implement those tools you would be setting up lot of vm’s and even share the same setup with your team. To get around this very problem of setting up vm’s manually we can automate vm setup and management process. This is the place where I introduce to a VM lifecycle automation tool known as Vagrant.
Comments
Post a Comment