Product SiteDocumentation Site

Fedora 18

Virtualization Administration Guide

Virtualization Documentation

Edition 1.0

Laura Novich

Legal Notice

Copyright © 2013 Fedora Project.
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 The original authors of this document, and Red Hat, designate the Fedora Project as the "Attribution Party" for purposes of CC-BY-SA. 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.
For guidelines on the permitted uses of the Fedora trademarks, refer to
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.
All other trademarks are the property of their respective owners.
The Virtualization Administration Guide covers administration of hosts, networking, storage, device and guest management, and troubleshooting.

1. Document Conventions
1.1. Typographic Conventions
1.2. Pull-quote Conventions
1.3. Notes and Warnings
2. We Need Feedback!
1. Server best practices
2. Security for virtualization
2.1. Storage security issues
2.2. SELinux and virtualization
2.3. SELinux
2.4. Virtualization firewall information
3. sVirt
3.1. Security and Virtualization
3.2. sVirt labeling
4. KVM live migration
4.1. Live migration requirements
4.2. Shared storage example: NFS for a simple migration
4.3. Live KVM migration with virsh
5. Remote management of guests
5.1. Remote management with SSH
5.2. Remote management over TLS and SSL
5.3. Transport modes
6. Overcommitting with KVM
7. KSM
8. Advanced virtualization administration
8.1. Control Groups (cgroups)
8.2. Hugepage support
9. Miscellaneous administration tasks
9.1. Automatically starting guests
9.2. Using qemu-img
9.3. Verifying virtualization extensions
9.4. Setting KVM processor affinities
9.5. Generating a new unique MAC address
9.6. Improving guest response time
9.7. Disable SMART disk monitoring for guests
9.8. Configuring a VNC Server
9.9. Gracefully shutting down guests
9.10. Virtual machine timer management with libvirt
10. Storage concepts
10.1. Storage pools
10.2. Volumes
11. Storage pools
11.1. Creating storage pools
11.1.1. Dedicated storage device-based storage pools
11.1.2. Partition-based storage pools
11.1.3. Directory-based storage pools
11.1.4. LVM-based storage pools
11.1.5. iSCSI-based storage pools
12. Volumes
12.1. Creating volumes
12.2. Cloning volumes
12.3. Adding storage devices to guests
12.3.1. Adding file based storage to a guest
12.3.2. Adding hard drives and other block devices to a guest
12.3.3. Managing storage controllers in a guest
12.3.4. Deleting and removing volumes
13. N_Port ID Virtualization (NPIV)
13.1. Identifying HBAs in a Host System
13.2. Verify NPIV is used on the HBA
13.2.1. Create and destroy a virtual HBA with NPIV
14. The Virtual Host Metrics Daemon (vhostmd)
14.1. Installing vhostmd on the host
14.2. Configuration of vhostmd
14.3. Starting and stopping the daemon
14.4. Verifying that vhostmd is working from the host
14.5. Configuring guests to see the metrics
14.6. Using vm-dump-metrics in Fedora guests to verify operation
15. Managing guests with virsh
15.1. virsh command quick reference
15.2. Attaching and updating a device with virsh
15.3. Connecting to the hypervisor
15.4. Creating a virtual machine XML dump (configuration file)
15.5. Suspending, resuming, saving and restoring a guest
15.6. Shutting down, rebooting and force-shutdown of a guest
15.7. Retrieving guest information
15.8. Retrieving node information
15.9. Storage pool information
15.10. Displaying per-guest information
15.11. Managing virtual networks
15.12. Migrating guests with virsh
15.13. Guest CPU model configuration
15.13.1. Introduction
15.13.2. Learning about the host CPU model
15.13.3. Determining a compatible CPU model to suit a pool of hosts
15.13.4. Configuring the guest CPU model
16. Managing guests with the Virtual Machine Manager (virt-manager)
16.1. Starting virt-manager
16.2. The Virtual Machine Manager main window
16.3. The virtual hardware details window
16.4. Virtual Machine graphical console
16.5. Adding a remote connection
16.6. Displaying guest details
16.7. Performance monitoring
16.8. Displaying CPU usage
16.9. Displaying Disk I/O
16.10. Displaying Network I/O
16.11. Implementing Migration
16.12. Accessing remote hosts with virt-manager
16.13. Creating storage pools using virt-manager
16.13.1. Creating a partition-based storage pool using virt-manager
16.13.2. Creating a directory-based storage pool with virt-manager
16.13.3. LVM based storage pools
16.13.4. Adding an iSCSI target to virt-manager
16.13.5. NFS-based storage pools
17. Guest disk access with offline tools
17.1. Introduction
17.2. Terminology
17.3. Installation
17.4. The guestfish shell
17.4.1. Viewing file systems with guestfish
17.4.2. Modifying files with guestfish
17.4.3. Other actions with guestfish
17.4.4. Shell scripting with guestfish
17.4.5. Augeas and libguestfs scripting
17.5. Other commands
17.6. virt-rescue: The rescue shell
17.6.1. Introduction
17.6.2. Running virt-rescue
17.7. virt-df: Monitoring disk usage
17.7.1. Introduction
17.7.2. Running virt-df
17.8. virt-resize: resizing guests offline
17.8.1. Introduction
17.8.2. Expanding a disk image
17.9. virt-inspector: inspecting guests
17.9.1. Introduction
17.9.2. Installation
17.9.3. Running virt-inspector
17.10. virt-win-reg: Reading and editing the Windows Registry
17.10.1. Introduction
17.10.2. Installation
17.10.3. Using virt-win-reg
17.11. Using the API from Programming Languages
17.11.1. Interaction with the API via a C program
17.12. Troubleshooting
17.13. Where to find further documentation
18. Virtual Networking
18.1. Virtual network switches
18.1.1. Network Address Translation
18.2. DNS and DHCP
18.3. Other virtual network switch routing types
18.4. The default configuration
18.5. Examples of common scenarios
18.5.1. Routed mode
18.5.2. NAT mode
18.5.3. Isolated mode
18.6. Managing a virtual network
18.7. Creating a virtual network
18.8. Attaching virtual network to host
19. qemu-kvm Whitelist
19.1. Introduction
19.2. Basic options
19.3. Disk options
19.4. Display options
19.5. Network options
19.6. Device options
19.7. Linux/Multiboot boot
19.8. Expert options
19.9. Help and information options
19.10. Miscellaneous options
20. Troubleshooting
20.1. Debugging and troubleshooting tools
20.2. kvm_stat
20.3. Troubleshooting with serial consoles
20.4. Virtualization log files
20.5. Loop device errors
20.6. Enabling Intel VT-x and AMD-V virtualization hardware extensions in BIOS
20.7. KVM networking performance
20.8. Missing characters on guest console with Japanese keyboard
A. Additional resources
A.1. Online resources
A.2. Installed documentation
B. Revision History