Ask Your Question

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 -0500

GobleSt gravatar image

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

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

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

GobleSt gravatar image

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




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

Reboot and viola!

edit flag offensive delete link more

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

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


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

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

Can you be more specific? What happened?

randomuser gravatar imagerandomuser ( 2015-03-01 14:14:59 -0500 )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 -0500 )edit

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

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

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

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


It DOES work because the network issue is fixed from this question: 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 -0500 )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 -0500 )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 -0500 )edit

Question Tools



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

Seen: 420 times

Last updated: Mar 01 '15