1,885
edits
Changes
no edit summary
[[Category:OPS235]][[Category:OPS235 Labs]]
{{Admon/caution|Braille Only|If you are not using a braille reader, please use [[OPS235 Lab 2]] instead of this lab.}}{{Admon/note|htp|Wherever this document says "htp", it should be changed to "http". This was done in order to avoid reported problems with some braille readers.}}
= OPS235 Lab 2 - Braille : Fedora 16 Installation on Virtual Machines =
# Start the virtualization service: <code>systemctl start libvirtd</code>
== Investigation 1: Installing from a Live Disc Network Install with Kickstart ==
=== VM Details ===
* '''Name:''' fedora1
* '''Boot media:''' Fedora Live CD* '''Media and Installation source:''' Network server: http://belmont.senecac.on.ca/fedora/releases/16/Fedora/x86_64/os/* '''Kickstart file:''' http://zenit.senecac.on.ca/~chris.tyler/fedora16-vda-ks-200.cfg
* '''Memory:''' 768MB
* '''Disk space:''' 10GB
# Record the current time.
# Run this command to start the installation of a virtual machine named fedora1: virt-install --connect qemu:///system --name fedora1 -r 768 --os-variant fedora16 --network network=default --disk /var/lib/libvirt/images/f16-ks-1,size=10 -l httphtp://belmont.senecac.on.ca/fedora/releases/16/Fedora/x86_64/os/ -x ks=httphtp://zenit.senecac.on.ca/~chris.tyler/fedora16-vda-ks-200.cfg --noautoconsole
# The virtual machine will stop when the installation is complete. You can see if the virtual machine is running with the command: virsh list
# Record the approximate time that the installation ends. Subtract the start time to find out how long the installation took.
# Once the virtual machine has been installed, start it with this command: virsh start fedora1
# In order to connect to the virtual machine, you need to know:
#* The account name and password of a regular user.
#* The password for the root (administrator) user.
# To gather the information listed above, study the [http://zenit.senecac.on.ca/~chris.tyler/fedora16-vda-ks-200.cfg kickstart file]. Record your answers.
# Using the information you gathered from the kickstart file, connect to the virtual machine: ssh '''accountname''@'''IPaddress'' (substitute the correct account name and IP address)
# Enter the password when requested.
# Confirm that the virtual machine is off by executing this command on your f16host: virsh list
# Install another virtual machine by modifying the command used in Investigation 1. Incorporate these changes:
## Use the name "fedora2" for this virtual machine.
## Change the name of the disk file to match the name of the virtual machine.
## Use a disk size of 15G
# Start fedora2 and confirm that you can connect to it.
# The IP address on fedora1 and fedora2 are the same, which would cause a conflict if they were booted at the same time. Change the IP address of fedora2 to 192.168.122.201 by editing the file /etc/sysconfig/network-scripts/ifcfg-eth0
# Restart fedora2 and confirm that the IP address has changed to the correct value.
# Shut down fedora2.
# Make a copy of the [http://zenit.senecac.on.ca/~chris.tyler/fedora16-vda-ks-200.cfg kickstart file]. Modify it so that the user account that is created has the same user ID as your matrix account. Change the IP address in the kickstart file to 192.168.122.202. Place this the modified kickstart file in a location where it can be accessed via a web browser (for example, in the public_html directory in your Matrix account).
# Modify the command used in Investigation 1 to incorporate these changes:
## Use the name "fedora3" for this virtual machine.
## Use Change the name of the disk file to match the name of the IP address 192virtual machine.168.122## Use a disk size of 12G.202
## Use your kickstart file instead of the original one.
# Start fedora3 and confirm that you can connect to it, using your Matrix ID and password.
# Shut down fedora3.
== Investigation 24: Installing Managing Virtual Machines from the Network Command Line ==
# Enter these commands and note the result:
#* <code>virsh list</code>
# Start the ''fedora3'' virtual machine from the command line: <code>virsh start fedora3</code>
# Repeat the commands from step 2 and notice any changes.
# Stop the ''fedora3'' virtual machine: <code>virsh shutdown fedora3</code> {{Admon/note|Virtual Machine Does not Shutdown from Command|Note: If the Virtual machine fails to shutdown from the <code>virsh shutdown</code> command, then you can go to or from the '''Virtual Machine manager''' and '''<code>halt''' </code> or <code>poweroff</code> or '''<code>shutdown''' </code> commands within the VM itself, then you can click the use dthe <code>virsh destroy ''name'PowerOff''' button in the VM window</code> command. You'll should want to avoid a forced shutdown since those are that is equivalent to yanking the cord out of the wall on a physical machine!|}}<ol> <li value="6"># Confirm that ''fedora3'' has been shut down.</li> <li># Execute this command: <code>virsh dumpxml fedora3 >fedora3.xml</code></li> <li># Examine the file <code>fedora3.xml</code>. What does it contain? What format is it in?</li> <li># Make a copy of <code>fedora3.xml</code> called <code>fedora3a.xml</code>.</li> <li># Edit the file <code>fedora3a.xml</code>, making the following changes:</li></ol>::#* Change the name (in the file, not the file name) to <code>fedora3a</code>::#* Change at least one of the hexadecimal characters in the UUID. Do not change the length of the UUID. Valid hexadecimal characters are 0-9 and a-f.<ol> <li value="11"># Issue this command: <code>virsh define fedora3a.xml</code> <li># Issue the command <code>virsh list --all</code> and record any changes. <li># Issue the command: <code>virsh undefine fedora3a</code> <li># List all of the virtual machines again, and note any changes.</ol>
# Shut down all of the virtual machines.
# Change to the directory <code>/var/lib/libvirt/images/</code>. Note the size of the files in this directory. What do these files contain?
# Make a compressed backup of the <code>fedora3.img</code> file to your home directory with this command: <code>gzip <fedora3.img >~'''YourUserId'''/fedora3.img.backup.gz</code>{{Admon/caution|Make sure the backup is successful!|If there are any error messages, '''DO NOT''' proceed past this point. You're going to destroy your fedora3 virtual machine and restore it using the backup you have created -- if there are any problems with the backup, you will not have a working virtual machine, and will have to re-install it.}}
<ol>
<li value="4">Compare the size of the compressed and original files.</li>
::* In order to fully back up a virtual machine, what information should be saved in addition to the virtual machine image?
'''Answer the Investigation 6 5 observations / questions in your lab log book.''' == Investigation 7: Kickstart Files ==
When you perform a non-Kickstart installation, the installation program creates a Kickstart file in the <code>/root</code> directory for reference.
# How could you use the kickstart file produced by the installation program to perform additional, identical installations?
'''Answer the Investigation 7 6 observations / questions in your lab log book.'''
= Completing the Lab =
# Three working virtual machines created.
# Four kickstart files.
# All virtual machines backed up.
# Installation comparison table filled in.
# Lag Lab Logbook (lab2) notes filled-in.
= Preparing for the Quizzes =
# What is the name of the Fedora installation program?
# What factors affect installation time?
# What does the file <code>/root/anaconda-ks.cfg</code> contain, and how is it created?
# How do you start and stop virtual machines?
#* virt-install
#* kvm
# The kickstart installation (fedora3) was a installations you performed were network installationinstallations. Can a kickstart file be used with a DVD installation?# The kickstart installation (fedora3) was fairly fast. Why? Under what circumstances would it take a long time, even on a fast network?# What other types of installation sources are possible (besides Live Disc, Installation Disc, and Network?)