Difference between revisions of "OPS235 Short-Term"

From CDOT Wiki
Jump to: navigation, search
 
(169 intermediate revisions by 7 users not shown)
Line 1: Line 1:
::# '''Linux Commands'''. Try to bridge the gap of Linux commands throughout the OPS235 / OPS335 / OPS435 / OPS535 stream. Recommended for Winter 2015 semester to allow students to add previous reference sheets and/or lab log-books to existing material.<br />(For example, allow ULI101 reference sheet to be added to OPS235 lab logbook, OPS335 contains OPS235 lab logbook notes plus ULI101 reference sheet, etc). Would it be worthwhile to print empty ULI101 reference sheet with already created section headers so they can place commands in required area (students associate the type of tool to refer to get the job done). Action taken: Murray Saul notified Mark Fernandes of idea, Mark had a discussion with some of ULI101 faculty. The decision to not have reference sheets for ULI101 course was due to prevention of students cheating if answers to final exam obtained. '''Suggestion was made that a template Linux command reference sheet will be made to help students study prior to ULI101 final exam, and this standardized sheet can be added to the OPS235 lab log-book'''. Any prospects of a carry-over sheet from ULI101 aside, it may be of use to start the semester off with a brief quiz on commonly used commands from ULI101 that get used in OPS235 (ex. cp, mv, pwd, ls, cd etc.) I have found that students often struggle with the basics at the beginning of the semester. Perhaps we could integrate these basics with some basic bash scripting quiz questions, things that might help with the first few labs. This could go hand in hand with Murray's long-term suggestion of integrating some bash scripting into the first lab. <br><br>
+
 
::# '''YUM Command for Local Installs'''. The rpm command in lab3 relating to local installs appears to be deprecated (favoring yum local install). '''OPS235 team to meet to discuss implementation (Status: WIP)'''.<br><br>
+
== USEFUL INFORMATION FOR INSTRUCTORS (ALL SEMESTERS - PLEASE READ!)==
::# '''Online Collaboration (OPS235 Instructor Resource)'''. There is a considerable amount of work to do to ensure items are updated for OPS235 prior to semester startup. I think it would be a good idea to have a '''check-list''' for all items such as: Covering off with OPS335 for version of CENTOS to use, update lab-book semester info, update instructors and photos, testing and update links for media install, update weekly dates for notes, update professor names and sections in both main WIKI and Weekly Schedule, submit Weekly schedule to Dianna, etc.<br><br><ul><li>'''OPS235 Instructor's Guide:''' [ [https://docs.google.com/document/d/1b9VosmlEg-oyFx7JaeqXqKBMvhQvK5djOSONdqFfBlI/edit?usp=sharing OPS235 Instructor's Guide] ] (Currently Under Development)</li><li>'''Sample OPS235 Semester Startup Checklist using GoogleDocs Forms:''' [ [https://docs.google.com/forms/d/1pKCMrckEkHPbR9icDjoUC3FPwcfKtug_as9RujWEWlM/viewform?usp=send_form OPS235 Semester Startup Checklist] ]</li><li>'''View Status of OPS235 Semester Startup Checklist:''' [ [https://docs.google.com/spreadsheets/d/1tqxNs3YqQghL41jCfY2nyWc_StdpPjiRQjCZ2cdXAvY/edit?usp=sharing OPS235 Semester Startup Status] ]</li></ul> <br><br>
+
 
::#'''AODA Accomodation'''.<br><br>'''Issue #1:'''<br><br> It is recommended to make available for '''each lab or classroom a method to safely keep a door open while class is in session without propping the door open with a chair''' - If door is not opened, door is locked which can be a distraction for professors when delivering course material. '''It has been noted there is no consistency in the TEL building wrt many of the labs: Some have door stops, many do not. If door stops are not somehow attached to lab, they go missing or are used for other labs'''. If door is opened with propping chair, can be unsafe for students with special needs (for example blind students) and problems in the event of an emergency (for example: fire). Also, it has been noted  challenges in providing Linux drivers to communicate with devices for individuals with special needs. '''These issues when solved should be shared in a central repository with support and suggestions to allow better access through a student's duration and with different instructors, staff'''.<br><br>
+
#In the '''lab 1 instructions for SSD''', students are instructed to download the image to their windows machine (i.e. Downloads), then create a '''VM template, then edit it with instructions:'''<br><br><span style="background-color:yellow;">In this setup dialog box, click the options tab and then click the Advanced option at the bottom of the list. On the right-hand side, click the checkbox to enable the option to Boot with EFI instead of BIOS.<br>Then click on the Hardware tab, and then select the CD/DVD (IDE) device and select in the right-side select the radio button for the use ISO Image file. Click the Browse button and specify the path of your downloaded Centos7 Full install DVD (most likely file is contained in your Downloads folder). Click Processors, and click the check-box to enable Virtual Intel VT-X/EPT or AMD-V/RVI. When finished, click on the OK button. </span><br><br>Many students have done this for more than 3-4 semesters with their SSDs. Generally no problems encountered. '''Occasionally, students do not follow instructions and forget to set virtualisation for host VM with would affect nested VMs using KVM in lab2...'''. Examples: Can't edit Grub boot file, VMs cannot be installed properly in KVM, Installed VMs in KVM cannot be started, etc.<br><br>The instructions are there. '''I usually do install with students for lab1 Investigation 1 with students (only time I do lab with students) to help them get on the right track'''.<br><br>
::#'''New Machine Issues (UEFI)'''. The new machines in T3074, T4044, and T4048 among others are causing issues with certain hard drives where the system wants an EFI boot partition. I have already contacted ITS about having this disabled but if this issue is not finalized soon (who knows how fast ITS will work on this) we should ensure that by the start of next semester UEFI is disabled in the machines to make sure students can get their OS installed without any problems. As a side note, I have found that booting from a Live CD and wiping the hard drive and placing an ext4 FS on it has worked in some scenarios, but not all.<br><br>
+
# Subject: RE: '''How to allow students to obtain free VMware Workstation 12 Pro for use at home''' (eg. SSDs)<br><br>'''*** REQUIRED FOR INSTRUCTORS TO DO THEMSELVES - NO ONE WILL DO THIS FOR YOU ***'''<br><br>Students are entitled to free licensed version of VMware Workstation 12 Pro.<br>It is available for ALL OPS235 / OPS335 students, but particularly useful for students that have SSD drive and want to work from home of notebook computer. You, as an instructor NEED to send Clive (e-mail:<br>clive.beetge@senecacollege.ca) with just usernames (can be done via Blackboard or moodle) students. I recommend you also post an announcement for your student like this:<br><br><blockquote>''"All OPS235/OPS335 students in my course is allowed a free version of VMware Workstation 12 Pro for their personal use. This particularly useful for students that have Solid State Drives and want to work on OPS235 labs at homeusing VMware Workstation 12 Pro. I have e-mailed the administrator your seneca userid, and you should be getting an email with a long subject line.<br><br>WARNING: Check your quarantine and spam filters to see if this email gets trapped since spam filters may  automatically trap suspicious emails with long subject lines.<br><br>Open that e-mail to obtain your VMware Workstation 12 Pro software and registration key.<br><br>FYI<br>Insructor's Name"''</blockquote><br><br>'''NOTE:''' If students cannot access this information from their email, and if Clive has created their accounts, they can use the link and following instructions to obtain their program:<br>https://e5.onthehub.com/WebStore/Welcome.aspx?ws=d529a1f1-b430-e511-940e-b8ca3a5db7a1&vsro=8<br><br>
::#'''Lab 2 Chart in Lab Logbook'''. Create an empty chart in lab2 logbook, so students can simply fill in the chart.<br><br>
+
# It is possible to run VMware VMs from the command line using the following steps <syntaxhighlight lang="bash">Create a directory for links to your VMware VMs
::#'''Virtual Machine Package Installation'''. The installation process for the KVM/QEMU packages should be clarified to include instructions on when to use groupinstall and when to use install. Also, I have noticed in past semesters as well as the current one that KVM/QEMU will randomly go missing, causing issues with VM installation as well as VM networking. Uninstalling and then reinstalling the virtualization packages has often solved the problem, though not 100% of the time. We should look into this problem and maybe redo the VM package installation section altogether.<br><br>
+
# mkdir ~/links
::#'''Improve or removal of rpm comparison chart in lab3'''. Filling out rpm chart to learn query-option and select-option is traditionally confusing for students and is recommended by a number of OPS235 profs to improve or most likely remove from lab3.<br><br>
+
# cd links
::#'''Lab 3 - view VM details'''. Clean-up wording to make more intuitive to OPS235 students to move to '''virt-manager''' console and view details in order to see various VM settings.<br><br>
+
# ln -s /path/to/VMs/file.vmx
::#'''Better timing with Labs 1 - 4 / Assignment #1'''. Currently, students should have completed lab5 to be entirely covered-off for assignment #1. Perhaps compiling source code could be incorporated into Assignment #2<br><br>
+
 
::#'''Lab 4 fdisk'''. Many students have been having issues with the fdisk functionality. There is a link with explanations for fdisk in the labb but a few lines of examples might go a long way in reminding them of the proper syntax and usage of fdisk (they should have some experience from the previous semester if i'm not mistaken).<br><br>
+
Use vmrun to start/stop/list/getGuestIPAddress/listProcessesInGuest
::#'''Lab 4 /home mounting'''. The last part of investigation 2 in lab 4 is a lot more tricky than it looks, even if the students understand the mounting part of the problem perfectly. After some self testing the VM still complains about missing the folder even when properly listed in /etc/fstab. Recommend we take a look at this.<br><br>
+
# vmrun | less
 +
# vmrun -T ws start ~/links/name-of-CentOS-VM-link.vmx [gui|nogui]
 +
# vmrun list
 +
# vmrun -T ws getGuestIPAddress ~/links/name-of-CentOS-VM-link.vmx
 +
# ssh user@address-got-from-line-above
 +
# vmrun -T ws -gu <guest-user> -gp <guest-password> listProcessesInGuest ~/links/name-of-CentOS-VM-link.vmx</syntaxhighlight>In case you get an error message about Guest Additions not being installed, you have to rerun <code>vmrun installTools ~/links/name-of-CentOS-VM-link</code> and, during the Guest Additions installation, choose yes to automatic kernel modules (default during installation is no), see: [ [https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2050592 Known issue about Guest Additions not being loaded despite being installed] ] and [ [https://www.vmware.com/pdf/vix162_vmrun_command.pdf (PDF) manual for vmrun ] ] for additional information.
 +
# When updating packages if you abort suddenly, then you might end up with a broken package database.
 +
## In that case, you can fix a broken yum package system using the following blog post: [ [https://wphosting.tv/how-to-fix-duplicate-packages-in-yum/ How to fix duplicate packages in yum] ].<br>Good to know and include somewhere (OPS235 future content update).
 +
## This might another set of steps to follow:<syntaxhighlight lang="bash"># yum-complete-transaction
 +
# yum check | tee /tmp/yum-check.log
 +
# yum update --skip-broken
 +
# package-cleanup --problems
 +
# package-cleanup --dupes
 +
# package-cleanup --cleandupes
 +
# yum install initial-setup initial-setup-gui gnome-initial-setup
 +
# yum update
 +
# reboot</syntaxhighlight><br /><br />
 +
# VMware on Linux requires Secure Boot to be disabled on the Linux host otherwise VMware cannot run CentOS VMs: [ [https://communities.vmware.com/message/2461448#2461448 Comment #5 talks about disabling Secure Boot to make VMware on Linux boot VMs] ].
 +
 
 +
= Current: Summer 2018 Semester =
 +
# '''A quick note about replacing firewalld with iptables: ''I've found that disabling firewalld isn't always enough.'' ''' Certain processes and packages can re-enable firewalld automatically and without notice. When this happens, though firewalld and iptables are both set to start with the system, firewalld takes precedence. Iptables will never start up. This can cause problems for students, as firewalld can interfere with some of our labs and they assume firewalld is disabled at this point. I recommend we amend Lab 1 to instruct students to fully remove firewalld from their systems. I also recommend checking status of firewalld be part of your troubleshooting toolbox when helping students with strange issues. --Chris Johnson
 +
 
 +
= Winter 2018 Semester =
 +
# It appears that doing yum update after May 2018 reintroduces the GRUB issue mentioned in '''#3''' of '''Fall 2017''' below for removable HDD on HP machines. A possible solution, since the one proposed in the earlier solution does not work, might be (to be confirmed whether the solution linked to here resolves the issue)  https://noobient.com/post/165797742756/fixing-the-efi-bootloader-on-centos-7
 +
 
 +
= Fall 2017 Semester=
 +
 
 +
# '''Network glitch corrected by Mehrdad where network install (URL copy from Belmont) hung up install due to missing software repository'''.<br>'''Cause''': due to firewall protocol system implementation in Spring/Summer, it blocked the "yum" protocol, and now has been <u>'''fixed'''</u> system-wide.<br><br>'''FYI:''' '''Murray Saul''' verified that the fix worked by successfully created a VM via network install.<br><br>
 +
# <span style="color:red;">'''ATTENTION:'''</span> Mehrdad mentioned that possibly in the next semester (or eventually), the belmont server URLs will be removed. The alternative (and eventual replacement) that affects OPS235/OPS335 is: mirror.senecacollege.ca/centos/7/os/x86_64/<br>Therefore, this corrections should be made for OPS235 and OPS335 labs for the Winter 2018 startup prior to classes.<br><br>
 +
# <span style="color:red;">'''ATTENTION:'''</span> Verify your CentOS release version using '''rpm -qa centos-release'''. If it is '''1708''' <u>and</u> you are using a '''removable hard drive''' with boot issues then do the following: copy '''grubx64.efi''' from [http://mirror.centos.org/centos/7/os/x86_64/EFI/BOOT/ CentOS EFI/BOOT site here] into your /boot/efi/EFI/BOOT directory of your hard drive. To get to that directory of your hard drive you would need to boot from a live CentOS USB or CD/DVD and mount the /boot partition of your HDD. Try to do this yourself, otherwise ask for help from the lab tutor or instructor. You would also need to refresh your grub configuration using help from [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html-single/System_Administrators_Guide/index.html RedHat],  [https://wiki.centos.org/HowTos/Grub2 CentOS] and [http://www.gnu.org/software/grub/manual/grub.html Grub] or use the following [[File:grub.cfg]] for help. This directory tree is known to work<br><br><syntaxhighlight lang="bash">
 +
/boot/efi/EFI/
 +
├── BOOT
 +
│  ├── BOOTX64.EFI
 +
│  ├── fbx64.efi
 +
│  ├── grub.cfg              <=== NEW: MUST BE PRESENT (create using grub2-mkconfig -o filename)
 +
│  └── grubx64.efi            <=== NEW: MUST BE PRESENT (get using link CentOS EFI/BOOT in text above)
 +
└── centos
 +
    ├── BOOT.CSV
 +
    ├── BOOTX64.CSV
 +
    ├── fonts
 +
    │  └── unicode.pf2
 +
    ├── grub.cfg
 +
    ├── grubenv
 +
    ├── grubx64.efi
 +
    ├── mmx64.efi
 +
    ├── shim.efi
 +
    ├── shimx64-centos.efi
 +
    └── shimx64.efi
 +
</syntaxhighlight><br><br>
 +
# In Lab2 (both versions), change from downloading raw image file (.img) to qcow2 file, and call it sample_test_image to get student to launch and login a sample version for exposure for future practical tests.<br><br>
 +
# For next semester add in procedure for SSDs to create a duplicate image file for c7host in case the original is corrupted. Should also include warning about properly unmounting SSD device prior to removing from computer<br><br>
 +
 
 +
= Winter / Summer 2017=
 +
 
 +
