Open main menu

CDOT Wiki β


OPS235 Lab 2

150 bytes removed, 14:58, 25 January 2019
Part 1: Backing Up Virtual Machines
# 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</span></code></b></li><li><b><code><span style="color:#3366CC;font-size:1.2em;">wget</span></code></b><br><br></li></ul><ol><li value="17">The downloaded file "practical1.qcow2.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 the qcow2 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 practical1centos4.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.}}