Eu compilei com sucesso o uso do XEN seguindo as etapas:
wget http://bits.xensource.com/oss-xen/release/4.4.1/xen-4.4.1.tar.gz
tar xzvf xen-4.4.1.tar.gz
cd ./xen-4.4.1
export C_INCLUDE_PATH=/usr/include/x86_64-linux-gnu
./configure
make -j4 dist-xen
make -j4 dist-tools
sudo su
make -j4 install-xen
make -j4 install-tools
echo "GRUB_CMDLINE_XEN_DEFAULT=\"dom0_mem=4096M,max:4096M dom0_max_vcpus=2 dom0_vcpus_pin=true\"" >> /etc/default/grub
echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib" >> ~/.bashrc
update-grub
echo "none /proc/xen xenfs defaults,nofail 0 0" >> /etc/fstab
echo "xen-evtchn" >> /etc/modules
echo "xen-privcmd" >> /etc/modules
update-rc.d xencommons defaults 19 18
update-rc.d xendomains defaults 21 20
update-rc.d xen-watchdog defaults 22 23
reboot
Agora, meu diretório /boot
parece seguir:
root@Debian-78-wheezy-64-minimal ~/workplace/backup_xen_boot # ls -la /boot/
total 37M
drwxr-xr-x 4 root root 4.0K Apr 22 14:27 .
drwxr-xr-x 24 root root 4.0K Apr 22 12:47 ..
-rw-r--r-- 1 root root 154K Apr 8 19:23 config-3.16.0-0.bpo.4-amd64
-rw-r--r-- 1 root root 127K Feb 22 06:16 config-3.2.0-4-amd64
drwxr-xr-x 4 root root 12K Apr 22 15:07 grub
-rw-r--r-- 1 root root 15M Apr 22 12:47 initrd.img-3.16.0-0.bpo.4-amd64
-rw-r--r-- 1 root root 11M Apr 22 12:38 initrd.img-3.2.0-4-amd64
drwx------ 2 root root 16K Apr 22 11:40 lost+found
-rw-r--r-- 1 root root 2.6M Apr 8 19:23 System.map-3.16.0-0.bpo.4-amd64
-rw-r--r-- 1 root root 2.1M Feb 22 06:16 System.map-3.2.0-4-amd64
-rw-r--r-- 1 root root 3.0M Apr 8 19:16 vmlinuz-3.16.0-0.bpo.4-amd64
-rw-r--r-- 1 root root 2.8M Feb 22 06:05 vmlinuz-3.2.0-4-amd64
-rw-r--r-- 1 root root 831K Apr 22 12:14 xen-4.4.1.gz
lrwxrwxrwx 1 root root 12 Apr 22 12:14 xen-4.4.gz -> xen-4.4.1.gz
lrwxrwxrwx 1 root root 12 Apr 22 12:14 xen-4.gz -> xen-4.4.1.gz
Eu tive que excluir: xen.gz
, que era link simbólico para xen-4.4.1.gz
e também xen-syms-4.4.1
(acho que isso é um símbolo de depuração se não me corrigir, por favor) devido ao aviso que recebo quando eu tentei update-grub
Minha configuração do grub2 é a seguinte:
root@Debian-78-wheezy-64-minimal ~/workplace/backup_xen_boot # grep "^menuentry" /boot/grub/grub.cfg | cut -d "'" -f2 | cat -n | awk '{$1=$1-1; print $0}'
0 Debian GNU/Linux, with Linux 3.16.0-0.bpo.4-amd64
1 Debian GNU/Linux, with Linux 3.16.0-0.bpo.4-amd64 (recovery mode)
2 Debian GNU/Linux, with Linux 3.2.0-4-amd64
3 Debian GNU/Linux, with Linux 3.2.0-4-amd64 (recovery mode)
4 Debian GNU/Linux, with Xen 4 and Linux 3.16.0-0.bpo.4-amd64
5 Debian GNU/Linux, with Xen 4 and Linux 3.16.0-0.bpo.4-amd64 (recovery mode)
6 Debian GNU/Linux, with Xen 4 and Linux 3.2.0-4-amd64
7 Debian GNU/Linux, with Xen 4 and Linux 3.2.0-4-amd64 (recovery mode)
8 Debian GNU/Linux, with Xen 4.4 and Linux 3.16.0-0.bpo.4-amd64
9 Debian GNU/Linux, with Xen 4.4 and Linux 3.16.0-0.bpo.4-amd64 (recovery mode)
10 Debian GNU/Linux, with Xen 4.4 and Linux 3.2.0-4-amd64
11 Debian GNU/Linux, with Xen 4.4 and Linux 3.2.0-4-amd64 (recovery mode)
12 Debian GNU/Linux, with Xen 4.4.1 and Linux 3.16.0-0.bpo.4-amd64
13 Debian GNU/Linux, with Xen 4.4.1 and Linux 3.16.0-0.bpo.4-amd64 (recovery mode)
14 Debian GNU/Linux, with Xen 4.4.1 and Linux 3.2.0-4-amd64
15 Debian GNU/Linux, with Xen 4.4.1 and Linux 3.2.0-4-amd64 (recovery mode)
root@Debian-78-wheezy-64-minimal ~/workplace/backup_xen_boot # grep GRUB_DEFAULT /etc/default/grub
GRUB_DEFAULT=12
Eu posso inicializar no kernel 3.2.0-4-amd64
(este é o kernel do qual eu instalei o XEN e atualizei para 3.16.0-0.bpo.4-amd64
) quando eu defini GRUB_DEFAULT=2
e emite update-grub
. Mas o problema é que eu não consigo inicializar o kernel XEN mesmo se eu tiver definido GRUB_DEFAULT=12
. Ele sempre inicializa 3.16.0-0.bpo.4-amd64
kernel como se eu tivesse GRUB_DEFAULT=0
. Aqui está a prova de que eu não estou usando o kernel XEN mesmo se eu tiver GRUB_DEFAULT=12
set:
root@Debian-78-wheezy-64-minimal ~/workplace/backup_xen_boot # xen-detect
Not running on Xen.
root@Debian-78-wheezy-64-minimal ~/workplace/backup_xen_boot # uname -a
Linux Debian-78-wheezy-64-minimal 3.16.0-0.bpo.4-amd64 #1 SMP Debian 3.16.7-ckt7-1~bpo70+1 (2015-04-07) x86_64 GNU/Linux
EDITAR:
Isso também está satisfeito (mesmo que esteja relacionado a XEN no RedHat ):
before you go to the trouble of building xen, make sure your desired kernel will support dom0. grep XEN /boot/config-3.10*
if you don't return at least 35 entries from ^^, then that Redhat kernel does not support dom0.
O que mais posso experimentar?