Practical Investigations On Virtual Machine Workbook 2 Assignment 7 Answer
What is a hypervisor?
Answer – a hypervisor is a software which is used to create and run virtual machines on a host machine. It is also known as a virtual machine monitor or VMM. It enables a host machine or host machine to host multiple or single virtual machines by sharing resources of the host machine or physical system. A hypervisor makes possible of efficiently use resources of a host system and provide great mobility options. As the key advantages, it offers reduces space while running multiple virtual machines, energy and maintenance need as compare to having multiple physical machines ("Hypervisor", 2018).
Investigate VirtualBox. How can you control the amount of memory and CPU time allocated to a virtual machine? Try changing the amount of memory and CPU allocated to e.g. a Debian virtual machine and investigate the effects of doing so.
Answer – VirtualBox is a product used for virtualization purpose. It can be used by home user or enterprises. It is an open-source product that is available for free to use. It has licenced under GPVv2. It is compatible to work with multiple platforms like windows, Linux or Mac systems and can support a large number of guest machines or VMs ("Oracle VM VirtualBox", 2019). We can control the amount of memory and CPU time allocation from the setting of a virtual machine. This setting will be separated for each virtual machine created where we can define separate memory and CPU limit for them. When a particular limit is set to use memory and CPU time, it is taken as an upper and lower boundary. The guest OS is now aware about this limit and can use only the limited resources only. When additional memory or CPU power is needed, the guest OS will not able to use it and tells the VMkernel to allocate additional memory for the additional processes. This approach of limiting memory or CPU power will negatively impact the performance of a virtual machine running in the VirtualBox. But only in the condition, when it need additional processing power in terms of memory and CPU ("VMware Knowledge Base", 2014).
Why might it be necessary to control the resources allocated to a virtual machine?
Answer – when a virtual machine is created, one need to specify all the required resources for a virtual machine. These allocations of resources are depending upon the type of guest operating system going to installed on the virtual box. Sizing of a virtual machine will help meeting its minimum and recommended resources requirements for memory, CPU, disk space, etc. Controlled allocation of resources to a virtual machine will help us in deploying multiple virtual machines, if needed and also maintain the performance of both host and guest virtual machines (Bradford & Bradford, 2020).
Find where the disks and settings for virtual box VMs are stored. Try moving a virtual machine from one PC to another by copying the settings and disk onto a large usb memory key and then copying these onto a different machine from the usb key. Try running the VMs on the new machine – you have just manually migrated a virtual machine from one computer to another.
Answer – the settings of a virtual box VMs are stored in the installation directory of the application that is C:\Program Files\VirtualBox while disks of the virtual machines are stored at the manually create directory to store VM disks is D:\VMs. To move a virtual machine to another system, we need to shut it down. Then go to the disk directory and copy the whole folder containing a VM, paste it to the USB drive. When copying is done, remove and insert the USB drive to another system on which VirtualBox is installed. Copy the virtual machine folder to this computer’s drive. Open VirtualBox and go to Machine > Add a virtual machine and browse for the copied virtual machine. It will ask to take ownership of the VM, click YES and the virtual machine is in working state ("How to Transfer VirtualBox Virtual Machines to Another Host easily. - wintips.org - Windows Tips & How-tos", 2018).
Investigate the different networking options available with virtual machines.
Answer – there are many networking options available with virtual machine in VirtualBox. These are (Coter, 2017) –
- Bridge networking – this networking option is used when we want that the virtual machine will use and work with the IP address of the host machine when go out. It creates a bridge with the host network and consume IP address from DHCP. It is best suited for both client and servers and for production environment.
- Host only networking – it is something like internal networking where we can define which network the guest OS will use. The VirtualBox will create a private network to be used by guest VM. IP addresses will be provided by DHCP. All guests can communicate even when the host disconnect from the external network.
- NAT – the network address translation is the default mode when a virtual machine is created. It uses a DHCP service to assign IP address to the virtual machine and uses a default gateway to go out from the network. The NAT engine will translate IP address of the VM and traffic is seeming to go out from the host machine.
- Internal networking – with this option, all traffic of the virtual machines stays within the internal network and only visible to virtual machine. All the virtual machines can see other VM but host cannot see. It needs additional network configuration and can be used with bridge networking.
- NAT with Port forwarding – with this option, NAT works with port forwarding functions. We can define port forwarding rules according to the needs of our network. An external machine can connect to the host machine with a specific port number, connections are forwarded using only that ports.