LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-25-2024, 06:20 AM   #1
Jason.nix
Member
 
Registered: Feb 2023
Posts: 562

Rep: Reputation: 10
Post A script to shutdown the system under certain conditions


Hello,
I need a script that shuts down the host when the virtual machine is shut down in VirtualBox.
Any example?

Thank you.
 
Old 04-25-2024, 10:20 AM   #2
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,235

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
If the VM can see the host, then I’d have the VM run a command on shutdown. That command would be to shut the host down over SSH.

https://opensource.com/life/16/11/ru...shutdown-linux
 
Old 04-25-2024, 04:36 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,728

Rep: Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919
What is the host operating system? What is the operating system of the guest?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
To what extent can an older OS be used safely under certain conditions? bcsm Linux - Security 8 11-04-2021 01:46 PM
LXer: FCC: Open source router software is still legal—under certain conditions LXer Syndicated Linux News 0 09-25-2015 03:52 PM
[SOLVED] write to file under certain conditions progchi Linux - Newbie 3 10-30-2012 10:48 AM
Can't log in to wireless network except under certain(inconvenient) conditions Benjamin Lindley Linux - Wireless Networking 3 12-29-2011 12:22 PM
NFS not mounting at boot under certain conditions. robeph Linux - Networking 3 04-29-2008 08:16 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration