Anchor | ||||
---|---|---|---|---|
|
Include Page | ||||
---|---|---|---|---|
|
...
When the script is initialized using option 6 or when a new virtual machine is added, the following lines are added:
...
...
|
One of the blue colored lines above has to be uncommented depending on the method chosen. Other lines can remain in the script or can be deleted.
...
Check the guest can be reached via ping, if yes:
Issue the
shutdown
command via "ssh" (depends on the operating system),Wait for a few seconds
Check if the guest can be "pinged" and repeat with an interval of 5 seconds
If the guest cannot be pinged, assume the shutdown procedure is complete
Kill the emulator process and reset the service state. The shutdown commands does not power off nor stop the emulator process, that's why this operation is needed
- Report the stop information within the guest log file
...
Optional guest display status script
...
- file
...
This status line is the result of the command you executed for that guest (known by its configuration file), for example a ping
, an ssh
command displaying uptime
(for HP-UX)
Display output example from the "vmlist
" command:
...
class | pagebreak |
---|
...
In this example, we use "ssh
" to display the guest "uptime
".
The last 2 lines containing the RETVAL variable are mandatory
To create the script, the following commands were executed to copy the provided example to the one that will be used:
...
# cp /opt/charon/utils/charon_gstart.chkrun.example
/opt/charon/utils/charon_gstart.chkrun
# chmod 744 /opt/charon/utils/charon_gstart.chkrun
# vim /opt/charon/utils/charon_gstart.chkrun
Example:
...
Include Page | ||||
---|---|---|---|---|
|