Red_Hat_Enterprise_Linux-6-Virtualization_Administration_Guide-en-US.pdf
(
5845 KB
)
Pobierz
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
Red Hat Enterprise Linux 6
Virtualization
Administration Guide
Virtualization Documentation
Virtualization Administration Guide
Red Hat Enterprise Linux 6 Virtualization Administration Guide
Virtualization Documentation
Edition 0.1
Author
Copyright
©
2011 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons
Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available
at
http://creativecommons.org/licenses/by-sa/3.0/
. In accordance with CC-BY-SA, if you distribute this
document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert,
Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, the Infinity
Logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux
®
is the registered trademark of Linus Torvalds in the United States and other countries.
Java
®
is a registered trademark of Oracle and/or its affiliates.
XFS
®
is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States
and/or other countries.
MySQL
®
is a registered trademark of MySQL AB in the United States, the European Union and other
countries.
All other trademarks are the property of their respective owners.
1801 Varsity Drive
Raleigh, NC 27606-2072 USA
Phone: +1 919 754 3700
Phone: 888 733 4281
Fax: +1 919 754 3701
The Virtualization Administration Guide covers administration of hosts, networking, storage, device
and guest management, and troubleshooting.
Preface
vii
1. Document Conventions
..................................................................................................
vii
1.1. Typographic Conventions
....................................................................................
vii
1.2. Pull-quote Conventions
.......................................................................................
viii
1.3. Notes and Warnings
............................................................................................
ix
2. Getting Help and Giving Feedback
..................................................................................
ix
2.1. Do You Need Help?
.............................................................................................
ix
2.2. We Need Feedback!
.............................................................................................
x
1. Server best practices
1
2. Security for virtualization
3
2.1. Storage security issues
................................................................................................
3
2.2. SELinux and virtualization
.............................................................................................
3
2.3. SELinux
.......................................................................................................................
4
2.4. Virtualization firewall information
...................................................................................
5
3. sVirt
7
3.1. Security and Virtualization
............................................................................................
8
3.2. sVirt labeling
................................................................................................................
8
4. KVM live migration
11
4.1. Live migration requirements
........................................................................................
11
4.2. Shared storage example: NFS for a simple migration
...................................................
12
4.3. Live KVM migration with virsh
.....................................................................................
13
4.4. Migrating with virt-manager
.........................................................................................
14
5. Remote management of guests
25
5.1. Remote management with SSH
..................................................................................
25
5.2. Remote management over TLS and SSL
.....................................................................
27
5.3. Transport modes
........................................................................................................
27
6. Overcommitting with KVM
31
7. KSM
33
8. Advanced virtualization administration
37
8.1. Control Groups (cgroups)
............................................................................................
37
8.2. Hugepage support
......................................................................................................
37
9. Miscellaneous administration tasks
39
9.1. Automatically starting guests
.......................................................................................
39
9.2. Using qemu-img
.........................................................................................................
39
9.3. Verifying virtualization extensions
................................................................................
42
9.4. Setting KVM processor affinities
..................................................................................
43
9.5. Generating a new unique MAC address
......................................................................
47
9.6. Improving guest response time
...................................................................................
48
9.7. Disable SMART disk monitoring for guests
..................................................................
49
9.8. Configuring a VNC Server
..........................................................................................
49
9.9. Gracefully shutting down guests
..................................................................................
50
9.10. Virtual machine timer management with libvirt
............................................................
51
10. Storage concepts
55
10.1. Storage pools
...........................................................................................................
55
10.2. Volumes
..................................................................................................................
55
11. Storage pools
59
11.1. Creating storage pools
.............................................................................................
59
11.1.1. Dedicated storage device-based storage pools
................................................
59
iii
Virtualization Administration Guide
11.1.2. Partition-based storage pools
..........................................................................
61
11.1.3. Directory-based storage pools
.........................................................................
68
11.1.4. LVM-based storage pools
...............................................................................
76
11.1.5. iSCSI-based storage pools
.............................................................................
85
11.1.6. NFS-based storage pools
...............................................................................
95
12. Volumes
101
12.1. Creating volumes
....................................................................................................
101
12.2. Cloning volumes
.....................................................................................................
101
12.3. Adding storage devices to guests
............................................................................
102
12.3.1. Adding file based storage to a guest
.............................................................
102
12.3.2. Adding hard drives and other block devices to a guest
...................................
104
12.4. Deleting and removing volumes
...............................................................................
105
13. N_Port ID Virtualization (NPIV)
107
13.1. Enabling NPIV on the switch
...................................................................................
107
13.1.1. Identifying HBAs in a Host System
................................................................
107
13.1.2. Verify NPIV is used on the HBA
....................................................................
108
14. The Virtual Host Metrics Daemon (vhostmd)
111
14.1. Installing vhostmd on the host
.................................................................................
111
14.2. Configuration of vhostmd
........................................................................................
111
14.3. Starting and stopping the daemon
...........................................................................
112
14.4. Verifying that vhostmd is working from the host
........................................................
112
14.5. Configuring guests to see the metrics
......................................................................
112
14.6. Using vm-dump-metrics in Red Hat Enterprise Linux guests to verify operation
............
113
15. Managing guests with virsh
115
15.1. virsh command quick reference
...............................................................................
115
15.2. Attaching and updating a device with virsh
...............................................................
119
15.3. Connecting to the hypervisor
...................................................................................
119
15.4. Creating a virtual machine XML dump (configuration file)
..........................................
119
15.5. Suspending, resuming, saving and restoring a guest
.................................................
121
15.6. Shutting down, rebooting and force-shutdown of a guest
...........................................
122
15.7. Retrieving guest information
....................................................................................
122
15.8. Retrieving host information
......................................................................................
123
15.9. Storage pool information
.........................................................................................
124
15.10. Displaying per-guest information
............................................................................
124
15.11. Managing virtual networks
.....................................................................................
126
15.12. Migrating guests with virsh
....................................................................................
127
15.13. Guest CPU model configuration
.............................................................................
128
15.13.1. Introduction
................................................................................................
128
15.13.2. Learning about the host CPU model
............................................................
128
15.13.3. Determining a compatible CPU model to suit a pool of hosts
.........................
129
15.13.4. Configuring the guest CPU model
...............................................................
131
16. Managing guests with the Virtual Machine Manager (virt-manager)
133
16.1. Starting virt-manager
...............................................................................................
133
16.2. The Virtual Machine Manager main window
.............................................................
135
16.3. The virtual hardware details window
........................................................................
136
16.4. Virtual Machine graphical console
............................................................................
137
16.5. Adding a remote connection
....................................................................................
139
16.6. Displaying guest details
..........................................................................................
141
16.7. Performance monitoring
..........................................................................................
149
16.8. Displaying CPU usage
............................................................................................
150
16.9. Displaying Disk I/O
.................................................................................................
152
iv
16.10. Displaying Network I/O
..........................................................................................
154
17. Guest disk access with offline tools
157
17.1. Introduction
............................................................................................................
157
17.2. Terminology
............................................................................................................
157
17.3. Installation
..............................................................................................................
158
17.4. The guestfish shell
..................................................................................................
158
17.4.1. Viewing file systems with guestfish
................................................................
159
17.4.2. Modifying files with guestfish
........................................................................
161
17.4.3. Other actions with guestfish
..........................................................................
161
17.4.4. Shell scripting with guestfish
.........................................................................
161
17.4.5. Augeas and libguestfs scripting
.....................................................................
162
17.5. Other commands
....................................................................................................
163
17.6. virt-rescue: The rescue shell
...................................................................................
163
17.6.1. Introduction
..................................................................................................
163
17.6.2. Running virt-rescue
......................................................................................
164
17.7. virt-df: Monitoring disk usage
...................................................................................
165
17.7.1. Introduction
..................................................................................................
165
17.7.2. Running virt-df
.............................................................................................
165
17.8. virt-resize: resizing guests offline
.............................................................................
166
17.8.1. Introduction
..................................................................................................
166
17.8.2. Expanding a disk image
...............................................................................
166
17.9. virt-inspector: inspecting guests
...............................................................................
168
17.9.1. Introduction
..................................................................................................
168
17.9.2. Installation
...................................................................................................
168
17.9.3. Running virt-inspector
...................................................................................
168
17.10. virt-win-reg: Reading and editing the Windows Registry
...........................................
170
17.10.1. Introduction
................................................................................................
170
17.10.2. Installation
.................................................................................................
170
17.10.3. Using virt-win-reg
.......................................................................................
170
17.11. Using the API from Programming Languages
..........................................................
171
17.11.1. Interaction with the API via a C program
......................................................
172
17.12. Troubleshooting
....................................................................................................
175
17.13. Where to find further documentation
......................................................................
175
18. Virtual Networking
177
18.1. Virtual network switches
..........................................................................................
177
18.1.1. Network Address Translation
........................................................................
178
18.2. DNS and DHCP
.....................................................................................................
179
18.3. Other virtual network switch routing types
................................................................
180
18.4. The default configuration
.........................................................................................
182
18.5. Examples of common scenarios
..............................................................................
183
18.5.1. Routed mode
...............................................................................................
184
18.5.2. NAT mode
...................................................................................................
186
18.5.3. Isolated mode
..............................................................................................
186
18.6. Managing a virtual network
.....................................................................................
186
18.7. Creating a virtual network
.......................................................................................
189
18.8. Attaching virtual network to host
..............................................................................
198
19. libvirt configuration reference
203
20. Creating custom libvirt scripts
205
20.1. Using XML configuration files with virsh
...................................................................
205
21. qemu-kvm Whitelist
207
21.1. Introduction
............................................................................................................
207
v
Plik z chomika:
meganbit
Inne pliki z tego folderu:
Red_Hat_Enterprise_Linux-6-Deployment_Guide-en-US.pdf
(12267 KB)
Red_Hat_Enterprise_Linux-6-Developer_Guide-en-US.pdf
(2571 KB)
Red_Hat_Enterprise_Linux-6-Global_File_System_2-en-US.pdf
(506 KB)
Red_Hat_Enterprise_Linux-6-Hypervisor_Deployment_Guide-en-US.pdf
(696 KB)
Red_Hat_Enterprise_Linux-6-Identity_Management_Guide-en-US.pdf
(5031 KB)
Inne foldery tego chomika:
Analiza matematyczna
angielski
Automatyka
Nowy folder
Zgłoś jeśli
naruszono regulamin