[HOWTO] start and stop VM with your NAS.

Just about everything is virtual these days. Topics relating to virutalization go here.

Moderator: Lillian.W@AST

sksbir
Posts: 395
youtube meble na wymiar Warszawa
Joined: Tue Aug 25, 2015 9:23 pm

Re: [HOWTO] start and stop VM with your NAS.

Post by sksbir »

hi
i have no idea about what's happen. i suggest you to create a ticket to asustor support.
docb
Posts: 30
Joined: Sat Sep 09, 2017 1:34 am

Re: [HOWTO] start and stop VM with your NAS.

Post by docb »

thank you very much for all your help! I've created a ticket right now. Let's see if they can help...
sksbir
Posts: 395
Joined: Tue Aug 25, 2015 9:23 pm

Re: [HOWTO] start and stop VM with your NAS.

Post by sksbir »

one more question : did you reboot your NAS since you have installed virtualbox ?
docb
Posts: 30
Joined: Sat Sep 09, 2017 1:34 am

Re: [HOWTO] start and stop VM with your NAS.

Post by docb »

About 100 times ;-) That's my first choice to solve problems ;-)
docb
Posts: 30
Joined: Sat Sep 09, 2017 1:34 am

Re: [HOWTO] start and stop VM with your NAS.

Post by docb »

OMG, I found it out myself. I did not give up as I hate it when the CPU wins. You wouldn't believe it. Asustor support might laugh at me ;-) It is really the problem no. 1 when something doesn't work on linux and I did not think of it... :lol:
The problem is, that it needs to be started with sudo ;-)
Now I only have one problem left - if I put the scripts in
/usr/local/etc/init.d/S82VName - do they get sudo rights by themselves?
sksbir
Posts: 395
Joined: Tue Aug 25, 2015 9:23 pm

Re: [HOWTO] start and stop VM with your NAS.

Post by sksbir »

docb wrote:OMG, I found it out myself. I did not give up as I hate it when the CPU wins. You wouldn't believe it. Asustor support might laugh at me ;-) It is really the problem no. 1 when something doesn't work on linux and I did not think of it... :lol:
The problem is, that it needs to be started with sudo ;-)
Now I only have one problem left - if I put the scripts in
/usr/local/etc/init.d/S82VName - do they get sudo rights by themselves?
sudo ? I never used sudo here, because the only one account available with ssh connection to the NAS is root. ( so it was with ADM 2.7, I will check if they changed that with ADM 3 )

so how do you connect to your NAS ?

About startup script, you don't need to sudo anything, because it's already root who act here to execute the scripts.
docb
Posts: 30
Joined: Sat Sep 09, 2017 1:34 am

Re: [HOWTO] start and stop VM with your NAS.

Post by docb »

I connect via MobaXterm with ssh in admin account. But I need sudo for some things, eg. to cd into /opt/Virtualbox
I will add a pushover message into your script and test it in the init.d directory.
docb
Posts: 30
Joined: Sat Sep 09, 2017 1:34 am

Re: [HOWTO] start and stop VM with your NAS.

Post by docb »

Do i need to give the script some rights / a specific owner via chmod / chown?
sksbir
Posts: 395
Joined: Tue Aug 25, 2015 9:23 pm

Re: [HOWTO] start and stop VM with your NAS.

Post by sksbir »

docb wrote:I connect via MobaXterm with ssh in admin account. But I need sudo for some things, eg. to cd into /opt/Virtualbox
I will add a pushover message into your script and test it in the init.d directory.
admin and root have the same password, just connect directly with root to your NAS...
docb wrote:Do i need to give the script some rights / a specific owner via chmod / chown?
put the same rights/owner that other stuff in /usr/local/etc/init.d ( root and executable )...
docb
Posts: 30
Joined: Sat Sep 09, 2017 1:34 am

Re: [HOWTO] start and stop VM with your NAS.

Post by docb »

It works like a charm. I probably would have worked from the start if I did not try to run it from shell first :?
Is there a possibility to run your script before/after the NAS goes to standby? Right now I have massive problems with my VM after a NAS wake up on lan from standby - I always need to rebot the VM after that. So it would be better just to shut it down / restart when the NAS goes to standy / wakes up.
Post Reply

Return to “Virtualization”