Changes

Jump to: navigation, search

OPS245 Lab 2

23 bytes added, 11:39, 24 January 2021
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>
&nbsp;do<br>
&nbsp;&nbsp;echo "Backing up VM #$num"<br>
&nbsp;&nbsp;gzip < /var/lib/libvirt/images/centos$num.qcow2 > ~yourusernameYourRegularUsername/backups/centos$num.qcow2.gz<br>
<br>&nbsp;&nbsp;echo "VM #$num BACKUP DONE"<br>
&nbsp;done<br><br>
&nbsp;done<br>
&nbsp;echo "Backing up VM #$numanswer"<br>
&nbsp;gzip < /var/lib/libvirt/images/centos$numanswer.qcow2 > ~yourusernameYourRegularUsername/centos$numanswer.qcow2.gz<br><br>
&nbsp;echo "VM #$numanswer BACKUP DONE"<br>
else<br>
572
edits

Navigation menu