Ask Your Question
0

How to add a patch to /etc/init.d/xen?

asked 2015-01-22 19:56:11 -0500

tony.shi gravatar image

Hi gurus,

I am new to openstack , I want to bulid a xen compute node and refer to http://wiki.xenproject.org/wiki/Xen_via_libvirt_for_OpenStack_juno (http://wiki.xenproject.org/wiki/Xen_v...) , for step4, I don't know how to add a patch to /etc/init.d/xen? thanks

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-01-26 04:12:44 -0500

Bob Ball gravatar image

updated 2015-01-26 04:13:39 -0500

Hi Tony,

The "Patch" just means to change the file, the changes needed are described in the article as the lines with the "+" symbol at the start.

You could do this manually by adding the three lines mentioned before the ";;" before the "stop)" line using your favourite text editor (you will of course need to run this as root, so use "sudo" to invoke the text editor, and remember not to include the "+" symbols as they just mean "add this line") or you can copy and paste the following in a terminal:

sudo patch -p0 << EOF
--- /etc/init.d/xen 2014-11-18 20:54:10.788457049 -0700
+++ /etc/init.d/xen.bak 2014-11-18 20:53:14.804107463 -0700
@@ -228,6 +228,9 @@ case "$1" in
        *) log_end_msg 1; exit ;;
    esac
    log_end_msg 0
+   /usr/local/bin/qemu-system-i386 -xen-domid 0 -xen-attach -name dom0 -nographic -M xenpv -daemonize \
+       -monitor /dev/null -serial /dev/null -parallel /dev/null \
+       -pidfile /var/run/qemu-xen-dom0.pid
    ;;
  stop)
    capability_check
EOF
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-01-22 19:56:11 -0500

Seen: 68 times

Last updated: Jan 26 '15