Guest User

xen-init-dom0.service in 4.5 unstable

a guest
Oct 19th, 2014
295
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.63 KB | None | 0 0
  1. Working in Centos 7, with systemd
  2. -------
  3. Patches worked, patched configure worked. Build completed. RPM built
  4. Install of Xen worked without any kind of warning or message.
  5.  
  6. Reboot worked, Xen started, and 3 VM auto-started.
  7. However, the libxl error messages are not fixed. My original patch fixed those.
  8. libxl messages are seen in xendomains status, below.
  9.  
  10. In the top here, there is xendomains status still with the noisy error messages. So the xen-init-dom0.service
  11. didn't fix that.
  12.  
  13. Below there is a patch I added to ./tools.configure.ac to fix ./tools/configure
  14. and this was enough to get a build to complete.
  15.  
  16. sudo systemctl status xen-qemu-dom0-disk-backend xenstored xendomains xen-init-dom0
  17. --------------------
  18. xen-qemu-dom0-disk-backend.service - qemu for xen dom0 disk backend
  19. Loaded: loaded (/usr/lib/systemd/system/xen-qemu-dom0-disk-backend.service; enabled)
  20. Active: active (running) since Sun 2014-10-19 14:42:45 PDT; 1min 36s ago
  21. Process: 686 ExecStartPre=/bin/mkdir -p /var/run/xen (code=exited, status=0/SUCCESS)
  22. Process: 681 ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities (code=exited, status=0/SUCCESS)
  23. Main PID: 773 (qemu-system-i38)
  24. CGroup: /system.slice/xen-qemu-dom0-disk-backend.service
  25. └─773 /usr/lib/xen/bin/qemu-system-i386 -xen-domid 0 -xen-attach -name dom0 -nographic -M xenpv -daemonize -m...
  26.  
  27. Oct 19 14:42:45 c7dom0 systemd[1]: Started qemu for xen dom0 disk backend.
  28.  
  29. xenstored.service - The Xen xenstore
  30. Loaded: loaded (/usr/lib/systemd/system/xenstored.service; enabled)
  31. Active: active (running) since Sun 2014-10-19 14:42:44 PDT; 1min 36s ago
  32. Process: 651 ExecStartPost=/usr/bin/xenstore-write /local/domain/0/domid 0 (code=exited, status=0/SUCCESS)
  33. Process: 622 ExecStartPost=/usr/bin/xenstore-write /local/domain/0/name Domain-0 (code=exited, status=0/SUCCESS)
  34. Process: 576 ExecStartPre=/bin/mkdir -p /var/run/xen (code=exited, status=0/SUCCESS)
  35. Process: 572 ExecStartPre=/bin/rm -f /var/lib/xenstored/tdb* (code=exited, status=0/SUCCESS)
  36. Process: 566 ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities (code=exited, status=0/SUCCESS)
  37. Main PID: 579 (oxenstored)
  38. CGroup: /system.slice/xenstored.service
  39. └─579 /usr/sbin/oxenstored --no-fork
  40.  
  41. Oct 19 14:42:44 c7dom0 sh[579]: Xen Storage Daemon, version 1.0
  42. Oct 19 14:42:44 c7dom0 systemd[1]: Started The Xen xenstore.
  43.  
  44. xendomains.service - Xendomains - start and stop guests on boot and shutdown
  45. Loaded: loaded (/usr/lib/systemd/system/xendomains.service; enabled)
  46. Drop-In: /usr/lib/systemd/system/xendomains.service.d
  47. └─add_lvm.conf
  48. Active: active (exited) since Sun 2014-10-19 14:43:18 PDT; 1min 3s ago
  49. Process: 1049 ExecStart=/usr/lib/xen/bin/xendomains start (code=exited, status=0/SUCCESS)
  50. Process: 1047 ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities (code=exited, status=0/SUCCESS)
  51. Main PID: 1049 (code=exited, status=0/SUCCESS)
  52. CGroup: /system.slice/xendomains.service
  53. ├─1167 /usr/sbin/xl create --quiet --defconfig /etc/xen/auto/a_c7min
  54. ├─1286 /usr/sbin/xl create --quiet --defconfig /etc/xen/auto/b_jesdev
  55. └─1413 /usr/sbin/xl create --quiet --defconfig /etc/xen/auto/c_wheez64
  56.  
  57. Oct 19 14:43:04 c7dom0 systemd[1]: Starting Xendomains - start and stop guests on boot and shutdown...
  58. Oct 19 14:43:04 c7dom0 xendomains[1049]: Starting auto Xen domains: a_c7minlibxl: error: libxl.c:6292:libxl_retrie...main 0
  59. Oct 19 14:43:09 c7dom0 xendomains[1049]: b_jesdevlibxl: error: libxl.c:6292:libxl_retrieve_domain_configuration: f...main 0
  60. Oct 19 14:43:13 c7dom0 xendomains[1049]: c_wheez64libxl: error: libxl.c:6292:libxl_retrieve_domain_configuration: ...main 0
  61. Oct 19 14:43:13 c7dom0 logger[1379]: /etc/xen/scripts/vif-bridge: online type_if=vif XENBUS_PATH=backend/vif/3/0
  62. Oct 19 14:43:18 c7dom0 xendomains[1049]: [ OK ]
  63. Oct 19 14:43:18 c7dom0 systemd[1]: Started Xendomains - start and stop guests on boot and shutdown.
  64.  
  65. xen-init-dom0.service - xen-init-dom0, initialise JSON configuration stub for Dom0
  66. Loaded: loaded (/usr/lib/systemd/system/xen-init-dom0.service; enabled)
  67. Active: inactive (dead) since Sun 2014-10-19 14:42:45 PDT; 1min 35s ago
  68. Process: 655 ExecStart=/usr/lib/xen/bin/xen-init-dom0 (code=exited, status=0/SUCCESS)
  69. Main PID: 655 (code=exited, status=0/SUCCESS)
  70. CGroup: /system.slice/xen-init-dom0.service
  71.  
  72. Oct 19 14:42:45 c7dom0 xen-init-dom0[655]: Dom0 is already set up
  73. Oct 19 14:42:45 c7dom0 systemd[1]: Started xen-init-dom0, initialise JSON configuration stub for Dom0.
  74. Hint: Some lines were ellipsized, use -l to show in full.
  75. ----------- snip status -------
  76. $ sudo xl list 0
  77. Name ID Mem VCPUs State Time(s)
  78. Domain-0 0 512 2 r----- 8.0
  79. $ sudo xl list -l 0
  80. libxl: error: libxl.c:6292:libxl_retrieve_domain_configuration: fail to get domain configuration for domain 0
  81. [
  82.  
  83. ]
  84. sudo xl info
  85. host : c7dom0
  86. release : 3.16.0-1.el7.elrepo.x86_64
  87. version : #1 SMP Sun Aug 3 19:29:26 EDT 2014
  88. machine : x86_64
  89. nr_cpus : 2
  90. max_cpu_id : 3
  91. nr_nodes : 1
  92. cores_per_socket : 2
  93. threads_per_core : 1
  94. cpu_mhz : 3062
  95. hw_caps : bfebfbff:20100800:00000000:00000900:0408e3bd:00000000:00000001:00000000
  96. virt_caps : hvm
  97. total_memory : 4094
  98. free_memory : 2122
  99. sharing_freed_memory : 0
  100. sharing_used_memory : 0
  101. outstanding_claims : 0
  102. free_cpus : 0
  103. xen_major : 4
  104. xen_minor : 5
  105. xen_extra : -unstable
  106. xen_version : 4.5-unstable
  107. xen_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
  108. xen_scheduler : credit
  109. xen_pagesize : 4096
  110. platform_params : virt_start=0xffff800000000000
  111. xen_changeset : Thu Oct 16 10:08:39 2014 +0200 git:9cea500-dirty
  112. xen_commandline : placeholder dom0_mem=512M,max:608M earlyprintk=xen guest_loglvl=all loglvl=all text
  113. cc_compiler : gcc (GCC) 4.8.2 20140120 (Red Hat 4.8.2-16)
  114. cc_compile_by : tlviewer
  115. cc_compile_domain :
  116. cc_compile_date : Sun Oct 19 13:56:13 PDT 2014
  117. xend_config_format : 4
  118. $ sudo xl list
  119. Name ID Mem VCPUs State Time(s)
  120. Domain-0 0 512 2 r----- 8.2
  121. c7min 1 512 2 -b---- 7.5
  122. jesdev 2 512 2 -b---- 6.2
  123. wheez64 3 384 2 -b---- 9.5
  124. $ exit
  125. logout
  126. Last login: Sun Oct 19 14:29:14 2014 from 192.168.1.104
  127. $ cd ./unstable/
  128. $ ls
  129. xen.fedora.efi.build.patch xen.unstable.man.xl.pod1.patch xen.unstable.tools.rpmball.patch
  130. xen.unstable.init.dom0.patch xen.unstable.tools.config.patch
  131. $ cat xen.unstable.init.dom0.patch
  132. --- a/tools/hotplug/Linux/systemd/Makefile
  133. +++ b/tools/hotplug/Linux/systemd/Makefile
  134. @@ -14,6 +14,7 @@ XEN_SYSTEMD_SERVICE += xenconsoled.service
  135. XEN_SYSTEMD_SERVICE += xen-qemu-dom0-disk-backend.service
  136. XEN_SYSTEMD_SERVICE += xendomains.service
  137. XEN_SYSTEMD_SERVICE += xen-watchdog.service
  138. +XEN_SYSTEMD_SERVICE += xen-init-dom0.service
  139.  
  140. ALL_XEN_SYSTEMD = $(XEN_SYSTEMD_MODULES) \
  141. $(XEN_SYSTEMD_MOUNT) \
  142. --- /dev/null
  143. +++ b/tools/hotplug/Linux/systemd/xen-init-dom0.service.in
  144. @@ -0,0 +1,12 @@
  145. +[Unit]
  146. +Description=xen-init-dom0, initialise JSON configuration stub for Dom0
  147. +Requires=xenstored.socket
  148. +After=xenstored.service
  149. +ConditionVirtualization=xen
  150. +
  151. +[Service]
  152. +Type=oneshot
  153. +ExecStart=@LIBEXEC_BIN@/xen-init-dom0
  154. +
  155. +[Install]
  156. +WantedBy=multi-user.target
  157. --- a/tools/hotplug/Linux/systemd/xendomains.service.in
  158. +++ b/tools/hotplug/Linux/systemd/xendomains.service.in
  159. @@ -1,7 +1,8 @@
  160. [Unit]
  161. Description=Xendomains - start and stop guests on boot and shutdown
  162. Requires=xenstored.socket
  163. -After=xenstored.service xenconsoled.service
  164. +After=network.target xenstored.service xenconsoled.service xen-init-dom0.service
  165. +Before=rc-local.service
  166. ConditionVirtualization=xen
  167.  
  168. [Service]
  169. [tlviewer@c7min unstable]$ cat xen.unstable.tools.config.patch
  170. --- ./tools/configure.ac.orig 2014-10-19 13:46:57.513852146 -0700
  171. +++ ./tools/configure.ac 2014-10-19 13:48:41.597852146 -0700
  172. @@ -18,6 +18,7 @@
  173. hotplug/Linux/systemd/xen-watchdog.service
  174. hotplug/Linux/systemd/xenconsoled.service
  175. hotplug/Linux/systemd/xendomains.service
  176. +hotplug/Linux/systemd/xen-init-dom0.service
  177. hotplug/Linux/systemd/xenstored.service
  178. hotplug/Linux/systemd/xenstored.socket
  179. hotplug/Linux/systemd/xenstored_ro.socket
  180. @@ -103,13 +104,7 @@
  181. xen-blkback
  182. xen-netback
  183. xen-pciback
  184. -evtchn
  185. -gntdev
  186. -netbk
  187. -blkbk
  188. -xen-scsibk
  189. -usbbk
  190. -pciback
  191. +xen-privcmd
  192. xen-acpi-processor
  193. blktap2
  194. blktap
  195. [tlviewer@c7min unstable]$ cat xen.unstable.tools.rpmball.patch
  196. --- ./tools/misc/mkrpm.orig 2014-10-12 09:24:32.557981417 -0700
  197. +++ ./tools/misc/mkrpm 2014-10-13 18:29:42.007707932 -0700
  198. @@ -33,7 +33,7 @@
  199. Summary: Xen development build, version $version
  200. Name: xen$PKG_SUFFIX
  201. Version: $version
  202. -Release: $release
  203. +Release: unstable%{?dist}
  204. License: GPL
  205. Group: System/Hypervisor
  206. URL: http://xenbits.xenproject.org/xen.git
  207. @@ -53,17 +53,22 @@
  208. %install
  209. rm -rf \$RPM_BUILD_ROOT
  210. mkdir -p \$RPM_BUILD_ROOT
  211. -cd %{_xenroot}
  212. -dist/install.sh \$RPM_BUILD_ROOT/
  213. +(cd %{_xenroot}; dist/install.sh \$RPM_BUILD_ROOT/ )
  214.  
  215. -cd \$RPM_BUILD_ROOT
  216. +echo "%%defattr(-, root, root)" > filelist.lst
  217.  
  218. -%clean
  219. -rm -rf \$RPM_BUILD_ROOT
  220. +# first get the files
  221. +(cd %{buildroot}; find . -type f -or -type l | sed -e s/^.// -e /^$/d) >> filelist.lst
  222. +
  223. +# docs get gzip
  224. +sed -i -e '/^\/usr\/share/ s/\.1$/\.1\.gz/' filelist.lst
  225. +sed -i -e '/^\/usr\/share/ s/\.5$/\.5\.gz/' filelist.lst
  226. +sed -i -e '/^\/usr\/share/ s/\.8$/\.8\.gz/' filelist.lst
  227. +
  228. +# now get the empty folders
  229. +(cd %{buildroot}; find . -type d -empty | sed -e s/^.// -e 's/^\//%dir \//') >> filelist.lst
  230.  
  231. -%files
  232. -%defattr(-,root,root,-)
  233. -/*
  234. +%files -f filelist.lst
  235.  
  236. %post
  237. EOF
Advertisement
Add Comment
Please, Sign In to add comment