CEW Pranathi K (0511) - Task 3,4
CEW Pranathi K (0511) - Task 3,4
CEW Pranathi K (0511) - Task 3,4
Task 3
Individually set up and configuring a new Virtual Machine and Exporting and packaging
an existing Virtual Machine into a portable format. Write a short note on basic commands and
system administration in Linux, including basic Linux commands in bash, ping, ssh, ifconfig,
scp, netstat, ipstat, nslookup, traceroute, telnet, host, ftp, arp, wget, route.
Virtual Machine
The open-source virtualization software VirtualBox lets you virtualize computers based
on the x86 architecture. This software functions as a hypervisor, creating a virtual machine (VM)
in which another OS (operating system) can run. Host OS refers to the operating system on
which VirtualBox runs. An operating system running in a virtual machine is known as a "guest"
OS. As a host operating system, VirtualBox is compatible with Windows, Linux, or macOS.
When configuring a virtual machine, the user can specify how many CPU cores, and how much
RAM and disk space should be devoted to the VM. As long as the VM is running, it can be
"paused." The system execution is frozen at that point, so the user can resume it at a later time.
VirtualBox is an open source Virtual Machine program from Oracle. It allows users to virtually
install many operating systems on virtual drives, including Windows, BSD, Linux, Solaris, and
more.
Since VirtualBox runs on Windows, Linux, and Mac, the process for setting up a virtual machine
is pretty much the same in each operating system.
Start with downloading and installing VirtualBox. You can download it at this link: VirtualBox
Downloads
You will also need to download an .iso file for the operating system that you want to run in your
virtual machine. For instance, you can download a Windows 10 .iso file here:
https://www.microsoft.com/en-us/software-download/windows10ISO
● The wizard will automatically select default settings based on the OS type and version
you selected. You can always change the settings as you go through the wizard. Just keep
clicking "Continue" and "Create" until you get through the wizard. It's usually fine to use
the defaults.
● Next, start the virtual machine you just created by clicking "Start".
● OVA file
An OVA file (Open Virtual Appliances) is a package that contains files used to describe a
virtual machine. It includes a descriptor file (.OVF), optional manifest (.MF), certificate
files, and other related files. All this data is saved in the Open Virtualization Format,
which is a standard format used to package and distribute software run in virtual
machines.
To put it simply, these files store the configuration details required to set up virtual
machines through software like VirtualBox, VMware, Microsoft System Centre Virtual
Machine Manager, and Amazon’s Elastic Compute Cloud (Amazon EC2). Let’s say you
set up a virtual machine on your PC using VMware but now you want to run it through
VirtualBox. Or you may even want to transfer it to another PC.
● Importing an OVA
1. When you have VirtualBox running, locate “File” in the top menu and click on it,
then select “Import Appliance.” VirtualBox refers to virtual machines as
appliances.
2. A new window will pop open with a field to select your .ova file. Browse to the
file you’d like to import. VirtualBox will take a few seconds to read the
information on the file.
3. The window will shift to a table that lets you choose the settings for your soon-to-
be-imported appliance. From here, you can set key features of the virtual
machine, like the amount of available memory. When you’re ready, click on the
“Import” button and let VirtualBox run the import process.
4. It can take a few minutes for VirtualBox to complete the import process
depending on the file size.
5. After the process completes, your VM will be ready to use.
● Exporting an OVA
1. Exporting OVA files may be even more important than importing them. It’s a
great way to back up and take snapshots of your VMs. Exporting your OVAs also
enables you to clone them across multiple machines or run simultaneous instances
of your VMs on the same computer.
2. Return to the “File” menu and, this time, click “Export Appliance.”
3. Export Ova File Virtual Box
4. VirtualBox will open a new window with a listing of your available virtual
machines. Select the VM you want to export.
5. Select Yourvm From Export Virtual Appliance Menu
6. The following window allows you to select the location for your exported OVA
file. These files can be very large, so make sure you have enough space available
in that destination drive to support the resulting file.
7. Export Virtual Appliance Settings
8. The next screen is the final one in the export process. Another table allows you to
attach some identifying information and specifics to your file before packing it
up. Generally, the name and description are what you’ll be using, but you can
certainly use the more detailed product fields for VMs that you intend to
distribute. Click on the “Export” button to start the export process.
9. Export Virtual Appliance Virtual System Settings
10. With everything set, VirtualBox will kick off the process of rolling your VM into
an OVA file. Depending on the size of the VM, it may take some time but
typically takes a few minutes on average.
Linux
Linux commands are utilities that are part of the Linux operating system. A command
can be used to accomplish any task, whether it is basic or advanced. A Linux terminal is used to
execute the commands. In Linux, commands are case-sensitive. The terminal is a command-line
interface to interact with the system, similar to the command prompt in Windows.
Compared to Windows and macOS, Linux provides a powerful command-line interface.
Through its terminal, we can perform basic and advanced tasks. A file can be created, deleted,
moved, and many other basic tasks can be performed. Furthermore, we can also perform
advanced tasks such as administrative tasks (such as installing packages, and managing users),
networking tasks (ssh connections), and security tasks.
Linux terminals provide various support options for users, making them user-friendly. Press
CTRL + ALT + T to open the Linux terminal, then press the 'ENTER' key to execute a
command.
Linux Commands
● Bash command
The Linux Bash is also known as 'Bourne-again Shell.' It is a command language
interpreter for the Linux based system. It is a replacement for the Bourne shell (sh). It
was developed under the GNU Project and written by Brian Fox. Nowadays, Bash is the
default user shell of most of the Linux distributions.
● Ping command
Ping is short for Packet Internet Groper. This command is mainly used for
checking the network connectivity among host/server and host. The ping command takes
the URL or IP address as input and transfers the data packet to a specified address along
with a "PING" message. Then, it will get a reply from the host/server. This time is known
as "latency".
● SSH command
In Linux, ssh is a protocol, which stands for Secure Shell or Secure Socket Shell.
The secure shell is useful for security while connecting to a remote server. The ssh
command uses a ssh protocol, which is a secure protocol, as the data transfer between the
client and the host takes place in encrypted form. It transfers the input through the client
to the host and returns the output transferred by the host. It executes through TCP/IP port
22.
● IFCONFIG command
The command ifconfig stands for interface configurator. This command enables
us to initialize an interface, assign IP address, enable or disable an interface. It displays
route and network interface.You can view IP address, MAC address and MTU
(Maximum Transmission Unit) with the ifconfig command.
● SCP command
SCP (secure copy) command in Linux systems is used to copy file(s) between
servers in a secure way. The SCP command or secure copy allows secure transferring of
files in between the local host and the remote host or between two remote hosts. It uses
the same authentication and security as it is used in the Secure Shell (SSH) protocol. SCP
is known for its simplicity, security and pre-installed availability.
● NETSTAT command
Linux netstat command stands for Network statistics. It displays information
about different interface statistics, including open sockets, routing tables, and connection
information. Further, it can be used to display all the socket connections (including TCP,
UDP). Apart from connected sockets, it also displays the sockets that are pending for
connections. It is a handy tool for network and system administrators.
● IOSTAT command
The iostat command in Linux is used for monitoring system input/output statistics
for devices and partitions. It monitors system input/output by observing the time the
devices are active in relation to their average transfer rates. The iostat produce reports
may be used to change the system configuration to balance the input/output between the
physical disks. iostat is being included in the sysstat package. If you don’t have it, you
need to install it first.
● NSLOOKUP command
Nslookup (stands for “Name Server Lookup”) is a useful command for getting
information from the DNS server. It is a network administration tool for querying the
Domain Name System (DNS) to obtain domain name or IP address mapping or any other
specific DNS record. It is also used to troubleshoot DNS-related problems.
● TRACEROUTE command
Linux traceroute command is a network troubleshooting utility that helps us
determine the number of hops and packets traveling path required to reach a destination.
It is used to display how the data is transmitted from a local machine to a remote
machine. Loading a web page is one of the common examples of the traceroute. A web
page loading transfers data through a network and routers. The traceroute can display the
routes, IP addresses, and hostnames of routers over a network. It can be useful for
diagnosing network issues.
● TELNET command
In Linux, the telnet command is used to create a remote connection with a system
over a TCP/IP network. It allows us to administrate other systems by the terminal. We
can run a program to conduct administration.It uses a TELNET protocol. However, this
protocol has some security defects, but it is one of the most used networking protocols
due to its simplicity. It is not a secure protocol because it transfers data in unencrypted
form. Often Linux users prefer ssh over telnet because ssh transfers data in encrypted
form. This utility is similar to the Remote Desktop feature in Windows.
● HOST command
Linux host command displays domain name for given IP address or vice-versa. It
also performs DNS lookups related to the DNS query. The host command's default
behavior displays a summary of its command-line arguments and supported options.
● FTP command
The ftp stands for File Transfer Protocol. It connects to the remote host to
exchange files and directories from one host to another over a network which can be
LAN or any other.
● ARP command
The command arp stands for Address Resolution Protocol. It allows us to view or
add content into the kernel's ARP table.
● WGET command
Command wget stands for web get. The wget is a free non-interactive file
downloader command. Non-interactive means it can work in the background when the
user is not logged in. This allows the user to get disconnected with the system while wget
finishes its work.It can even download entire websites as a local version of remote
websites, fully recreating the structure of the original website. In short, you can mirror an
entire website with wget.It supports HTTP, HTTPs and FTP protocol. It is a freely
available package and licensed under GNU GPL. This command works on all operating
systems including MAC Os and Windows.The main feature of wget is its robustness and
recursiveness. Due to its robustness, it works even with slow internet connection. It
automatically starts downloading the file from where it was left in case of network
failure. Due to its recursiveness, it keeps trying until the file is retrieved completely.
● ROUTE command
The route command displays and manipulates the IP routing table for your
system.A router is a device which is basically used to determine the best way to route
packets to a destination.