Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 16.04 #1

Open
diegobill opened this issue Mar 22, 2017 · 1 comment
Open

Ubuntu 16.04 #1

diegobill opened this issue Mar 22, 2017 · 1 comment

Comments

@diegobill
Copy link

I can not use this (https://github.com/krobertson/xenserver-automater) xenserver-automater on ubuntu 16.04, I have to use systemd instead of xe-automator.conf (upstart), I create this configs:

  • /etc/systemd/system/xenserver-automater.service :
[Unit]
Description="XenServer Guest Configuration Automator"

[Service]
WorkingDirectory=/home/user
ExecStart=/bin/bash xenserver-automater.sh
Restart=always

[Install]
WantedBy=multi-user.target
  • /home/user/xenserver-automater.sh :
#!/bin/bash

/usr/sbin/xe-set-network
/usr/sbin/xe-set-hostname
/usr/sbin/generate-sshd-keys
  • Then I create a VM but It is up without parameters that I passed:
UUID=`xe vm-install template=mytemplate  new-name-label=newvm`
xe vm-param-set uuid=$UUID xenstore-data:vm-data/ip=192.168.1.20
xe vm-param-set uuid=$UUID xenstore-data:vm-data/gw=192.168.1.254
xe vm-param-set uuid=$UUID xenstore-data:vm-data/nm=255.255.255.0
xe vm-param-set uuid=$UUID xenstore-data:vm-data/ns=192.168.1.254
xe vm-param-set uuid=$UUID xenstore-data:vm-data/dm=mydomain.com
xe vm-start uuid=$UUID
@diegobill
Copy link
Author

It works now, I forgot to execute:

sudo systemctl enable xe-automator.service

And install :

apt-get install -y xenstore-utils

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant