Changes

Jump to: navigation, search

OPS245 Lab 2

341 bytes added, 9 March
no edit summary
{{Admon/caution|DO NOT USE THIS VERSION OF THE COURSE. This page will no longer be updated.|'''Debian version here:''' https://seneca-ictoer.github.io/OPS245
<br>'''CentOS version here:''' https://seneca-ictoer.github.io/OPS245-C7<br>'''Andrew's version here:''' http://wiki.littlesvr.ca/wiki/OPS245_Lab_2}}
= LAB PREPARATION =
[[Image:vmware-1a.png|thumb|right|400px|At the end of lab2, your VMware Workstation application will contain '''4 virtual machines''' ('''c7host''' in your '''VMware Workstation''' application, and '''centos1, centos2, centos3 VMs''' in your '''KVM''' application). You will now have the option to run one virtual machine at a time, or run all machines simultaneously to learn about networking (covered in later labs) ]]
# <span style="background-color:yellow;">Enter the name: '''centos1''', <u>AND</u> then select the option: '''Customize configuration before install''', and click '''Finish'''.</span>
# <span style="background-color:yellow;">Another dialog will appear. Click '''CPUs''' (or "processors") and on right-side under Configuration select '''Copy Host CPU Configuration''', click '''Apply''', and then click '''Begin Installation''' at the top left-hand side.</span>
#<span style="background-color:yellow;">During the install, select '''Gnome Desktop''' (software selection). For partitioning, select '''I will configure partition settingspartitions'''settings, click done, then select '''Click here to create them automatically'''. Set the / partition for '''ext4''' file-system type, and click '''Done'''.</span>
#<span style="background-color:yellow;">Set the correct '''Date and Time Zone''', and then click on '''Network and Hostname'''. The network should be turned '''ON'''. For hostname, enter: '''centos1''' and then click '''Done'''.</span>
# <span style="background-color:yellow;">Make sure that when you create your regular user account you check the box to make them an administrator.</span>
{| width="40%" align="right" cellpadding="10"
|- valign="top"
|colspan="2"|{{Admon/important|Using a Kickstart file with a local install|Under most circumstances, a network install would be drawing the installation data from a server in the local network, allowing it to transmit data at higher speeds than we can achieve over the internet. If your download speed is slow enough that network installs are failing, it is acceptable to install these VMs from local media. However, you will still need to provide a kickstart file to Centos3. <br /><br />To do so, start the install process as normal for an installation from an iso file, but when presented with the menu giving you the option to 'Install CentOS 7' or 'Test this media &amp; install CentOS 7', highlite highlight 'Install CentOS7' and press '''&lt;tab&gt;'''. This will open a prompt at the bottom of the window for you to enter grub configuration options. Type '''inst.ks&#61;https://ictraw.senecacollegegithubusercontent.cacom/~ops245OPS245/labs/main/centos7-kickstart-local.cfg''' andf and hit '''&lt;enter&gt;'''.}}
|}
:::*Home: http://mirror.netflash.net/centos/7/os/x86_64/
:: '''Kickstart File URL (Kernel options): '''
:::* Home:''' <span style="color:green;font-weight:bold">ks=</span>https://ictraw.senecacollegegithubusercontent.cacom/~ops245OPS245/labs/main/centos7-kickstart.cfg
:: '''VM Image Pathname:''' /var/lib/libvirt/images/centos3.qcow2
:: '''Memory:''' 2048MB ('''IMPORTANT''' Do not use less than 2048MB during installation.)
# Create the VM (called '''centos3''')
# During the install, copy the network URL, then click the '''URL options''' to expand the '''kernel options''' input textbox. Type the following in the kernel options textbox: <ul><li><span style="color:green;font-weight:bold">ks=</span>https://ictraw.senecacollegegithubusercontent.cacom/~ops245OPS245/labs/main/centos7-kickstart.cfg</li></ul>
# Then click the '''forward''' button to proceed. Make certain to select the correct Memory Size and Disk Space size shown in the VM Details above
# Make certain to enter the name: '''centos3''', <u>AND</u> then select the option: '''Customize configuration before install''', and select '''Copy Host CPU Configuration''', click '''Apply''', and then click '''Begin Installation'''.
# We will now learn how to download a compressed image file and XML configuration file and add it as a VM to the Virtual Machine Manager menu.
# Issue the following commands:<ul><li><b><code><span style="color:#3366CC;font-size:1.2em;">wget https://ictmatrix.senecacollege.ca/~ops245/centos4.qcow2.backup.gz</span></code></b></li><li><b><code><span style="color:#3366CC;font-size:1.2em;">wget https://ictmatrix.senecacollege.ca/~ops245/labs/centos4.xml</span></code></b></li></ul>
# Use gunzip with elevated privileges to decompress the qcow2 image file into the '''/var/lib/libvirt/images''' directory.
# Issue the command: <b><code><span style="color:#3366CC;font-size:1.2em;">sudo virsh define centos4.xml</span></code></b>
# Inside each virtual machine, run <b><code>ip a</code></b> on the command line. Open a Terminal window in centos1 to do so. You'll need the IP address of each machine for the next steps.
# Switch to your '''c7host''' VM, open a terminal, login as root, and change directory to '''/root/bin'''.
# Issue the Linux command: <b><code><span style="color:#3366CC;font-size:1.2em;">wget https://wwwraw.dropboxgithubusercontent.com/sOPS245/0e8nhgvatrhc0kqlabs/main/lab2-check.bash</span></code></b>
# Give the '''lab2-check.bash''' file execute permissions (for the file owner).
# Run the shell script and if any warnings, make fixes and re-run shell script until you receive "congratulations" message.
#Arrange proof of the following on the screen:
::&#x2713; '''<u>All</u> VMs''':<blockquote><ul><li>All 4 nested 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>'''c7host VM''':<blockquote><ul><li>Run the '''lab2-check.bash''' script in front of your instructor (must have all <b><code><span style="color:#66cc00;border:thin solid black;font-size:1.2em;">&nbsp;OK&nbsp;</span></code></b> messages)</li></ul></blockquote>
::<span style="color:green;font-size:1.5em;">&#x2713;</span> Lab2 logbook notes completed.

Navigation menu