Ask Your Question

How to run a service on vm when its bootstapped from cloud init

asked 2015-02-26 15:20:07 -0500

nutshi gravatar image

updated 2015-02-26 15:20:25 -0500

0 down vote favorite

I am trying to run zabbix agent when my vm comes up

my cloudinit.txt (part of it) loks like this :-

 - [ ls, -l, / ]
 - [ ls, -l, /usr ] 
 - [ sudo service zabbix-agent restart ]

most of the commands work ( I am able to list the directory) but the service does not start and i get this in logs:-

sudo service zabbix-agent restart: command not found

If I log into ,y vm ..i am able to start it using the same command

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2015-03-01 20:36:29 -0500

killingwolf gravatar image

I thank you should use the absolute path of the service command.

edit flag offensive delete link more

answered 2015-03-17 02:46:05 -0500

Praveen N gravatar image


This link may help you

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


Asked: 2015-02-26 15:20:07 -0500

Seen: 255 times

Last updated: Mar 17 '15