Linux Virtualization Configuration: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(14 intermediate revisions by the same user not shown)
Line 3: Line 3:
* [[Linux Virtualization#Subjects|Linux Virtualization]]
* [[Linux Virtualization#Subjects|Linux Virtualization]]


=Overview=
=/etc/sysconfig/libvirtd=


=Storage Pool Configuration=
The configuration file of the [[Linux_Virtualization_Concepts#libvirtd|libvirtd]] service.


* [[KVM Virtualization Disk-Based Storage Pool Configuration|Disk-Based Storage Pool Configuration]]
=/etc/sysconfig/libvirt-guests=
* [[KVM Virtualization Partition-Based Storage Pool Configuration|Partition-Based Storage Pool Configuration]]
* [[KVM Virtualization Directory-Based Storage Pool Configuration|Directory-Based Storage Pool Configuration]]
* [[KVM Virtualization LVM-Based Storage Pool Configuration|LVM-Based Storage Pool Configuration]]
* [[KVM Virtualization Storage Pool Deletion|Storage Pool Deletion]]


=Storage Volume Configuration=
The configuration file of the [[Linux_Virtualization_Concepts#libvirt-guests|libvirt-guests]] service. Note that the service is not automatically enabled.


* [[Virsh_vol-create-as|Storage Volume Creation]]
==Configure Guests to Gracefully Shut Down==
* [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Virtualization_Deployment_and_Administration_Guide/sect-Storage_Volumes-Cloning_volumes.html Storage Volume Cloning]
* [[virsh vol-delete|Storage Volume Deletion]]


=Create a Guest Virtual Machine=
<pre>
ON_SHUTDOWN=shutdown
SHUTDOWN_TIMEOUT=300
</pre>


{{Internal|virt-install|virt-install}}
==Configure Guests to Start at Boot==
 
All guests that were running on shutdown can be configured to automatically start on boot, regardless of their autostart settings:
 
<pre>
ON_BOOT=start
</pre>
 
=Virtual Switch Configuration=
 
==NAT IP Masquerading==
 
Shut down the [[KVM_Virtual_Networking_Concepts#Virtual_Network_Switch|virtual switch]] before modifying the [[Iptables_Command_Line_Tool_Examples#NAT_IP_Masquerading_Configuration|iptables configuration]].
 
The public IP ranges for forward mode NAT, in order to create a port masquerading range can be set by running:
 
<pre>
iptables -j SNAT --to-source [start-ip]-[end-ip]
</pre>


=Organizatorium=
=Organizatorium=


* [[qemu-img]]
* Configuration files https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Virtualization_Deployment_and_Administration_Guide/sect-Manipulating_the_domain_xml-Devices.html#sect-Devices-Network_interfaces
* Configuration files https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Virtualization_Deployment_and_Administration_Guide/sect-Manipulating_the_domain_xml-Devices.html#sect-Devices-Network_interfaces

Latest revision as of 20:43, 27 June 2017

Internal

/etc/sysconfig/libvirtd

The configuration file of the libvirtd service.

/etc/sysconfig/libvirt-guests

The configuration file of the libvirt-guests service. Note that the service is not automatically enabled.

Configure Guests to Gracefully Shut Down

ON_SHUTDOWN=shutdown
SHUTDOWN_TIMEOUT=300

Configure Guests to Start at Boot

All guests that were running on shutdown can be configured to automatically start on boot, regardless of their autostart settings:

ON_BOOT=start

Virtual Switch Configuration

NAT IP Masquerading

Shut down the virtual switch before modifying the iptables configuration.

The public IP ranges for forward mode NAT, in order to create a port masquerading range can be set by running:

iptables -j SNAT --to-source [start-ip]-[end-ip]

Organizatorium