Changes

Jump to: navigation, search

OPS235 Lab 2

114 bytes removed, 10:53, 26 September 2018
no edit summary
:::*Home: http://mirror.netflash.net/centos/7/os/x86_64/
:: '''Kickstart File URL (Kernel options): '''
:::* Seneca Lab:''' <span style="color:green;font-weight:bold">ks=</span>http://scscs.senecac.onsenecacollege.ca/~chris.johnson/OPS235/lab2ops235/centos7-kickstart-v02.cfg:::* Home:''' <span style="color:green;font-weight:bold">ks=</span>http://scs.senecaccs.onsenecacollege.ca/~chris.johnson/OPS235/lab2ops235/centos7-kickstart-v02-ext.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>Seneca Lab:''' <span style="color:green;font-weight:bold">ks=</span>http://scscs.senecac.onsenecacollege.ca/~chris.johnson/OPS235/lab2ops235/centos7-kickstart-v02.cfg</li><li>'''Home:''' <span style="color:green;font-weight:bold">ks=</span>http://scs.senecaccs.onsenecacollege.ca/~chris.johnson/OPS235/lab2ops235/centos7-kickstart-v02-ext.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'''.
# Examine the file <b><code><span style="color:#3366CC;font-size:1.2em;">centos3.xml</span></code></b>. What does it contain? What format is it in?<br><br>
# We will now learn how to download a compressed image file and xml configuration file and add it as a VM to the virtual manager menu.
# Issue the following commands:<ul><li><b><code><span style="color:#3366CC;font-size:1.2em;">wget http://cs.senecac.onsenecacollege.ca/~murray.saul/ops235/practical1.img.gz</span></code></b></li><li><b><code><span style="color:#3366CC;font-size:1.2em;">wget httpshttp://scs.senecaccs.onsenecacollege.ca/~murray.saul/ops235/practical1.xml</span></code></b><br><br></li></ul>
<ol><li value="17">The downloaded file "practical1.img.gz" is a "raw image compressed VM file", but will work the same for a Virtual Machine as the qcow2 file format.Copy these files to the '''/var/lib/libvirt/images''' directory and decompress that raw image file.</li><li>Make certain your present working directory is: '''/var/lib/libvirt/images'''</li><li>Issue the command: <b><code><span style="color:#3366CC;font-size:1.2em;">virsh define practical1.xml</span></code></b></li><li>What happened in the virtual manager window? To remove a VM entry in the Virtual Manager window, simply issue the command: '''virsh undefine vm_name''' (without the '''.xml''' file extension)</li><li>Prior to your practical test, you will be required to perform a similar operation to download, unzip and run a VM image for your practical test.<br><br></li></ol>
{{Admon/important|Shutting Down the Host while Virtual Machines are Running|If you shut down your host system while virtual machines are running, they will be suspended, and will resume the next time you boot your host system.}}
<ol>
<li value="15">Save, set permissions, and then run that shell script to backup centos1. Confirm that this script did backup this image to root's home directory</li><li>Use the <b><code>wget</code></b> command to download, study, and run the following shell scripts on-line:<blockquote><b><code><span style=" pointer-events:none;cursor:default;color:#3366CC;font-size:1.2em;">httpshttp://scscs.senecac.onsenecacollege.ca/~murray.saulops235/vm-start-text.bash<br>httpshttp://scs.senecaccs.onsenecacollege.ca/~murray.saulops235/vm-stop-text.bash</span></code></b><br><b><code><span style=" pointer-events:none;cursor:default;color:#3366CC;font-size:1.2em;">httpshttp://scscs.senecac.onsenecacollege.ca/~murray.saulops235/vm-start.bash<br>https://scs.senecac.on.ca/~murray.saul/vm-stop.bash</span></code></b></blockquote></li><li>Try to understand what these Bash Shell scripts do.</li><li>You have completed lab2. Proceed to Completing The Lab, and follow the instructions for "lab sign-off".</li></ol>
# Use the '''virsh start''' command to launch all the VMs ('''centos1''', '''centos2''', and '''centos3''').
# 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 http://matrixcs.senecac.onsenecacollege.ca/~murray.saul/ops235/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.

Navigation menu