I was cycling circuit breakers the other day, and might have cut power to where my Nanos live.
A few days later, I noticed I was getting "gateway error" when trying to access a website hosted in a VM on one of my Nanos. I use the Edge nginx to proxy to the VM.
I just checked the dashboard, the VM was not powered up. I manually start, and now the proxy to the website is working ok.
Hi TheGarnet:
Thanks for letting us know.
Can you let us know what type of VM (antlet) you were using?
I can do some testing on my nano to see if I can replicate this issue.
Thanks.
| antlet Name |
|
| Created |
Fri Aug 7 22:13:08 PDT 2020 |
| Used On Disk
|
1.65 GB |
| Effective Size
|
2.04 GB |
| From Template |
centos7 - LXC |
Accidentally unplugged the wall wart for one of my nanos. I plugged it back in, and this Antlet, with Autostart sent to on, did not restart.
Here is a work around for the antlets not autostarting on the Nano.
Create a script which will start the antlets. The command to start a specific antlet is
virsh start ANTLET_NAME
or
virsh -c lxc:/// ANTLET_NAME
Use the '-c lxc:///' option for lxc antlets
So if I had a KVM antlet named 'gitlab' and two LXC antlets named 'webserver-1' and 'webserver-2' and wanted these three to autostart on a reboot...
Open a new file for editing. If you are not familiar with using the vim editor, install the 'nano' editor first with `yum install nano`
nano /root/autostart-antlets
You can name the file what ever you like.
Then add the following contents
#!/bin/bash
sleep 30
virsh start gitlab
virsh -c lxc:/// start webserver-1
virsh -c lxc:/// start webserver-2
Make the file executable
chmod +x /root/autostart-antlets
Edit the crontab to run the script at reboot
EDITOR=nano crontab -e
Add the following line to the file
@reboot /root/autostart-antlets
Thats it.
Edit the 'autostart-antlets' file as needed to add or remove antlets for autostart