Beruflich Dokumente
Kultur Dokumente
The Xen Project hypervisor is responsible for handling CPU, Memory, and interrupts
as it runs directly on the hardware. It runs immediately after exiting
bootloader. domain/guest is a running instance of virtual machine.
The Guest VMs are called Unprivileged domain (or DomU) since they have no
privilege access to hardware or I/O functionality. In other words, they are totally
isolated from the hardware.
PV vs HVM
Paravirtualization (PV)
Because the hypervisor starts before your operating system we need to change how
the system boot process is setup:
# vim /etc/default/grub
Change memory amount for Domain0 to match your memory allocated.
GRUB_CMDLINE_XEN_DEFAULT="dom0_mem=2048M,max:4096M
cpuinfo com1=115200,8n1 console=com1,tty loglvl=all
guest_loglvl=all"
4. Run grub-bootxen.sh script to make sure grub is
updated /boot/grub2/grub.cfg
# systemctl reboot
6. Once you reboot, verify that the new kernel is running with:
# uname -r
7. Verify that xen is running using:
# xl info
host : xen.example.com
release : 3.18.21-17.el7.x86_64
machine : x86_64
nr_cpus : 6
max_cpu_id : 5
nr_nodes : 1
cores_per_socket : 1
threads_per_core : 1
.........................................................
................
Deploy first VM
At this point you should be ready to bring up your first VM. In this demo, I’ll
use virt-install to deploy a VM on Xen.
virt-install -d \
--connect xen:/// \
--name testvm \
--os-type linux \
--os-variant rhel7 \
--vcpus=1 \
--paravirt \
--ram 1024 \
--disk /var/lib/libvirt/images/testvm.img,size=10 \
--nographics -l
"http://192.168.122.1/centos/7.2/os/x86_64" \