# There seems to be a procedure that works if you are booting Centos7 from your removable SATA drive in your labs and it doesn't connect to the Internet...<br>Note: If you cannot connect, you should see on the top right-hand corner before you login such as: '''<span style="font-size:1.5em;font-family:monospace;">[...]</span>'''<br>This means there is no Internet connection.<br><br>If that is the case, perform the following steps:<br><ol type="a"><li> Quickly press the power button (do not hold it down!). This should put it in suspend mode.  You can confirm it is in suspend mode if the blue power light is flashing.</li><li>Wait a few seconds, then press the power button again. This will go out of suspend mode.  You can confirm is is not in suspend mode if blue power light is solid (not flashing).</li><li>In a few seconds, the symbol on the top right-hand side should appear like: <span style="border-color:black;border-width:2px;border-style:solid;"> &nbsp; &nbsp; </span>.<br>This symbol means that you can connect to the Internet.</li></ol><br><br>
 +
# A problem with kernel panic discussed on this thread and is on going as of Jan 10, 2017 (solved but Mark F. is facing difficulties after performing an aborted upgrade on my centos1-like VM which I was using for teaching ULI101. This solution doesn't help Mark but the advice given on this thread might be relevant to some). Here is link: [ [https://www.centos.org/forums/viewtopic.php?f=47&t=51911&start=10 Kernel panic at restart after so update] ]<br /><br />
 +
# We keep (but rename to something more appropriate) the existing HDD option in OPS235 labs because some students are requesting to install CentOS on their laptop (dual boot or single boot) and so continue doing the lab with all 3VMs on the laptop itself. So no VMs inside a VM stuff for them, except maybe name the labs from external HDD to 'using your own laptop' or some such.<br /><br />
 +
# In case a yum update goes wrong and the advice given by the next run of yum update does not work in making the VM boot into GNOME, then try the following: '''yum install initial-setup initial-setup-gui gnome-initial-setup'''. You might have to reboot and agree to the license conditions at firstboot. <br /><br />
 +
# Nested virtualization is incredibly slow if the host VM (VMware c7host) is using the default number of processor cores (1). Since all processing is done under c7host, it is safe to share all of your cores with Windows and VMware (c7host).<br /><br />
 +
 
 +
=Fall 2016=
 +
 
 +
# Lab 1: Unusual problem of network not showing up in c7host VM. Happened because I had not enabled a second network adapter in VMware Workstation Pro (use Team as the type).<br><br>
 +
# Change all VM sizes to be at least 20GB because some  (lab 2 VMs) still say 15GB and they cause problems during installation for CentOS 7.2<br><br>
 +
# Keep consistent lab1 checking scripts for ALL OPS235 instructors (This semester was exception for Mark F., due to caching problem showing older partitions for previous semester).<br><br>
 +
# I think in future (based on scripting questions I gave on midterm) that we will need to add to the questions section of the labs something to do with shell scripting - even a simple walk-through. This can be incorporated into future quizzes.<br><br>
 +
# VMware gets odd naming for interfaces, for example ifconfig in VMware on CentOS 7 I get this (among other network setup). The problem is they've switched from the interface naming. There is a workaround in CentOS FAQ: https://wiki.centos.org/FAQ/CentOS7<code>eno16777736: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500  </code><br><br>
 +
# I noticed that some students have a different volume group name for centos2 than centos_centos2<br>I suspect it is that students didn't follow instructions when creating the centos2 VM by specifying the correct hostname: centos2<br>This could be corrected by including centos2 being checked for correct hostname in lab2 checking script, but not time to do that for this semester.<br><br>
 +
# Add youtube video on how LVM works for lab5 notes<br><br>
 +
# Check learning outcomes and topic outline match for OPS235 course<br><br>
 +
# For OPS235 Assignment #2, remove references to chkconfig command (deprecated), should use systemctl status service-name<br><br>
 +
 
 +
 
 +
 
 +
== CentOS 7 VM (VMware) Known Issues ==
 +
HP Z230 machines on campus
 +
# Not getting network interface in CentOS (VMware network configured to using NAT). Solved (sometimes) by adding another network interface and setting that interface to VMnet8
 +
# USB failure from Windows host. Could this be due to bad USB cable, but one student reported Windows on HP Z230 automatically unmounts the USB drive while the VM was running thereby freezing CentOS in VMware
 +
 
 +
== Lab 5 suggestion (received from a student) ==
 +
 
 +
Create a virtual disk /dev/vda in centos2 and use that virtual disk (vda) instead of /dev/sda (so use '''fdisk /dev/vda''' instead of using '''fdisk /dev/sda'''). This makes Lab 5 easier to handle accidental corruption students might make while doing that lab thereby destroying their centos2. This might require Lab 5 checker script to be tweaked to work with /dev/vda.
 +
 
 +
== Lab 7 Issue ==
 +
 
 +
Some students could only get their labs to work with the browser after they did this:
 +
 
 +
iptables -I INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
 +
 
 +
== Assignment 2 ==
 +
 
 +
chkconfig gives an error message telling students to use:
 +
# systemctl list-dependents httpd
 +
# systemctl list-dependents mysql
 +
 
 +
=Previous Semesters=
 +
 
 +
Summer 2016 (Refer to previous semesters below)=
 +
 
 +
# No entries
 +
 
 +
 
 +
==Winter 2016==
 +
 
 +
# '''<span style="color:red">N.B. - On "TODO list"</span>''' - '''LAB 1 - Picture under part 2''' - The picture called "Partition Verification" shows a LVM setup, but the instructions ask specifically for a standard partition setup.<br><br>
 +
