Changes

Jump to: navigation, search

OPS235 Lab 2 - CentOS7 - SSD

37 bytes added, 09:14, 14 June 2016
no edit summary
:: <b><code><span style="color:#3366CC;font-size:1.2em;">virsh list --all</span></code></b>
:: <b><code><span style="color:#3366CC;font-size:1.2em;">virsh list --inactive</span></code></b>
<ol><li value="4">Now, shut-down your centos1 VM normally, and close the centos1 VM window.</li><li>Switch to your terminal and issue the command: <b><code><span style="color:#3366CC;font-size:1.2em;">virsh start centos1</span></code></b></li><li>Using the appropriate command check to see if your centos1 VM is now running.</li><li>There are other commands that can be used (such as '''suspend''', or '''shutdown'''). The "shutdown" command may not always work since it relies on the guest handling a particular ACPI event. Why do you think it is useful to have commands to manipulate VMs?</li><li>Since this is a text-based version of Linux, you do not need to turn off the screen-saver.</li></ol>{{Admon/important|Virtual Machine Does not Shutdown from Command|If the Virtual machine fails to shutdown from the <code>virsh shutdown</code> command, then you can go to the '''Virtual Machine manager''' and '''halt''' or '''shutdown''' within the VM itself, then you can click the '''PowerOff''' button in the VM window. You'll want to avoid a forced shutdown since those are equivalent to yanking the power cord out of the wall on a physical machine!|}}# <ol><li value="9">Open a Bash shell terminal and login as root.</li># <li>Use a text editor (such as <b><code><span style="color:#3366CC;font-size:1.2em;">vi</span></code></b> or <b><code><span style="color:#3366CC;font-size:1.2em;">nano</span></code></b>) to create a Bash Shell script called: <b><code><span style="color:#3366CC;font-size:1.2em;">backupVM.bash</span></code></b> in /root's home directory.</li># <li>Enter the following text content into your text-editing session:
<code style="color:#3366CC;font-family:courier;font-size:.9em;margin-left:20px;">
<br>
fi
</code>
<br></li><ol><li value="712">Save your editing session, but remain in the text editor.</li><li>This shell script is designed particularly for your centos1, centos2, and centos3 VMS.</li><li>The code displayed below will prompt the user if they wish for all VMs to be backed-up; otherwise, allow the user the option of specifying which VMs to be backed-up. Add the following code</li></ol>
<br>
<code style="color:#3366CC;font-family:courier;font-size:.9em;">
13,420
edits

Navigation menu