Difference between revisions of "SRT210 Lab 2"

From CDOT Wiki
Jump to: navigation, search
Line 1: Line 1:
VM/Settings/Processors: enable Virtual Intel VT-X/EPT or AMD-V/RVI.
+
= Objectives =
change to 4gb ram
 
  
yum install qemu-kvm qemu-img virt-manager libvirt libvirt-python \
+
* Set up a nested virtual machine
libvirt-client virt-install virt-viewer bridge-utils
 
  
network install https://mirror.senecacollege.ca/centos/7/os/x86_64/ or http://mirror.netflash.net/centos/7/os/x86_64/
+
= PART 1: NESTED VIRTUAL MACHINE =
2G ram
 
10G drive
 
NAT
 
lin1
 
  
To disable and remove firewalld, issue the following commands:
+
Since we're forced to use a Windows machine as the main VM host, we're going to have to set up nested virtualisation. Luckily that's not too difficult.
systemctl disable firewalld
 
systemctl stop firewalld
 
yum remove firewalld
 
  
To install and enable the IPTables services, issue the following commands:
+
* Change the settings for your c7host to have at least 4GB of RAM, and enable "Virtual Intel VT-X/EPT or AMD-V/RVI" under VM/Settings/Processors.
yum install iptables-services
+
* Install the following packages: qemu-kvm qemu-img virt-manager libvirt libvirt-python libvirt-client virt-install virt-viewer bridge-utils
systemctl enable iptables
+
* Make sure (using <code>systemctl enable</code>) that the libvirtd service starts at boot.
systemctl start iptables
+
* Those will include both the KVM hypervisor and Virt Manager, which is a graphical tool used to administer it.
 +
* Create a new virtual machine with the following settings:
 +
** Will be installed from the network: https://mirror.senecacollege.ca/centos/7/os/x86_64/ or http://mirror.netflash.net/centos/7/os/x86_64/
 +
** 2GB of RAM
 +
** 10GB of disk
 +
** NAT for networking
 +
** hostname lin1
 +
** Minimal install
 +
 
 +
After you're done - you'll have a command-line-only CentOS machine (lin1) running inside a graphical CentOS desktop (c7host).
 +
 
 +
= PART 2: IPTABLES =
 +
 
 +
CentOS comes with firewalld installed by default. We will not be using that, instead we'll do all our firewall work with iptables. Therefore we'll need to uninstall firewalld and install iptables management tools:
 +
 
 +
* Use systemctl to stop firewalld and disable it from starting on boot.
 +
* Use yum to uninstall firewalld and install iptables-services
 +
* Use systemctl to start the iptables service and configure it to be started on boot.

Revision as of 20:29, 13 January 2019

Objectives

  • Set up a nested virtual machine

PART 1: NESTED VIRTUAL MACHINE

Since we're forced to use a Windows machine as the main VM host, we're going to have to set up nested virtualisation. Luckily that's not too difficult.

  • Change the settings for your c7host to have at least 4GB of RAM, and enable "Virtual Intel VT-X/EPT or AMD-V/RVI" under VM/Settings/Processors.
  • Install the following packages: qemu-kvm qemu-img virt-manager libvirt libvirt-python libvirt-client virt-install virt-viewer bridge-utils
  • Make sure (using systemctl enable) that the libvirtd service starts at boot.
  • Those will include both the KVM hypervisor and Virt Manager, which is a graphical tool used to administer it.
  • Create a new virtual machine with the following settings:

After you're done - you'll have a command-line-only CentOS machine (lin1) running inside a graphical CentOS desktop (c7host).

PART 2: IPTABLES

CentOS comes with firewalld installed by default. We will not be using that, instead we'll do all our firewall work with iptables. Therefore we'll need to uninstall firewalld and install iptables management tools:

  • Use systemctl to stop firewalld and disable it from starting on boot.
  • Use yum to uninstall firewalld and install iptables-services
  • Use systemctl to start the iptables service and configure it to be started on boot.