Changes

Jump to: navigation, search

OPS235 Lab 2

4,596 bytes removed, 08:35, 20 June 2016
no edit summary
|}
=INVESTIGATION 1: CREATE REMAINING SETUP FOR NESTED VIRTUAL MACHINES=
===Part 1: Configure VMware Workstation for Nested VMs ===
Although we are using VMware Workstation to run our c7host VM, we will now install and configure another virtualization package called KVM in order to install the remaining VMs for this course.
</ol>
=INVESTIGATION 2: INSTALL REMAINING VMSNESTED VIRTUAL MACHINES (KVM)=
=== Part 1: Installing VM from a Downloaded Image Network (Centos7 LIVE CDGraphical) ===
:'''VM Details:'''
:: '''VM Name (and hostname):''' centos1:: '''Boot media:''' LIVE DVD ImageNetwork installation:: '''Gnome Live DVD iso FileCentos Full Network Install URL:''':::*Download at Seneca CollegeLab: http://belmont.senecac.on.ca/centos/7/isosos/x86_64/CentOS-7-x86_64-LiveGNOME-1511.iso:::*Download outside Seneca CollegeHome: http://mirror.csclub.uwaterloo.ca/centos/7/isosos/x86_64/CentOS-7-x86_64-DVD-1511.iso 
:: '''VM Image Pathname:''' /var/lib/libvirt/images/centos1.qcow2
:: '''Memory:''' 2GB2048MB:: '''Disk space:''' 10GB:: '''File System (root partition):''' ext415GB
:: '''CPUs:''' 1
:'''Perform the following steps:'''
{{Admon/important|Removing VMs|If for some reason # Create the VM (called '''centos2''') as you want to remove a Virtual Machine, they can right-click did with the VM''c7host'' machine, and select delete in except for the Virtual Machine Manager. It is recommended to following differences:<ol type="a"><li>Select '''Network Installation'''using the installation source URL displayed above.</li><li><span style="background-color:yellow;"delete >When customizing your partitions, do the image file" same operation that you did in c7hsot (with '''Gnome Desktop''' software selection), but instead of creating the remove VM dialog box when removing partitions yourself, have then automatically create, and then recreating a VMthe / partition to use the '''ext4'''file system). Note: If you fail </span><br><br></li></ol># Complete the installation. Login to properly remove the VM image fileyour regular user account, it may affect the hard disk size and perform a '''yum update''' for the new centos2 VM (i.e. use the old smaller sizereboot if required). Make certain to remove that VM image file prior adjust your screen-saver settings if desired.# <span style="background-color:yellow;">Repeat the steps as you did to recreating '''start the VM. SSH service'''Sometimes, you may need '''set iptables to use accept connections via ssh''', '''test connections between centos2 and centos1''', '''disable SELinux''' and perform a '''yum update'''.</span># Record the rm command time taken to manually remove install, and compare this file!'''}}to the time taken by the previous installations in your lab2 logbook.
[[Image:vm-path.png|thumb|right|300px|When installing your centos1 VM from the Gnome Live iso, the Linux system will boot graphically, You are then required to double-click the icon called: '''Install to Hard Drive'''.]]
# Make certain you used the wget command to download the LiveGNOME iso file from the Belmont server (from previous instructions).
# In the Virtual Machine Manger, click on the icon to '''Create a Virtual Machine''' in the upper-left corner:
# A window will appear with the title '''New VM'''. There are several steps to be completed:<ol type="a"><li>Select '''Local install media''' and click '''Forward'''.</li><li>Select '''Use ISO Image''', followed by the '''Browse''' button, and then the '''Browse Local''' button. Navigate to the location of the downloaded Centos7 LIVE CD image, select the image file and click '''Open'''. When finished, click '''Forward''' to proceed.</li><li>Set the memory to '''2048 MB''' and the number of CPUs to '''1'''</li><li>You will then be prompted to enter a size for the virtual machine's disk drive. Select a size of '''10 GB''' and then click '''Forward''' to proceed.</li><li>Enter the virtual machine name: '''centos1'''. Review the VM information, and click '''Finish'''.</li></ol>
<ol><li value="4">The virtual machine will boot as a '''Live User'''. This means that the Linux OS is just running temporarily. In order to install the LInux OS on your VM, double-click on the icon labelled:'''Install to Hard Drive'''.</li><li>Start timing this install.</li><li>The installation program, similar to the one used when installing CentOS in Lab 1, will appear (Including '''Gnome Desktop''' software configuration). You basically perform the same installation operations for this VM including for '''Date & Time''', '''Network & Hostname''', and '''Installation Destination'''. Make certain to use the '''hostname''': '''<u>centos1</u>''' as opposed to ''c7host'') for this installation. </li><li><span style="background-color:yellow;">For '''Installation Destination''', select the destination option: '''I will configure partitioning''' and then click '''Done'''. Make certain that the '''Partition Scheme''' is set to '''LVM''' and then click on the link: '''Click to Create Automatically'''. '''Done'''. Check to make certain that the root partition has file system type: '''ext4'''.</span></li><li>Accept the changes and then click '''Begin Installation'''.<ol type="a"><li>You will be required to make selections very similar to what you did in lab1.</li><li>While the system is installing, take a few minutes to record your observations (including slight differences with centos1 install as opposed to c7host install).</li><li>When the installation process is complete, note the time required to install this system and record in the installation comparison chart of your lab2 logbook.<br><br></li></ol></li><li>Power-off your Centos7 LIVE system.</li><li>You should notice that the Centos7 boot menu appears. Either press '''ENTER''' to start or wait for it to start automatically.</li><li>Finish the final steps in the setup process (like you did in lab1).</li><li>It is recommended to turn off the screen-saver (like you did in Lab1): [http://zenit.senecac.on.ca/wiki/index.php/OPS235_Lab_1_-_CentOS7#Customizing_Your_Account How to Turn-off Screen Saver (lab1)]</li>
<li>Enable SSH access to your virtual machine with these commands (semi-colon allows commands to be run in sequence):<br /> <b><code><span style="color:#3366CC;font-size:1.2em;">service sshd start; chkconfig sshd on</span></code></b></li>
<li>Find out the IP address of your virtual machine and the name of your Ethernet network adaptor: <b><code><span style="color:#3366CC;font-size:1.2em;">ifconfig</span></code></b> </li>
<li>Enter the following command on your virtual machine to create a firewall exception to allow ssh traffic into the machine:<br /> <b><code><span style="color:#3366CC;font-size:1.2em;">iptables -I INPUT -p tcp -s0/0 -d0/0 --dport 22 -j ACCEPT</span></code></b></li><li>If you are logged in as root, logout to your regular user account.</li><li>Confirm that you can ssh to your virtual machine from the host (your main CentOS installation): <b><code><span style="color:#3366CC;font-size:1.2em;">ssh regularuserid@IPaddress</span></code></b> (where '''regularuserid''' is your regular user login id, and '''IPaddress''' is the '''IP_ADDRESS''' of your '''centos1''' VM!).</li><li><span style="background-color:yellow;">Make certain to '''disable SELinux for centos1''' (refer to lab1)</span></li><li><span style="background-color:yellow;">Adjust your screen-saver settings and run a '''yum update''' on your centos1 VM.</span></li><li>Record the time taken to install, and compare this to the time taken by the previous installations. Record your findings in the Installation Comparison chart in lab2 logbook.</li></ol>
# Complete the installation. Login to your regular user account, and perform a '''yum update''' for the centos2 VM (reboot if required). Make certain to adjust your screen-saver settings if desired.
# <span style="background-color:yellow;">Repeat the steps as you did to '''start the SSH service''', '''set iptables to accept connections via ssh''', '''test connections between centos2 and centos1''', '''disable SELinux''' and perform a '''yum update'''.</span>
# Record the time taken to install, and compare this to the time taken by the previous installations. Record in your findings in the Installation Comparison chart in lab2 logbook.
# <span style="background-color:yellow;">Repeat the steps as you did to '''start the SSH service''', '''set iptables to accept connections via ssh''', '''test connections between centos3 and centos1''', '''disable SELinux''', and perform a '''yum update'''.</span>
# Remember that centos3 is text-based interface only (no graphics). To recover from a blank screen, press a key (like the SPACE key) to return to the screen display.
# Record the time taken to install, and compare this to the time taken by the previous installations. Record in your findings in the Installation Comparison chart in lab2 logbook.
=INVESTIGATION 2: ESSENTIAL MANAGING VIRTUAL MACHINE OPERATIONSMACHINES (KVM)=
::&#x2713; '''<u>All</u> VMs''':<blockquote><ul><li>All 4 VMs '''created''' and '''running'''</li><li> Proof of '''yum updates''' on ALL VMs (i.e. results from '''yum update''' command)</li></ul></blockquote>
::<span style="color:green;font-size:1.5em;">&#x2713;</span>'''centos2 VM''':<blockquote><ul><li>Output from running the '''lab2-check.bash''' script with all OK messages</li></ul></blockquote>
::<span style="color:green;font-size:1.5em;">&#x2713;</span> Lab2 logbook notes and '''Installation Comparison chart''' completed.
= Practice For Quizzes, Tests, Midterm &amp; Final Exam =
13,420
edits

Navigation menu