Anchor | ||||
---|---|---|---|---|
|
Include Page | ||||
---|---|---|---|---|
|
...
Method | Comments |
---|---|
expect | Requires you pass user and password to the script so that it can connect to the console via "
This method is useful if the virtual machine has no telnet connection available and cannot handle " Important notes:
|
rsh | Requires a trust to be created between the Linux server and the HP-UX guest to issue password free remote commands. For more, please read the Tips and Tricks chapter dedicated to rsh trusts. If 'rsh' is not installed on the Linux server, please run "# yum install rsh" (CentOS7/RHEL7) or "dnf install rsh" (CentOS8). For RHEL 8, please read the Tips and Tricks chapter dedicated to rsh installation on RHEL8. |
ssh | Requires a secured trust to be created between the Linux server and the HP-UX guest (key pair) to issue password and passphrase free remote commands. For more, please read the Tips and Tricks chapter dedicated to ssh trusts. |
Div | ||
---|---|---|
| ||
| ||
If your application and server need time to shutdown, it could be necessary to give more time in the service definition to prevent from the service stop procedure to fail due to timeout.
To do so, open the "Manage 'systemd' services
" option and edit the service configuration file. You can then add the TimeoutStopSec=
parameter in the Service
section. The default value is 20 minutes and can be changed in the preferences menu options.
Example:
|
More information can be found using the "# man systemd.service
" command on your Linux server
Options
- Options 1 to 3 are explanations on how to setup and prepare the virtual machine and the Charon Linux server (if necessary) to use the three available methods.
- Option 4 edits the script. This script is in a form of "case in <configuration filename> do ..."
- Option 5 is used to test the script. Use with caution on production machines.
...
You'll find in options 1 to 3 all the details to setup the remote connection: packages to install, proxy settings for rsh, key pair definition for ssh (password and passphrase free), the necessary firewall settings if needed, etc...
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
It is possible to create a script, "/opt/charon/utils/charon_gstart.chkrun
" (an example is provided in the 'charon_gstart.chkrun.example
' file) that will add a status line while displaying the guests list for running guests only. This script, if needed, has to be created manually and must be executable.
...
- file
...
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 | ||||
---|---|---|---|---|
|