• No se han encontrado resultados

MARCO TEÓRICO

2.5. Demandas durante la competición en baloncesto

a. From dom0, run the xm list -l host07 | grep location command to

determine the VNC port number for host07.

[dom0]# xm list –l host07 | grep location (location 0.0.0.0:5902)

(location 3)

• In this example, the VNC port number is 5902. This might not be true in your case. b. Run the vncviewer& command.

# vncviewer&

• The “VNC Viewer: Connection Details” dialog box is displayed.

juan corso arias (juanฺcorso@unimilitarฺeduฺco) has a

non-transferable license to use this Student Guideฺ

c. Enter localhost:<port_number>, substituting the port number displayed from the previous xm list –l host07 | grep location command. For example, if the port number is 5902, enter localhost:5902 and click Connect.

• The following screen shows that an error occurred during the boot process.

d. Close the window by clicking the X in the upper-right corner of the window. 3. Shut down host07.

a. Run the xm destroy host07 command to shut down the host07 VM. Run xm list to display the running VMs.

• The output shown is a sample, the ID and Time(s) values are different on your system.

# xm destroy host07 # xm list

Name ID Mem VCPUs State Time(s) Domain-0 0 2048 2 r--- 281.1 host02 2 1536 1 -b---- 159.0

juan corso arias (juanฺcorso@unimilitarฺeduฺco) has a

non-transferable license to use this Student Guideฺ

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Practices for Lesson 6: Installing Oracle Linux 7 by Using Kickstart

host03 3 1536 1 -b---- 13.2 • Notice that host07 is no longer active. You have two guests (host02 and host03)

running.

4. Configure host07 to boot from Oracle Linux 7 installation media.

• The procedure applies to Oracle VM Server for x86 version 2.2.1 Hardware Virtualized (HVM) Guests.

• For Para-virtualized (PVM) Guests, refer to MOS note 549410.1.

Use the vi editor to change the “boot” entry in the host07 vm.cfg file from boot = ‘cd’ to boot = ‘d’.

If the vm.cfg file is read-only, use :wq! to save the file. # cd /OVS/running_pool/host07

# vi vm.cfg ...

boot = ‘cd’ (old entry) boot = ‘d’ (new entry) ...

5. Start the host07 VM.

Run the xm create vm.cfg command to start the host07 VM. Run xm list to display the running VMs.

# xm create vm.cfg

Using config file “./vm.cfg”. Started domain host07 (id=#) # xm list

Name ID Mem VCPUs State Time(s) Domain-0 0 2048 2 r--- 281.1 host02 2 1536 1 -b---- 159.0 host03 3 1536 1 -b---- 13.2 host07 14 1536 1 -b---- 13.2 • Notice that host07 is now active.

6. Log in to host07.

a. Run the vncviewer& command. # vncviewer&

• The “VNC Viewer: Connection Details” dialog box is displayed.

juan corso arias (juanฺcorso@unimilitarฺeduฺco) has a

non-transferable license to use this Student Guideฺ

b. Enter localhost:<port_number>, substituting the port number displayed from the xm list –l host07 | grep location command in step 2a. For example, if the port number is 5902, enter localhost:5902 and click Connect.

• The Oracle Linux boot menu appears as shown:

• The Oracle Linux boot menu screen appears for only 60 seconds after which the “Test this media & install Oracle Linux 7.0” menu option is selected by default.

juan corso arias (juanฺcorso@unimilitarฺeduฺco) has a

non-transferable license to use this Student Guideฺ

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Practices for Lesson 6: Installing Oracle Linux 7 by Using Kickstart

• If you do not see this screen, meaning the 60-second timeout has expired, click the X in the top-right corner of the screen to close it, enter the following command from

dom0, and begin again starting with step 5.

# xm destroy host07

c. From the Oracle Linux boot menu, press the Esc key to display the boot: prompt. The following screen appears:

• Alternatively, you could use the arrow keys selecting “Troubleshooting” to display a new menu, and then select “Rescue a Oracle Linux system” from the

Troubleshooting menu.

7. Boot into Rescue Mode.

a. Enter linux rescue at the boot: prompt and press Enter. • It takes a few seconds for the rescue process to begin.

boot: linux rescue

juan corso arias (juanฺcorso@unimilitarฺeduฺco) has a

non-transferable license to use this Student Guideฺ

b. Review the information displayed on the following screen. Use the “Tab” key to select “Continue” and press “Enter.”

c. Review the information displayed on the following screen. Press “Enter” to continue.

juan corso arias (juanฺcorso@unimilitarฺeduฺco) has a

non-transferable license to use this Student Guideฺ

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Practices for Lesson 6: Installing Oracle Linux 7 by Using Kickstart

d. Review the information displayed on the following screen. Press “Enter” to continue.

• A shell prompt is displayed.

8. Repair the corrupted /boot/grub2/grub.cfg file.

a. Use the df command to view the mounted file systems.

• Notice that the file systems are mounted under the /mnt/sysimage directory. # df -h Filesystem ... Mounted on ... /dev/mapper/ol_host07-root ... /mnt/sysimage /dev/xvda1 ... /mnt/sysimage/boot ...

b. Use the ls command to view the contents of the current / directory. # ls /

bin dev firmware lib64 mnt proc run sys usr boot etc lib lost+found modules root sbin tmp var c. Use the chroot command to change the root partition of the rescue mode

environment to the root partition of your file system. # chroot /mnt/sysimage/

juan corso arias (juanฺcorso@unimilitarฺeduฺco) has a

non-transferable license to use this Student Guideฺ

d. Use the df command to view the mounted file systems. • Notice that the file system mount points are different.

# df -h Filesystem ... Mounted on /dev/mapper/ol_host07-root ... / ... /dev/xvda1 ... /boot ...

e. Use the ls command to view the contents of the current / directory. • Notice that the contents of the / directory are different.

# ls /

bin dev home lib64 mnt proc run srv tmp var boot etc lib media opt root sbin sys usr f. Use the cp command to restore /boot/grub2/grub.cfg from

/boot/grub2/grub.cfg.BAK.

# cp /boot/grub2/grub.cfg.BAK /boot/grub2/grub.cfg g. Use the exit command to exit the chroot environment.

# exit

h. Close the window by clicking the X in the top right corner of the window. 9. Boot host07 from the system hard drive.

a. From dom0, use the vi editor to change the “boot” entry in the host07 vm.cfg file

from boot = ‘d’ back to boot = ‘cd’. # cd /OVS/running_pool/host07 # vi vm.cfg

...

boot = ‘d’ (old entry) boot = ‘cd’ (new entry) ...

b. Use the xm destroy host07 command to shut down the host07 VM. # xm destroy host07

c. Use the xm create vm.cfg command to start the host07 VM. # xm create vm.cfg

Using config file “./vm.cfg”. Started domain host07 (id=#) 10. Log in to host07.

From dom0, use the ssh command to connect to 192.0.2.107 (host07). The root password is oracle.

• Use the IP address because the /etc/hosts file on dom0 does not contain an entry to resolve host07.

juan corso arias (juanฺcorso@unimilitarฺeduฺco) has a

non-transferable license to use this Student Guideฺ

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Practices for Lesson 6: Installing Oracle Linux 7 by Using Kickstart

• You need to wait a few seconds for the reboot to complete. # ssh 192.0.2.107

[email protected]’s password: oracle

• Notice that your system successfully boots from the hard drive and you can log in. 11. Remove host07 and clean up dom0.

a. Use the systemctl poweroff command to shut down host07. # systemctl poweroff

Connection to 192.0.2.107 closed by remote host. Connection to 192.0.2.107 closed.

b. From dom0, use the rm –r command to remove the

/OVS/running_pool/host07/ directory. # cd /OVS/running_pool

# rm –r host07

rm: descent into directory ‘host07’? y

rm: remove regular file ‘host07/system.img’? y rm: remove regular file ‘host07/vm.cfg’? y rm: remove directory ‘host07’? y

a. Use the /bin/rm –r command to remove the /var/www/html/OL71/ directory. # cd /var/www/html

# /bin/rm –r OL71/ 12. Restart host01 VM.

a. From dom0, change to the /OVS/running_pool/host01 directory and use the xm

create command as follows:

# cd /OVS/running_pool/host01 # xm create vm.cfg

Using config file “./vm.cfg”. Started domain host01 (id=...)

b. Use the xm list command to verify that host01, host02, and host03 are running and that host07 is not running.

# xm list

Name ID Mem VCPUs State Time(s) Domain-0 0 2048 2 r--- 758.9 host01 4 1536 1 -b---- 37.4 host02 5 1536 1 -b---- 37.3 host03 9 1536 1 -b---- 109.3

juan corso arias (juanฺcorso@unimilitarฺeduฺco) has a

non-transferable license to use this Student Guideฺ

Practices for Lesson 7: