Virtualization
Virtualization
a) Briefly describe what the Domain Name Service (DNS) is and what it is
used for. Would internet work without a DNS?
• DNS is the system that translates domain names into IP addresses, which
allows users to access websites using easy-to-remember web addresses
instead of complex IP addresses.
• Yes, Internet would work even without the DNS but, users would have to
manually enter the IP address of servers.
What is a typical use case to use 'threads' in a program, when you write a
program, which acts as a server (in the client-server model)?
Exercise 7:
1. Type-1 Hypervisor:
• Runs directly on the physical hardware of the host system.
• It does not require a separate underlying operating system.
• Provides high performance and efficiency.
• It needs appropriate drivers to communicated with the hardware.
• Eg: VMware ESX, Microsoft Hyper-v
•
2. Type-2 Hypervisor:
Runs on top of a conventional operating system (the host OS).
• Requires the host OS to manage hardware resources.
• Simpler to install and configure compared to Type-1 hypervisors.
• E.g.: KVM, Virtual Box.
b) Describe the difference between Full and Para Virtualisation.
c) Describe the problems occurring with input devices (Keyboard, mouse) when
running a virtual machine. Describe possible solutions and their advantages
and disadvantages. (6 marks).
Problems:
• Input lag
• Inconsistent input
• Device Compatibility
• Mouse not visible in VM
Solutions:
• Enable hardware-assisted virtualization (e.g., Intel VT-x or AMD-V)
• update the VM's guest additions or integration services to the latest
version provided by the hypervisor to improve input device handling.
• install virtualized drivers within the guest operating system.
• Click “Right-Ctrl” Button and mouse integration feature is enabled in the
VM settings.
Exercise 8:
• COPY docker-entrypoint.sh /
This command copies the docker-entrypoint.sh file from the build context
(the directory containing the Dockerfile) to the root directory (/) in the
Docker image.
• COPY noimages.html /
This command copies the noimages.html file from the build context to the
root directory (/) in the Docker image.
• VOLUME /images
This command creates a mount point named /images for external volumes.
• WORKDIR /images
This command sets the working directory for any subsequent RUN, CMD,
ENTRYPOINT, COPY, and ADD instructions to /images.
• ENTRYPOINT ["/docker-entrypoint.sh"]
This command sets the default executable to run when the container starts
as the docker-entrypoint.sh script.
Additional:
Q: What is the difference between TCP and UDP? In which Situation would
you use which of the two protocols? (2m)
Q: What are the main reasons for using virtual machine? (3m)
# Run the container with the name "webserver" and publish port 9999
docker run --name webserver -p 9999:9999 webserver