572
edits
Changes
m
→INVESTIGATION 3: MANAGING VIRTUAL MACHINES (KVM)
<li> When the machine restarts it will not boot since all system files have been removed!</li>
<li> Use the '''Force Off''' option to turn centos3 back off.</li>
<li> Restore the original image from the backup from your home directory to your '''images''' directory by typing this command:<br><b><code><span style="color:#3366CC;font-size:1.2em;">sudo gunzip < ~YourUserIdYourRegularUsername/backups/centos3.qcow2.gz > /var/lib/libvirt/images/centos3.qcow2'''</span></code></b></li>
<li> Restart the VM. Is it working normally?</li>
<li> You should also make a copy of the XML configuration file for each VM in case you "wipe" and re-install the host machine, and want to add a restored VM backups to the virtual machine manager list. We will demonstrate using the centos3 XML configuration file, and prove that a "clone" can be added to your list.Please perform the following step:</li>
do<br>
echo "Backing up VM #$num"<br>
gzip < /var/lib/libvirt/images/centos$num.qcow2 > ~yourusernameYourRegularUsername/backups/centos$num.qcow2.gz<br>
<br> echo "VM #$num BACKUP DONE"<br>
done<br><br>
done<br>
echo "Backing up VM #$numanswer"<br>
gzip < /var/lib/libvirt/images/centos$numanswer.qcow2 > ~yourusernameYourRegularUsername/centos$numanswer.qcow2.gz<br><br>
echo "VM #$numanswer BACKUP DONE"<br>
else<br>