Criação de VM do servidor Xen no servidor ubuntu

1

Eu tenho alguns problemas na criação de convidados da VM. Estou executando xl create /etc/xen/config_vyos.cfg e recebendo um erro:

Parsing config from /etc/xen/config_vyos.cfg
libxl: error: libxl_bootloader.c:637:bootloader_finished: bootloader failed - consult logfile /var/log/xen/bootloader.4.log
libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: bootloader [2309] exited with error status 1
libxl: error: libxl_create.c:1144:domcreate_rebuild_done: cannot (re-)build domain: -3
libxl: error: libxl.c:1610:libxl__destroy_domid: non-existant domain 4
libxl: error: libxl.c:1568:domain_destroy_callback: unable to destroy guest with domid 4
libxl: error: libxl.c:1495:domain_destroy_cb: destruction of domain 4 failed

/var/log/xen/bootloader.4.log file:

Traceback (most recent call last):
  File "/usr/lib/xen-4.6/bin/pygrub", line 874, in <module>
    raise RuntimeError, "Unable to find partition containing kernel"
RuntimeError: Unable to find partition containing kernel

meu arquivo de configuração:

name="pvvyos"
vcpus=1
memory=2048   

disk=['file:/home/my/vyos-1.1.7-i586-virt.iso,hdc:cdrom,w',
      'phy:/dev/mapper/xen--srv-vyos,hda1,w']
vif=['bridge=xenbr0']
extra="console=hvc0"
on_poweroff='destroy'
on_crash='restart'
on_reboot='restart'
bootloader="pygrub"

Após adicionar ao arquivo de configuração kernel = "/usr/lib/xen-4.6/boot/hvmloader" erro alterado para

[Errno 2] No such file or directory
Error opening /usr/lib/xen-4.6/boot/hvmloader in guest

mas existe /usr/lib/xen-4.6/boot/hvmloader .

O que estou fazendo de errado?

    
por Nufay 11.01.2017 / 11:17

1 resposta

0

Eu usei as instruções do link do pygrub

# inside the vm:
mkdir /boot/grub
apt-get install -y linux-image-amd64
cat > /boot/grub/menu.lst << EOF

default         0
timeout         2

title           Debian GNU/Linux
root            (hd0,0)
kernel          /vmlinuz root=/dev/xvda2 ro
initrd          /initrd.img

title           Debian GNU/Linux (recovery mode)
root            (hd0,0)
kernel          /vmlinuz root=/dev/xvda2 ro single
initrd          /initrd.img

EOF

halt
# in dom0: check with 
#xl shutdown VMID

#check grub with
/usr/lib/xen-4.6/bin/pygrub /dev/vg0/vm02.freifunk-disk   

nano /etc/xen/vm02.freifunk.cfg             
# remove this line: 
#kernel      = '/boot/vmlinuz-4.3.0-1-amd64'
kernel      = '/boot/vmlinuz-3.16.0-4-amd64'
bootloader  = '/usr/lib/xen-4.6/bin/pygrub'
extra       = 'elevator=noop'
# remove this line: 
#ramdisk     = '/boot/initrd.img-4.3.0-1-amd64'
ramdisk     = '/boot/initrd.img-3.16.0-4-amd64'


xen create /etc/xen/vm02.freifunk.cfg         
    
por 07.07.2017 / 11:39