[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Xen 4.6 script calling conventions



     I'm trying to package Xen 4.6 (specifically Xen 4.6.3) for
use with NetBSD.  I have it mostly done; however, when I try to
create a domU, libxl goes into an infinite loop calling the scripts.
If I try to create a domU with no network or disk, it works fine
(albeit of rather limited use).  Have there been changes between
Xen 4.5 and Xen 4.6 in the calling convention for the scripts?  Is
there documentation on what is expected somewhere?  Please CC me on
any responses.  Here is my domU config file:

-----
kernel = "/usr/pkg/etc/xen/kernels/netbsd-XEN3_DOMU.gz"
#kernel = "/usr/pkg/etc/xen/kernels/netbsd-INSTALL_XEN3_DOMU.gz"

memory = 512

name = "netbsd1"

vif = [ 'bridge=bridge0' ]

#disk = [ 'file:/usr/pkg/etc/xen/disks/netbsd1,0x1,w' ]
#disk = [ 'file:/usr/pkg/etc/xen/disks/netbsd1,0x1,w', 'file:/usr/local/isos/Net
BSD-amd64-20140916.iso,0x2,r' ]
#disk = [ 'phy:/dev/vnd0d,0x1,rw' ]

extra = ""
-----

Here is the output of "xl -vvvvv create netbsd1 -c":

-----
Script started on Sat Jun 25 18:33:46 2016
i386devel: {1} xl -vvvvv create netbsd1 -c
Parsing config from netbsd1
libxl: debug: libxl_create.c:1563:do_domain_create: ao 0x7a19e312b0c0: create: 
how=0x0 callback=0x0 poller=0x7a19e310d110
libxl: debug: libxl_create.c:947:initiate_domain_create: running bootloader
libxl: debug: libxl_bootloader.c:330:libxl__bootloader_run: no bootloader 
configured, using user supplied kernel
libxl: debug: libxl_event.c:691:libxl__ev_xswatch_deregister: watch 
w=0x7a19e312e958: deregister unregistered
domainbuilder: detail: xc_dom_allocate: cmdline="", features="(null)"
libxl: debug: libxl_dom.c:625:libxl__build_pv: pv kernel mapped 0 path 
/usr/pkg/etc/xen/kernels/netbsd-XEN3_DOMU.gz
domainbuilder: detail: xc_dom_kernel_file: 
filename="/usr/pkg/etc/xen/kernels/netbsd-XEN3_DOMU.gz"
domainbuilder: detail: xc_dom_malloc_filemap    : 2288 kB
domainbuilder: detail: xc_dom_malloc            : 7293 kB
domainbuilder: detail: xc_dom_do_gunzip: unzip ok, 0x23c0c7 -> 0x71f606
domainbuilder: detail: xc_dom_boot_xen_init: ver 4.6, caps xen-3.0-x86_64 
xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64 
domainbuilder: detail: xc_dom_parse_image: called
domainbuilder: detail: xc_dom_find_loader: trying ELF-generic loader ... 
domainbuilder: detail: loader probe OK
xc: detail: elf_parse_binary: phdr: paddr=0xffffffff80000000 memsz=0x547f28
xc: detail: elf_parse_binary: phdr: paddr=0xffffffff80647f40 memsz=0x1b80c0
xc: detail: elf_parse_binary: memory: 0xffffffff80000000 -> 0xffffffff80800000
xc: detail: elf_xen_parse: __xen_guest: 
"GUEST_OS=NetBSD,GUEST_VER=4.99,XEN_VER=xen-3.0,LOADER=generic,VIRT_BASE=0xffffffff80000000,ELF_PADDR_OFFSET=0xffffffff80000000,VIRT_ENTRY=0xffffffff80100000,HYPERCALL_PAGE=0x00000101,BSD_SYMTAB=yes"
xc: detail: elf_xen_parse_guest_info: GUEST_OS="NetBSD"
xc: detail: elf_xen_parse_guest_info: GUEST_VER="4.99"
xc: detail: elf_xen_parse_guest_info: XEN_VER="xen-3.0"
xc: detail: elf_xen_parse_guest_info: LOADER="generic"
xc: detail: elf_xen_parse_guest_info: VIRT_BASE="0xffffffff80000000"
xc: detail: elf_xen_parse_guest_info: ELF_PADDR_OFFSET="0xffffffff80000000"
xc: detail: elf_xen_parse_guest_info: VIRT_ENTRY="0xffffffff80100000"
xc: detail: elf_xen_parse_guest_info: HYPERCALL_PAGE="0x00000101"
xc: detail: elf_xen_parse_guest_info: BSD_SYMTAB="yes"
xc: detail: elf_xen_addr_calc_check: addresses:
xc: detail:     virt_base        = 0xffffffff80000000
xc: detail:     elf_paddr_offset = 0xffffffff80000000
xc: detail:     virt_offset      = 0x0
xc: detail:     virt_kstart      = 0xffffffff80000000
xc: detail:     virt_kend        = 0xffffffff80899e78
xc: detail:     virt_entry       = 0xffffffff80100000
xc: detail:     p2m_base         = 0xffffffffffffffff
domainbuilder: detail: xc_dom_malloc            : 615 kB
domainbuilder: detail: xc_dom_parse_elf_kernel: xen-3.0-x86_64: 
0xffffffff80000000 -> 0xffffffff80933cf0
domainbuilder: detail: xc_dom_mem_init: mem 512 MB, pages 0x20000 pages, 4k each
domainbuilder: detail: xc_dom_mem_init: 0x20000 pages
domainbuilder: detail: xc_dom_boot_mem_init: called
domainbuilder: detail: x86_compat: guest xen-3.0-x86_64, address size 64
domainbuilder: detail: xc_dom_malloc            : 1024 kB
domainbuilder: detail: xc_dom_build_image: called
domainbuilder: detail: xc_dom_alloc_segment:   kernel       : 
0xffffffff80000000 -> 0xffffffff80934000  (pfn 0x0 + 0x934 pages)
domainbuilder: detail: xc_dom_pfn_to_ptr_retcount: domU mapping: pfn 0x0+0x934 
at 0x7a19debcc000
xc: detail: elf_load_binary: phdr 0 at 0x7a19debcc000 -> 0x7a19df113f28
xc: detail: elf_load_binary: phdr 1 at 0x7a19df213f40 -> 0x7a19df23d318
xc: detail: elf_load_bsdsyms: shdr 25 at 0x7a19dfd857e9 -> 0x7a19df3cc748
xc: detail: elf_load_bsdsyms: shdr 26 at 0x7a19dfd86060 -> 0x7a19df3cc8c0
xc: detail: elf_load_bsdsyms: shdr 27 at 0x7a19dfde2850 -> 0x7a19df4290b0
domainbuilder: detail: xc_dom_load_elf_symtab: 
bsd_symtab_start=ffffffff80899e78, kernel.end=0xffffffff80934000 -- 
symtab=0xffffffff80899e7c, maxaddr=0xffffffff8089a5c0
domainbuilder: detail: xc_dom_load_elf_symtab: h=26 symtab, size=0x5c7f0, 
maxaddr=0xffffffff808f6db0
domainbuilder: detail: xc_dom_load_elf_symtab: h=27 strtab, size=0x3cdc6, 
maxaddr=0xffffffff80933b78
domainbuilder: detail: xc_dom_alloc_segment:   phys2mach    : 
0xffffffff80934000 -> 0xffffffff80a34000  (pfn 0x934 + 0x100 pages)
domainbuilder: detail: xc_dom_pfn_to_ptr_retcount: domU mapping: pfn 
0x934+0x100 at 0x7a19e2d00000
domainbuilder: detail: xc_dom_alloc_page   :   start info   : 
0xffffffff80a34000 (pfn 0xa34)
domainbuilder: detail: xc_dom_alloc_page   :   xenstore     : 
0xffffffff80a35000 (pfn 0xa35)
domainbuilder: detail: xc_dom_alloc_page   :   console      : 
0xffffffff80a36000 (pfn 0xa36)
domainbuilder: detail: nr_page_tables: 0x0000ffffffffffff/48: 
0xffff000000000000 -> 0xffffffffffffffff, 1 table(s)
domainbuilder: detail: nr_page_tables: 0x0000007fffffffff/39: 
0xffffff8000000000 -> 0xffffffffffffffff, 1 table(s)
domainbuilder: detail: nr_page_tables: 0x000000003fffffff/30: 
0xffffffff80000000 -> 0xffffffffbfffffff, 1 table(s)
domainbuilder: detail: nr_page_tables: 0x00000000001fffff/21: 
0xffffffff80000000 -> 0xffffffff80bfffff, 6 table(s)
domainbuilder: detail: xc_dom_alloc_segment:   page tables  : 
0xffffffff80a37000 -> 0xffffffff80a40000  (pfn 0xa37 + 0x9 pages)
domainbuilder: detail: xc_dom_pfn_to_ptr_retcount: domU mapping: pfn 0xa37+0x9 
at 0x7a19e34cd000
domainbuilder: detail: xc_dom_alloc_page   :   boot stack   : 
0xffffffff80a40000 (pfn 0xa40)
domainbuilder: detail: xc_dom_build_image  : virt_alloc_end : 0xffffffff80a41000
domainbuilder: detail: xc_dom_build_image  : virt_pgtab_end : 0xffffffff80c00000
domainbuilder: detail: xc_dom_boot_image: called
domainbuilder: detail: arch_setup_bootearly: doing nothing
domainbuilder: detail: xc_dom_compat_check: supported guest type: 
xen-3.0-x86_64 <= matches
domainbuilder: detail: xc_dom_compat_check: supported guest type: 
xen-3.0-x86_32p
domainbuilder: detail: xc_dom_compat_check: supported guest type: hvm-3.0-x86_32
domainbuilder: detail: xc_dom_compat_check: supported guest type: 
hvm-3.0-x86_32p
domainbuilder: detail: xc_dom_compat_check: supported guest type: hvm-3.0-x86_64
domainbuilder: detail: xc_dom_update_guest_p2m: dst 64bit, pages 0x20000
domainbuilder: detail: clear_page: pfn 0xa36, mfn 0x70436
domainbuilder: detail: clear_page: pfn 0xa35, mfn 0x70435
domainbuilder: detail: xc_dom_pfn_to_ptr_retcount: domU mapping: pfn 0xa34+0x1 
at 0x7a19e34cc000
domainbuilder: detail: start_info_x86_64: called
domainbuilder: detail: setup_hypercall_page: vaddr=0xffffffff80101000 pfn=0x101
domainbuilder: detail: domain builder memory footprint
domainbuilder: detail:    allocated
domainbuilder: detail:       malloc             : 8997 kB
domainbuilder: detail:       anon mmap          : 0 bytes
domainbuilder: detail:    mapped
domainbuilder: detail:       file mmap          : 2288 kB
domainbuilder: detail:       domU mmap          : 10488 kB
domainbuilder: detail: arch_setup_bootlate: shared_info: pfn 0x0, mfn 0x710f6
domainbuilder: detail: shared_info_x86_64: called
domainbuilder: detail: vcpu_x86_64: called
domainbuilder: detail: vcpu_x86_64: cr3: pfn 0xa37 mfn 0x70437
domainbuilder: detail: launch_vm: called, ctxt=0x7a19e31e9004
domainbuilder: detail: xc_dom_release: called
libxl: debug: libxl_event.c:639:libxl__ev_xswatch_register: watch 
w=0x7a19e31040d0 wpath=/local/domain/0/backend/vif/2/0/state token=3/0: 
register slotnum=3
libxl: debug: libxl_create.c:1586:do_domain_create: ao 0x7a19e312b0c0: 
inprogress: poller=0x7a19e310d110, flags=i
libxl: debug: libxl_event.c:576:watchfd_callback: watch w=0x7a19e31040d0 
wpath=/local/domain/0/backend/vif/2/0/state token=3/0: event 
epath=/local/domain/0/backend/vif/2/0/state
libxl: debug: libxl_event.c:884:devstate_callback: backend 
/local/domain/0/backend/vif/2/0/state wanted state 2 still waiting state 1
libxl: debug: libxl_event.c:576:watchfd_callback: watch w=0x7a19e31040d0 
wpath=/local/domain/0/backend/vif/2/0/state token=3/0: event 
epath=/local/domain/0/backend/vif/2/0/state
libxl: debug: libxl_event.c:880:devstate_callback: backend 
/local/domain/0/backend/vif/2/0/state wanted state 2 ok
libxl: debug: libxl_event.c:677:libxl__ev_xswatch_deregister: watch 
w=0x7a19e31040d0 wpath=/local/domain/0/backend/vif/2/0/state token=3/0: 
deregister slotnum=3
libxl: debug: libxl_device.c:991:device_backend_callback: calling 
device_backend_cleanup
libxl: debug: libxl_event.c:691:libxl__ev_xswatch_deregister: watch 
w=0x7a19e31040d0: deregister unregistered
libxl: debug: libxl_device.c:1088:device_hotplug: calling hotplug script: 
/usr/pkg/etc/xen/scripts/vif-bridge /local/domain/0/backend/vif/2/0
libxl: debug: libxl_aoutils.c:593:libxl__async_exec_start: forking to execute: 
/usr/pkg/etc/xen/scripts/vif-bridge /local/domain/0/backend/vif/2/0 
+ echo '###start vif-bridge /local/domain/0/backend/vif/2/0' 2
###start vif-bridge /local/domain/0/backend/vif/2/0 2
+ dirname /usr/pkg/etc/xen/scripts/vif-bridge
+ DIR=/usr/pkg/etc/xen/scripts
+ '.' '/usr/pkg/etc/xen/scripts/hotplugpath.sh'
+ sbindir=/usr/pkg/sbin
+ bindir=/usr/pkg/bin
+ LIBEXEC=/usr/pkg/libexec/xen
+ 'LIBEXEC_BIN=/usr/pkg/libexec/xen/bin'
+ libdir=/usr/pkg/lib
+ SHAREDIR=/usr/pkg/share
+ XENFIRMWAREDIR=/usr/pkg/libexec/xen/boot
+ 'XEN_CONFIG_DIR=/usr/pkg/etc/xen'
+ 'XEN_SCRIPT_DIR=/usr/pkg/etc/xen/scripts'
+ 'XEN_LOCK_DIR=/var/run'
+ 'XEN_RUN_DIR=/var/run/xen'
+ 'XEN_PAGING_DIR=/var/lib/xen/xenpaging'
+ 'XEN_DUMP_DIR=/var/lib/xen/dump'
+ 
'PATH=/usr/pkg/bin:/usr/pkg/sbin:/usr/pkg/libexec/xen/bin:/bin:/usr/bin:/sbin:/usr/sbin'
+ export PATH
+ xpath=/local/domain/0/backend/vif/2/0
+ xstatus=2
+ xenstore-read /local/domain/0/backend/vif/2/0/bridge
+ xbridge=bridge0
+ xenstore-read /local/domain/0/backend/vif/2/0/frontend-id
+ xfid=2
+ xenstore-read /local/domain/0/backend/vif/2/0/handle
+ xhandle=0
+ xenstore-read /local/domain/0/backend/vif/2/0/vifname
+ iface=xvif2i0
+ '[' xxvif2i0 = x ']'
+ ifconfig xvif2i0 up
+ brconfig bridge0 add xvif2i0
+ xenstore-write /local/domain/0/backend/vif/2/0/hotplug-status connected
+ exit 0
libxl: debug: libxl_event.c:691:libxl__ev_xswatch_deregister: watch 
w=0x7a19e31041d0: deregister unregistered
libxl: debug: libxl_device.c:1088:device_hotplug: calling hotplug script: 
/usr/pkg/etc/xen/scripts/vif-bridge /local/domain/0/backend/vif/2/0
libxl: debug: libxl_aoutils.c:593:libxl__async_exec_start: forking to execute: 
/usr/pkg/etc/xen/scripts/vif-bridge /local/domain/0/backend/vif/2/0 
+ echo '###start vif-bridge /local/domain/0/backend/vif/2/0' 2
###start vif-bridge /local/domain/0/backend/vif/2/0 2
+ dirname /usr/pkg/etc/xen/scripts/vif-bridge
+ DIR=/usr/pkg/etc/xen/scripts
+ '.' '/usr/pkg/etc/xen/scripts/hotplugpath.sh'
+ sbindir=/usr/pkg/sbin
+ bindir=/usr/pkg/bin
+ LIBEXEC=/usr/pkg/libexec/xen
+ 'LIBEXEC_BIN=/usr/pkg/libexec/xen/bin'
+ libdir=/usr/pkg/lib
+ SHAREDIR=/usr/pkg/share
+ XENFIRMWAREDIR=/usr/pkg/libexec/xen/boot
+ 'XEN_CONFIG_DIR=/usr/pkg/etc/xen'
+ 'XEN_SCRIPT_DIR=/usr/pkg/etc/xen/scripts'
+ 'XEN_LOCK_DIR=/var/run'
+ 'XEN_RUN_DIR=/var/run/xen'
+ 'XEN_PAGING_DIR=/var/lib/xen/xenpaging'
+ 'XEN_DUMP_DIR=/var/lib/xen/dump'
+ 
'PATH=/usr/pkg/bin:/usr/pkg/sbin:/usr/pkg/libexec/xen/bin:/bin:/usr/bin:/sbin:/usr/sbin'
+ export PATH
+ xpath=/local/domain/0/backend/vif/2/0
+ xstatus=2
+ xenstore-read /local/domain/0/backend/vif/2/0/bridge
+ xbridge=bridge0
+ xenstore-read /local/domain/0/backend/vif/2/0/frontend-id
+ xfid=2
+ xenstore-read /local/domain/0/backend/vif/2/0/handle
+ xhandle=0
+ xenstore-read /local/domain/0/backend/vif/2/0/vifname
+ iface=xvif2i0
+ '[' xxvif2i0 = x ']'
+ ifconfig xvif2i0 up
+ brconfig bridge0 add xvif2i0
brconfig: add xvif2i0: File exists
libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: 
/usr/pkg/etc/xen/scripts/vif-bridge /local/domain/0/backend/vif/2/0 [479] 
exited with error status 1
libxl: debug: libxl_event.c:691:libxl__ev_xswatch_deregister: watch 
w=0x7a19e31041d0: deregister unregistered
libxl: debug: libxl_event.c:691:libxl__ev_xswatch_deregister: watch 
w=0x7a19e31041d0: deregister unregistered
libxl: error: libxl_create.c:1384:domcreate_attach_vtpms: unable to add nic 
devices
libxl: debug: libxl_event.c:639:libxl__ev_xswatch_register: watch 
w=0x7a19e31048d0 wpath=/local/domain/0/backend/vif/2/0/state token=3/1: 
register slotnum=3
libxl: debug: libxl_event.c:576:watchfd_callback: watch w=0x7a19e31048d0 
wpath=/local/domain/0/backend/vif/2/0/state token=3/1: event 
epath=/local/domain/0/backend/vif/2/0/state
libxl: debug: libxl_event.c:884:devstate_callback: backend 
/local/domain/0/backend/vif/2/0/state wanted state 6 still waiting state 5
libxl: debug: libxl_event.c:576:watchfd_callback: watch w=0x7a19e31048d0 
wpath=/local/domain/0/backend/vif/2/0/state token=3/1: event 
epath=/local/domain/0/backend/vif/2/0/state
libxl: debug: libxl_event.c:880:devstate_callback: backend 
/local/domain/0/backend/vif/2/0/state wanted state 6 ok
libxl: debug: libxl_event.c:677:libxl__ev_xswatch_deregister: watch 
w=0x7a19e31048d0 wpath=/local/domain/0/backend/vif/2/0/state token=3/1: 
deregister slotnum=3
libxl: debug: libxl_device.c:991:device_backend_callback: calling 
device_backend_cleanup
libxl: debug: libxl_event.c:691:libxl__ev_xswatch_deregister: watch 
w=0x7a19e31048d0: deregister unregistered
libxl: debug: libxl_device.c:1088:device_hotplug: calling hotplug script: 
/usr/pkg/etc/xen/scripts/vif-bridge /local/domain/0/backend/vif/2/0
libxl: debug: libxl_aoutils.c:593:libxl__async_exec_start: forking to execute: 
/usr/pkg/etc/xen/scripts/vif-bridge /local/domain/0/backend/vif/2/0 
+ echo '###start vif-bridge /local/domain/0/backend/vif/2/0' 6
###start vif-bridge /local/domain/0/backend/vif/2/0 6
+ dirname /usr/pkg/etc/xen/scripts/vif-bridge
+ DIR=/usr/pkg/etc/xen/scripts
+ '.' '/usr/pkg/etc/xen/scripts/hotplugpath.sh'
+ sbindir=/usr/pkg/sbin
+ bindir=/usr/pkg/bin
+ LIBEXEC=/usr/pkg/libexec/xen
+ 'LIBEXEC_BIN=/usr/pkg/libexec/xen/bin'
+ libdir=/usr/pkg/lib
+ SHAREDIR=/usr/pkg/share
+ XENFIRMWAREDIR=/usr/pkg/libexec/xen/boot
+ 'XEN_CONFIG_DIR=/usr/pkg/etc/xen'
+ 'XEN_SCRIPT_DIR=/usr/pkg/etc/xen/scripts'
+ 'XEN_LOCK_DIR=/var/run'
+ 'XEN_RUN_DIR=/var/run/xen'
+ 'XEN_PAGING_DIR=/var/lib/xen/xenpaging'
+ 'XEN_DUMP_DIR=/var/lib/xen/dump'
+ 
'PATH=/usr/pkg/bin:/usr/pkg/sbin:/usr/pkg/libexec/xen/bin:/bin:/usr/bin:/sbin:/usr/sbin'
+ export PATH
+ xpath=/local/domain/0/backend/vif/2/0
+ xstatus=6
+ exit 0
libxl: debug: libxl_event.c:691:libxl__ev_xswatch_deregister: watch 
w=0x7a19e31049d0: deregister unregistered
libxl: debug: libxl_device.c:1088:device_hotplug: calling hotplug script: 
/usr/pkg/etc/xen/scripts/vif-bridge /local/domain/0/backend/vif/2/0
libxl: debug: libxl_aoutils.c:593:libxl__async_exec_start: forking to execute: 
/usr/pkg/etc/xen/scripts/vif-bridge /local/domain/0/backend/vif/2/0 
+ echo '###start vif-bridge /local/domain/0/backend/vif/2/0' 6
###start vif-bridge /local/domain/0/backend/vif/2/0 6
+ dirname /usr/pkg/etc/xen/scripts/vif-bridge
+ DIR=/usr/pkg/etc/xen/scripts
+ '.' '/usr/pkg/etc/xen/scripts/hotplugpath.sh'
+ sbindir=/usr/pkg/sbin
+ bindir=/usr/pkg/bin
+ LIBEXEC=/usr/pkg/libexec/xen
+ 'LIBEXEC_BIN=/usr/pkg/libexec/xen/bin'
+ libdir=/usr/pkg/lib
+ SHAREDIR=/usr/pkg/share
+ XENFIRMWAREDIR=/usr/pkg/libexec/xen/boot
+ 'XEN_CONFIG_DIR=/usr/pkg/etc/xen'
+ 'XEN_SCRIPT_DIR=/usr/pkg/etc/xen/scripts'
+ 'XEN_LOCK_DIR=/var/run'
+ 'XEN_RUN_DIR=/var/run/xen'
+ 'XEN_PAGING_DIR=/var/lib/xen/xenpaging'
+ 'XEN_DUMP_DIR=/var/lib/xen/dump'
+ 
'PATH=/usr/pkg/bin:/usr/pkg/sbin:/usr/pkg/libexec/xen/bin:/bin:/usr/bin:/sbin:/usr/sbin'
+ export PATH
+ xpath=/local/domain/0/backend/vif/2/0
+ xstatus=6
+ exit 0
libxl: debug: libxl_event.c:691:libxl__ev_xswatch_deregister: watch 
w=0x7a19e31049d0: deregister unregistered
[repeat ad infinitum]
[Ctrl-C pressed here]
i386devel: {2} exit
i386devel: {3} 
Script done on Sat Jun 25 18:34:12 2016


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.