1

I have some problems in creating VM guest. I'm executing xl create /etc/xen/config_vyos.cfg and getting an error:

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

my config file:

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"

After adding to config file kernel = "/usr/lib/xen-4.6/boot/hvmloader" error changed to

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

but /usr/lib/xen-4.6/boot/hvmloader exists.

What am I doing wrong?

0

I used the instructions from pygrub https://wiki.debian.org/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         
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.