351.4 Libvirt Virtual Machine Management (weight: 9)
Description: Candidates should be able to manage virtualization hosts and virtual machines (‘libvirt domains’) using libvirt and related tools.
Key Knowledge Areas:
Understand the architecture of libvirt
Manage libvirt connections and nodes
Create and manage QEMU and Xen domains, including snapshots
Manage and analyze resource consumption of domains
Create and manage storage pools and volumes
Create and manage virtual networks
Migrate domains between nodes
Understand how libvirt interacts with Xen and QEMU
Understand how libvirt interacts with network services such as dnsmasq and radvd
Understand libvirt XML configuration files
Awareness of virtlogd and virtlockd
The following is a partial list of the used files, terms and utilities:
libvirtd
/etc/libvirt/
virsh (including relevant subcommands)
Libvirt es una colección de software que proporciona una manera conveniente de administrar máquinas virtuales y otras funciones de virtualización, como la administración de interfaz de red y almacenamiento.
virtlogd un servicio auxiliar que utiliza livbirt, se encarga de todo relacionado con los logs
virtlockd se usa para administrar los bloqueos contra los recursos de la máquina virtual, como sus discos.
dnsmasq es el servicio dhcp y dns que utiliza libvirt
radvd ( Router Advertisement Daemon )
Es un servicio de alcance local para gestionar direcciones IPv6 entre el host y el router
Para que esta autoconfiguración funcione en los hosts de una red, Los enrutadores de la red local tienen que ejecutar un programa que responda Las solicitudes de autoconfiguración de los hosts.
Gestion de maquinas
virsh list --all
virsh start myMV # arrancar
virsh shutdown myMV # apagar
virsh destroy myMV # forzar apagado
virsh reboot myMV # reiniciar
virsh suspend myMV # suspender
virsh resume myMV # despertar de suspensión
virsh save myMV archivo_hibernacion # hibernar
virsh restore archivo_hibernacion # desperta de hibernacion
virsh domstate myMV # estado de maquina
virsh dominfo myMV # informacion de una maquina
virsh undefine myMV # eliminar maquina
virsh undefine myMV --remove-all-storage # eliminar maquina y disco
virsh snapshot-create myMV # crear snapshot
virsh snapshot-list myMV # listar snapshot
virsh snapshot-revert myMV nameSnapshot # restaurar snapshot
# almacenamiento
virsh pool-list
virsh pool-info
virsh vol-list namePool
virsh vol-info nameVol --pool namePool
# red
virsh iface-list
virsh net-list
virsh net-define isolated2.xml
virsh net-dumpxml isolated2
virsh net-start isolated2Network isolated2 started