# '''<span style="color:red">FIXED BUT REQUIRES VERIFICATION THAT FIX WORKED</span>''' - '''LAB 1 - Investigation 3 - Part 2 - Questions 21''' - Not important but, report3.bash script uses the command "cat /root/install.log >> installation_report.html", the file /root/install.log does not exist on centos7 install.<br><br>
 +
#'''<span style="color:red">N.B. On List for Murray Saul to work on during non-contact period</span>''' -  "tweak" '''lab2check2.bash''' to provide additional checks including xml dumps to home directory for all VMs and reminder from script to back those items to USB key. Also should check if '''centos2''' has '''/ for 8 GB and /home for 2GB'''.  I read somewhere that '''xfs can mess up with LVM which we talk about in lab5'''. For next time, I will '''add in requirement in lab2 signoff that students show for all VMs the /etc/fstab to ensure ext4 fs'''. Perhaps checking script can be modified next time to check for that... Good idea to '''expand shell script check for ALL labs. Student would be required to show same information PLUS the results from running the checking shell script'''.<br><br>
 +
#'''<span style="color:red">N.B. On List for Murray Saul to work on during non-contact period</span>''' -  It would be nice to rearrange the content for lab5 to '''discuss df -h and space concerns <u>first</u>, then flow into LVM. This would provide a better "flow" to reinforce student understanding'''. Shell script at end would remain at end to show how to use crontab to automate (flag) space issues.<br><br>
 +
#'''<span style="color:red">N.B. On List for Murray Saul to work on during non-contact period</span>''' - Good idea to '''review study questions at end of each lab''' to see if they are applicable to each lab.<br><br>
 +
#Would be neat to '''create prezi slide shows for each lab preparation (for class)'''. This would be in sync with OPS335 course. Online slides can be exported to PDF files as well.<br><br>
 +
#'''<span style="color:red">N.B. On List for Murray Saul to work on during non-contact period</span>''' - Would be helpful for a script or program to check all links in all OPS235 (OPS335, etc) WIKIs to check for non-working links. This would allow course overseer to run just prior to the start of the semester and be incorporated into the startup checklist.<br><br>
 +
#'''<span style="color:red">N.B. On List for Murray Saul to work on during non-contact period</span>''' - Some students note different vg name (like centos instead of centos_centos2). Solution is to get students to issue vgs to obtain vg name. Should investigate why this is happening to prevent (eg. shell script check at end of a lab).<br><br>
 +
#'''<span style="color:red">N.B. On List for Murray Saul to work on during non-contact period</span>''' - Check '''mailx''' package when installed (lab5 example) for OPS235 to see why not sending mail to demo that script works for a lower threshold point for file space usage.<br><br>
 +
#'''<span style="color:red">N.B. On List for Murray Saul to work on during non-contact period</span>''' - Method to better explain in lab7 tunnelling via local ports (eg. show some command of available ports, etc) - example:<br>'''sysctl net.ipv4.ip_local_port_range'''<br>net.ipv4.ip_local_port_range = 32768    61000<br>(But where does that fit in with using 20808?)
 +
 
 +
 
 +
== Summer 2015 ==
 +
# '''LAB 1 - Installing NON-GUI version of Linux OS:''' A lot of students ran into the same problem with lab 1, that is they didn't pay close enough attention to the instructions and installed the OS without a GUI. But that is no flaw in your wiki, just the tendency of students to rush through things. I have done my best to enforce that they should read all the instructions carefully BEFORE they start on the labs.<br><br>
 +
# '''LAB2 - Backup Script demo:''' Current VM backup script should also allow for backing up xml configuration files.<br><br>
 +
# '''LAB - LVM:''' Current VM backup script does not factor in virtual hard drive images. May be a good idea to add this to the backup script, so students can be encouraged to run backup scripts.<br><br>
 +
# The wget http://belmont.senecac.on.ca/centos/7/isos/x86_64/CentOS-7-x86_64-LiveGNOME-1503.iso  command is still not working<br><br>
 +
# When students issue the “service iptables restart” command it returns a message that says the service is dead and not running. Yet, I’ve tested the iptables themselves by adding a few rules and they are certainly still working. I’m really not sure what exactly is going on. Perhaps it’s just a glitch in CentOS7?<br><br>
 +
# The virtualization software also seems to need a system reboot before the virtual network will come into effect. Simply restarting the virt-manager or the libvirtd service doesn’t seem to do it. So, again, rebooting the system is the way to go to make sure the virtual default NAT network becomes visible for new VMs.<br><br>
 +
# Some students in lab2 may not be performing the correct steps in creating VMS (image paths and types). A shell script to be run to check this would be useful, but may need release time to create a comprehensive and user-friendly shell script.<br><br>
 +
 
 +
== Winter 2015 ==
 +
* Winter 2015: [[OPS235 - Short-term - Older Issues]]
 +
 
  
 
== Additional Resources / Navigation ==
 
== Additional Resources / Navigation ==

Latest revision as of 19:05, 1 July 2018

USEFUL INFORMATION FOR INSTRUCTORS (ALL SEMESTERS - PLEASE READ!)

  1. In the lab 1 instructions for SSD, students are instructed to download the image to their windows machine (i.e. Downloads), then create a VM template, then edit it with instructions:

    In this setup dialog box, click the options tab and then click the Advanced option at the bottom of the list. On the right-hand side, click the checkbox to enable the option to Boot with EFI instead of BIOS.
    Then click on the Hardware tab, and then select the CD/DVD (IDE) device and select in the right-side select the radio button for the use ISO Image file. Click the Browse button and specify the path of your downloaded Centos7 Full install DVD (most likely file is contained in your Downloads folder). Click Processors, and click the check-box to enable Virtual Intel VT-X/EPT or AMD-V/RVI. When finished, click on the OK button.


    Many students have done this for more than 3-4 semesters with their SSDs. Generally no problems encountered. Occasionally, students do not follow instructions and forget to set virtualisation for host VM with would affect nested VMs using KVM in lab2.... Examples: Can't edit Grub boot file, VMs cannot be installed properly in KVM, Installed VMs in KVM cannot be started, etc.

    The instructions are there. I usually do install with students for lab1 Investigation 1 with students (only time I do lab with students) to help them get on the right track.

  2. Subject: RE: How to allow students to obtain free VMware Workstation 12 Pro for use at home (eg. SSDs)

    *** REQUIRED FOR INSTRUCTORS TO DO THEMSELVES - NO ONE WILL DO THIS FOR YOU ***

    Students are entitled to free licensed version of VMware Workstation 12 Pro.
    It is available for ALL OPS235 / OPS335 students, but particularly useful for students that have SSD drive and want to work from home of notebook computer. You, as an instructor NEED to send Clive (e-mail:
    clive.beetge@senecacollege.ca) with just usernames (can be done via Blackboard or moodle) students. I recommend you also post an announcement for your student like this:

    "All OPS235/OPS335 students in my course is allowed a free version of VMware Workstation 12 Pro for their personal use. This particularly useful for students that have Solid State Drives and want to work on OPS235 labs at homeusing VMware Workstation 12 Pro. I have e-mailed the administrator your seneca userid, and you should be getting an email with a long subject line.

    WARNING: Check your quarantine and spam filters to see if this email gets trapped since spam filters may automatically trap suspicious emails with long subject lines.

    Open that e-mail to obtain your VMware Workstation 12 Pro software and registration key.

    FYI
    Insructor's Name"


    NOTE: If students cannot access this information from their email, and if Clive has created their accounts, they can use the link and following instructions to obtain their program:
    https://e5.onthehub.com/WebStore/Welcome.aspx?ws=d529a1f1-b430-e511-940e-b8ca3a5db7a1&vsro=8

  3. It is possible to run VMware VMs from the command line using the following steps
    Create a directory for links to your VMware VMs
    # mkdir ~/links
    # cd links 
    # ln -s /path/to/VMs/file.vmx
    
    Use vmrun to start/stop/list/getGuestIPAddress/listProcessesInGuest
    # vmrun | less
    # vmrun -T ws start ~/links/name-of-CentOS-VM-link.vmx [gui|nogui]
    # vmrun list
    # vmrun -T ws getGuestIPAddress ~/links/name-of-CentOS-VM-link.vmx
    # ssh user@address-got-from-line-above
    # vmrun -T ws -gu <guest-user> -gp <guest-password> listProcessesInGuest ~/links/name-of-CentOS-VM-link.vmx
    In case you get an error message about Guest Additions not being installed, you have to rerun vmrun installTools ~/links/name-of-CentOS-VM-link and, during the Guest Additions installation, choose yes to automatic kernel modules (default during installation is no), see: [ Known issue about Guest Additions not being loaded despite being installed ] and [ (PDF) manual for vmrun ] for additional information.
  4. When updating packages if you abort suddenly, then you might end up with a broken package database.
    1. In that case, you can fix a broken yum package system using the following blog post: [ How to fix duplicate packages in yum ].
      Good to know and include somewhere (OPS235 future content update).
    2. This might another set of steps to follow:
      # yum-complete-transaction
      # yum check | tee /tmp/yum-check.log 
      # yum update --skip-broken
      # package-cleanup --problems
      # package-cleanup --dupes
      # package-cleanup --cleandupes
      # yum install initial-setup initial-setup-gui gnome-initial-setup
      # yum update
      # reboot


  5. VMware on Linux requires Secure Boot to be disabled on the Linux host otherwise VMware cannot run CentOS VMs: [ Comment #5 talks about disabling Secure Boot to make VMware on Linux boot VMs ].

Current: Summer 2018 Semester

  1. A quick note about replacing firewalld with iptables: I've found that disabling firewalld isn't always enough. Certain processes and packages can re-enable firewalld automatically and without notice. When this happens, though firewalld and iptables are both set to start with the system, firewalld takes precedence. Iptables will never start up. This can cause problems for students, as firewalld can interfere with some of our labs and they assume firewalld is disabled at this point. I recommend we amend Lab 1 to instruct students to fully remove firewalld from their systems. I also recommend checking status of firewalld be part of your troubleshooting toolbox when helping students with strange issues. --Chris Johnson

Winter 2018 Semester

  1. It appears that doing yum update after May 2018 reintroduces the GRUB issue mentioned in #3 of Fall 2017 below for removable HDD on HP machines. A possible solution, since the one proposed in the earlier solution does not work, might be (to be confirmed whether the solution linked to here resolves the issue) https://noobient.com/post/165797742756/fixing-the-efi-bootloader-on-centos-7

Fall 2017 Semester

  1. Network glitch corrected by Mehrdad where network install (URL copy from Belmont) hung up install due to missing software repository.
    Cause: due to firewall protocol system implementation in Spring/Summer, it blocked the "yum" protocol, and now has been fixed system-wide.

    FYI: Murray Saul verified that the fix worked by successfully created a VM via network install.

  2. ATTENTION: Mehrdad mentioned that possibly in the next semester (or eventually), the belmont server URLs will be removed. The alternative (and eventual replacement) that affects OPS235/OPS335 is: mirror.senecacollege.ca/centos/7/os/x86_64/
    Therefore, this corrections should be made for OPS235 and OPS335 labs for the Winter 2018 startup prior to classes.

  3. ATTENTION: Verify your CentOS release version using rpm -qa centos-release. If it is 1708 and you are using a removable hard drive with boot issues then do the following: copy grubx64.efi from CentOS EFI/BOOT site here into your /boot/efi/EFI/BOOT directory of your hard drive. To get to that directory of your hard drive you would need to boot from a live CentOS USB or CD/DVD and mount the /boot partition of your HDD. Try to do this yourself, otherwise ask for help from the lab tutor or instructor. You would also need to refresh your grub configuration using help from RedHat, CentOS and Grub or use the following File:Grub.cfg for help. This directory tree is known to work

    /boot/efi/EFI/
    ├── BOOT
    │   ├── BOOTX64.EFI
    │   ├── fbx64.efi
    │   ├── grub.cfg               <=== NEW: MUST BE PRESENT (create using grub2-mkconfig -o filename)
    │   └── grubx64.efi            <=== NEW: MUST BE PRESENT (get using link CentOS EFI/BOOT in text above)
    └── centos
        ├── BOOT.CSV
        ├── BOOTX64.CSV
        ├── fonts
        │   └── unicode.pf2
        ├── grub.cfg
        ├── grubenv
        ├── grubx64.efi
        ├── mmx64.efi
        ├── shim.efi
        ├── shimx64-centos.efi
        └── shimx64.efi


  4. In Lab2 (both versions), change from downloading raw image file (.img) to qcow2 file, and call it sample_test_image to get student to launch and login a sample version for exposure for future practical tests.

  5. For next semester add in procedure for SSDs to create a duplicate image file for c7host in case the original is corrupted. Should also include warning about properly unmounting SSD device prior to removing from computer

Winter / Summer 2017

  1. There seems to be a procedure that works if you are booting Centos7 from your removable SATA drive in your labs and it doesn't connect to the Internet...
    Note: If you cannot connect, you should see on the top right-hand corner before you login such as: [...]
    This means there is no Internet connection.

    If that is the case, perform the following steps:
    1. Quickly press the power button (do not hold it down!). This should put it in suspend mode. You can confirm it is in suspend mode if the blue power light is flashing.
    2. Wait a few seconds, then press the power button again. This will go out of suspend mode. You can confirm is is not in suspend mode if blue power light is solid (not flashing).
    3. In a few seconds, the symbol on the top right-hand side should appear like:     .
      This symbol means that you can connect to the Internet.


  2. A problem with kernel panic discussed on this thread and is on going as of Jan 10, 2017 (solved but Mark F. is facing difficulties after performing an aborted upgrade on my centos1-like VM which I was using for teaching ULI101. This solution doesn't help Mark but the advice given on this thread might be relevant to some). Here is link: [ Kernel panic at restart after so update ]

  3. We keep (but rename to something more appropriate) the existing HDD option in OPS235 labs because some students are requesting to install CentOS on their laptop (dual boot or single boot) and so continue doing the lab with all 3VMs on the laptop itself. So no VMs inside a VM stuff for them, except maybe name the labs from external HDD to 'using your own laptop' or some such.

  4. In case a yum update goes wrong and the advice given by the next run of yum update does not work in making the VM boot into GNOME, then try the following: yum install initial-setup initial-setup-gui gnome-initial-setup. You might have to reboot and agree to the license conditions at firstboot.

  5. Nested virtualization is incredibly slow if the host VM (VMware c7host) is using the default number of processor cores (1). Since all processing is done under c7host, it is safe to share all of your cores with Windows and VMware (c7host).

Fall 2016

  1. Lab 1: Unusual problem of network not showing up in c7host VM. Happened because I had not enabled a second network adapter in VMware Workstation Pro (use Team as the type).

  2. Change all VM sizes to be at least 20GB because some (lab 2 VMs) still say 15GB and they cause problems during installation for CentOS 7.2

  3. Keep consistent lab1 checking scripts for ALL OPS235 instructors (This semester was exception for Mark F., due to caching problem showing older partitions for previous semester).

  4. I think in future (based on scripting questions I gave on midterm) that we will need to add to the questions section of the labs something to do with shell scripting - even a simple walk-through. This can be incorporated into future quizzes.

  5. VMware gets odd naming for interfaces, for example ifconfig in VMware on CentOS 7 I get this (among other network setup). The problem is they've switched from the interface naming. There is a workaround in CentOS FAQ: https://wiki.centos.org/FAQ/CentOS7eno16777736: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500

  6. I noticed that some students have a different volume group name for centos2 than centos_centos2
    I suspect it is that students didn't follow instructions when creating the centos2 VM by specifying the correct hostname: centos2
    This could be corrected by including centos2 being checked for correct hostname in lab2 checking script, but not time to do that for this semester.

  7. Add youtube video on how LVM works for lab5 notes

  8. Check learning outcomes and topic outline match for OPS235 course

  9. For OPS235 Assignment #2, remove references to chkconfig command (deprecated), should use systemctl status service-name


CentOS 7 VM (VMware) Known Issues

HP Z230 machines on campus

  1. Not getting network interface in CentOS (VMware network configured to using NAT). Solved (sometimes) by adding another network interface and setting that interface to VMnet8
  2. USB failure from Windows host. Could this be due to bad USB cable, but one student reported Windows on HP Z230 automatically unmounts the USB drive while the VM was running thereby freezing CentOS in VMware

Lab 5 suggestion (received from a student)

Create a virtual disk /dev/vda in centos2 and use that virtual disk (vda) instead of /dev/sda (so use fdisk /dev/vda instead of using fdisk /dev/sda). This makes Lab 5 easier to handle accidental corruption students might make while doing that lab thereby destroying their centos2. This might require Lab 5 checker script to be tweaked to work with /dev/vda.

Lab 7 Issue

Some students could only get their labs to work with the browser after they did this:

iptables -I INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT

Assignment 2

chkconfig gives an error message telling students to use:

  1. systemctl list-dependents httpd
  2. systemctl list-dependents mysql

Previous Semesters

Summer 2016 (Refer to previous semesters below)=

  1. No entries


Winter 2016

  1. N.B. - On "TODO list" - LAB 1 - Picture under part 2 - The picture called "Partition Verification" shows a LVM setup, but the instructions ask specifically for a standard partition setup.

  2. FIXED BUT REQUIRES VERIFICATION THAT FIX WORKED - LAB 1 - Investigation 3 - Part 2 - Questions 21 - Not important but, report3.bash script uses the command "cat /root/install.log >> installation_report.html", the file /root/install.log does not exist on centos7 install.

  3. N.B. On List for Murray Saul to work on during non-contact period - "tweak" lab2check2.bash to provide additional checks including xml dumps to home directory for all VMs and reminder from script to back those items to USB key. Also should check if centos2 has / for 8 GB and /home for 2GB. I read somewhere that xfs can mess up with LVM which we talk about in lab5. For next time, I will add in requirement in lab2 signoff that students show for all VMs the /etc/fstab to ensure ext4 fs. Perhaps checking script can be modified next time to check for that... Good idea to expand shell script check for ALL labs. Student would be required to show same information PLUS the results from running the checking shell script.

  4. N.B. On List for Murray Saul to work on during non-contact period - It would be nice to rearrange the content for lab5 to discuss df -h and space concerns first, then flow into LVM. This would provide a better "flow" to reinforce student understanding. Shell script at end would remain at end to show how to use crontab to automate (flag) space issues.

  5. N.B. On List for Murray Saul to work on during non-contact period - Good idea to review study questions at end of each lab to see if they are applicable to each lab.

  6. Would be neat to create prezi slide shows for each lab preparation (for class). This would be in sync with OPS335 course. Online slides can be exported to PDF files as well.

  7. N.B. On List for Murray Saul to work on during non-contact period - Would be helpful for a script or program to check all links in all OPS235 (OPS335, etc) WIKIs to check for non-working links. This would allow course overseer to run just prior to the start of the semester and be incorporated into the startup checklist.

  8. N.B. On List for Murray Saul to work on during non-contact period - Some students note different vg name (like centos instead of centos_centos2). Solution is to get students to issue vgs to obtain vg name. Should investigate why this is happening to prevent (eg. shell script check at end of a lab).

  9. N.B. On List for Murray Saul to work on during non-contact period - Check mailx package when installed (lab5 example) for OPS235 to see why not sending mail to demo that script works for a lower threshold point for file space usage.

  10. N.B. On List for Murray Saul to work on during non-contact period - Method to better explain in lab7 tunnelling via local ports (eg. show some command of available ports, etc) - example:
    sysctl net.ipv4.ip_local_port_range
    net.ipv4.ip_local_port_range = 32768 61000
    (But where does that fit in with using 20808?)


Summer 2015

  1. LAB 1 - Installing NON-GUI version of Linux OS: A lot of students ran into the same problem with lab 1, that is they didn't pay close enough attention to the instructions and installed the OS without a GUI. But that is no flaw in your wiki, just the tendency of students to rush through things. I have done my best to enforce that they should read all the instructions carefully BEFORE they start on the labs.

  2. LAB2 - Backup Script demo: Current VM backup script should also allow for backing up xml configuration files.

  3. LAB - LVM: Current VM backup script does not factor in virtual hard drive images. May be a good idea to add this to the backup script, so students can be encouraged to run backup scripts.

  4. The wget http://belmont.senecac.on.ca/centos/7/isos/x86_64/CentOS-7-x86_64-LiveGNOME-1503.iso command is still not working

  5. When students issue the “service iptables restart” command it returns a message that says the service is dead and not running. Yet, I’ve tested the iptables themselves by adding a few rules and they are certainly still working. I’m really not sure what exactly is going on. Perhaps it’s just a glitch in CentOS7?

  6. The virtualization software also seems to need a system reboot before the virtual network will come into effect. Simply restarting the virt-manager or the libvirtd service doesn’t seem to do it. So, again, rebooting the system is the way to go to make sure the virtual default NAT network becomes visible for new VMs.

  7. Some students in lab2 may not be performing the correct steps in creating VMS (image paths and types). A shell script to be run to check this would be useful, but may need release time to create a comprehensive and user-friendly shell script.

Winter 2015


Additional Resources / Navigation