Ask Your Question
1

created and used /etc/rc.d/rc.local to start a vm automatically at boot. It worked great but then stopped.

asked 2015-02-27 07:33:26 -0600

GobleSt gravatar image

updated 2015-02-27 09:31:00 -0600

mether gravatar image

Why and how to I fix?

I tried removing the file and recreating but it does not start my VM.... I don't even know what information to supply. F20 with Xen 4.33. I made no changes to the system prior to it stopped working.

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
0

answered 2015-03-01 10:07:44 -0600

GobleSt gravatar image

I was able to make this work by creating /etc/default/xendomains file as it was missing, with this data:

XENDOMAINS_SAVE=

XENDOMAINS_RESTORE=false

XENDOMAINS_AUTO=/etc/xen/auto

Then copied my /etc/xen/win7.sxp file to /etc/xen/auto

Reboot and viola!

edit flag offensive delete link more
1

answered 2015-02-27 21:30:01 -0600

Use libvirt to manage virtual machine resources, not shell commands in rc.local. virsh --connect xen:///; help should get you started; there's an autostart directive for what you're trying to do.

edit flag offensive delete link more

Comments

virsh --connect xen:///; help did not help me. Thanks though.

GobleSt gravatar imageGobleSt ( 2015-03-01 10:04:22 -0600 )edit

Can you be more specific? What happened?

randomuser gravatar imagerandomuser ( 2015-03-01 14:14:59 -0600 )edit

I explained in answering my own question. Not sure how to mark this as answered...

GobleSt gravatar imageGobleSt ( 2015-03-02 05:08:15 -0600 )edit

Are you saying that virsh did not connect to your xen instance?

randomuser gravatar imagerandomuser ( 2015-03-02 08:04:48 -0600 )edit
1

answered 2015-02-27 11:26:34 -0600

covex gravatar image

With systemd things changed.

You may still use rc.local for compatibility reasons, but make sure you have /usr/lib/systemd/system/rc-local.service

Also make sure your rc.local is executable.

edit flag offensive delete link more

Comments

It DOES work because the network issue is fixed from this question: https://ask.fedoraproject.org/en/question/62262/for-whatever-reason-i-need-to-run-systemctl-restart-network-after-i-login-in-order-for-everything-to-run-smoothly-what-do-i-need-to-do-to-automate/ but the VM portion of it does not. The file is executable.

/usr/lib/systemd/system/rc-local.service does exist.

GobleSt gravatar imageGobleSt ( 2015-02-27 17:02:10 -0600 )edit

"It DOES work... "

Meaning, it's working now and the issue is resolved? You're assuming it's supposed to work?

ILMostro gravatar imageILMostro ( 2015-02-28 04:21:45 -0600 )edit

No I mean it works because the issue I was having with the network is resolved that way. I just deleted the extra stuff that I had in there that was starting my VM (which stopped working). I was having two issues. The network thing and I wanted to start the VM at boot. I put both in that file and it was working. The network piece kept working but the VM piece stopped. VM piece is fixed with my answer to the question.

GobleSt gravatar imageGobleSt ( 2015-03-01 10:09:40 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2015-02-27 07:33:26 -0600

Seen: 417 times

Last updated: Mar 01 '15