We will now create a more controlled shutdown of vCloud.
This script that you create will be running on the vCloud Director VM itself, so we need to be able to log in to the VM and become a root user.
You also need a user account, that is SysAdmin
in order to execute the script.
There are two ways to get the script into the vCloud VM:
Copy/paste via SSH:
Log in to the vCloud Director VM via a SSH Client (for example, Putty).
Gain root access, if you haven't already.
Type the command
vi /sbin/vCloud-Shutdown
.The text editor vi opens. Press the i key.
Copy and paste the code into vi.
Press the keys w and q to save and quit vi.
Run the command
chmod 744 /sbin/vCloud-Shutdown
.
Copy via SCP or SFTP:
Open up a connection to the vCloud Director VM with an SCP (WinSCP).
Copy the program to
/sbin/
.Close the connection.
Log in to the vCloud Director VM via an SSH Client (for example, Putty).
Gain root access, if you haven't already.
Run the command
chmod 744 /sbin...