Advertisement
Guest User

xen-init-dom0.service in 4.5 unstable

a guest
Oct 19th, 2014
258
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. $ ssh -qY user@192.168.1.228
  127. Last login: Sun Oct 19 14:29:14 2014 from 192.168.1.104
  128. $ cd ./unstable/
  129. $ ls
  130. xen.fedora.efi.build.patch xen.unstable.man.xl.pod1.patch xen.unstable.tools.rpmball.patch
  131. xen.unstable.init.dom0.patch xen.unstable.tools.config.patch
  132. $ cat xen.unstable.init.dom0.patch
  133. --- a/tools/hotplug/Linux/systemd/Makefile
  134. +++ b/tools/hotplug/Linux/systemd/Makefile
  135. @@ -14,6 +14,7 @@ XEN_SYSTEMD_SERVICE += xenconsoled.service
  136. XEN_SYSTEMD_SERVICE += xen-qemu-dom0-disk-backend.service
  137. XEN_SYSTEMD_SERVICE += xendomains.service
  138. XEN_SYSTEMD_SERVICE += xen-watchdog.service
  139. +XEN_SYSTEMD_SERVICE += xen-init-dom0.service
  140.  
  141. ALL_XEN_SYSTEMD = $(XEN_SYSTEMD_MODULES) \
  142. $(XEN_SYSTEMD_MOUNT) \
  143. --- /dev/null
  144. +++ b/tools/hotplug/Linux/systemd/xen-init-dom0.service.in
  145. @@ -0,0 +1,12 @@
  146. +[Unit]
  147. +Description=xen-init-dom0, initialise JSON configuration stub for Dom0
  148. +Requires=xenstored.socket
  149. +After=xenstored.service
  150. +ConditionVirtualization=xen
  151. +
  152. +[Service]
  153. +Type=oneshot
  154. +ExecStart=@LIBEXEC_BIN@/xen-init-dom0
  155. +
  156. +[Install]
  157. +WantedBy=multi-user.target
  158. --- a/tools/hotplug/Linux/systemd/xendomains.service.in
  159. +++ b/tools/hotplug/Linux/systemd/xendomains.service.in
  160. @@ -1,7 +1,8 @@
  161. [Unit]
  162. Description=Xendomains - start and stop guests on boot and shutdown
  163. Requires=xenstored.socket
  164. -After=xenstored.service xenconsoled.service
  165. +After=network.target xenstored.service xenconsoled.service xen-init-dom0.service
  166. +Before=rc-local.service
  167. ConditionVirtualization=xen
  168.  
  169. [Service]
  170. [tlviewer@c7min unstable]$ cat xen.unstable.tools.config.patch
  171. --- ./tools/configure.ac.orig 2014-10-19 13:46:57.513852146 -0700
  172. +++ ./tools/configure.ac 2014-10-19 13:48:41.597852146 -0700
  173. @@ -18,6 +18,7 @@
  174. hotplug/Linux/systemd/xen-watchdog.service
  175. hotplug/Linux/systemd/xenconsoled.service
  176. hotplug/Linux/systemd/xendomains.service
  177. +hotplug/Linux/systemd/xen-init-dom0.service
  178. hotplug/Linux/systemd/xenstored.service
  179. hotplug/Linux/systemd/xenstored.socket
  180. hotplug/Linux/systemd/xenstored_ro.socket
  181. @@ -103,13 +104,7 @@
  182. xen-blkback
  183. xen-netback
  184. xen-pciback
  185. -evtchn
  186. -gntdev
  187. -netbk
  188. -blkbk
  189. -xen-scsibk
  190. -usbbk
  191. -pciback
  192. +xen-privcmd
  193. xen-acpi-processor
  194. blktap2
  195. blktap
  196. [tlviewer@c7min unstable]$ cat xen.unstable.tools.rpmball.patch
  197. --- ./tools/misc/mkrpm.orig 2014-10-12 09:24:32.557981417 -0700
  198. +++ ./tools/misc/mkrpm 2014-10-13 18:29:42.007707932 -0700
  199. @@ -33,7 +33,7 @@
  200. Summary: Xen development build, version $version
  201. Name: xen$PKG_SUFFIX
  202. Version: $version
  203. -Release: $release
  204. +Release: unstable%{?dist}
  205. License: GPL
  206. Group: System/Hypervisor
  207. URL: http://xenbits.xenproject.org/xen.git
  208. @@ -53,17 +53,22 @@
  209. %install
  210. rm -rf \$RPM_BUILD_ROOT
  211. mkdir -p \$RPM_BUILD_ROOT
  212. -cd %{_xenroot}
  213. -dist/install.sh \$RPM_BUILD_ROOT/
  214. +(cd %{_xenroot}; dist/install.sh \$RPM_BUILD_ROOT/ )
  215.  
  216. -cd \$RPM_BUILD_ROOT
  217. +echo "%%defattr(-, root, root)" > filelist.lst
  218.  
  219. -%clean
  220. -rm -rf \$RPM_BUILD_ROOT
  221. +# first get the files
  222. +(cd %{buildroot}; find . -type f -or -type l | sed -e s/^.// -e /^$/d) >> filelist.lst
  223. +
  224. +# docs get gzip
  225. +sed -i -e '/^\/usr\/share/ s/\.1$/\.1\.gz/' filelist.lst
  226. +sed -i -e '/^\/usr\/share/ s/\.5$/\.5\.gz/' filelist.lst
  227. +sed -i -e '/^\/usr\/share/ s/\.8$/\.8\.gz/' filelist.lst
  228. +
  229. +# now get the empty folders
  230. +(cd %{buildroot}; find . -type d -empty | sed -e s/^.// -e 's/^\//%dir \//') >> filelist.lst
  231.  
  232. -%files
  233. -%defattr(-,root,root,-)
  234. -/*
  235. +%files -f filelist.lst
  236.  
  237. %post
  238. EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement