Posted by: Anonymous
[ip: 65.60.70.211]
on February 01, 2008 05:07 PM
I use Seamless RDP & VMWare on Kubuntu, and I wanted a safe way to shutdown the Virtualized Windows when I shutdown the computer. So I added the following line to the [Shutdown] section of /etc/kde3/kdm/kdmrc:
HaltCmd=/path/to/shutdown-vm.sh&&/sbin/poweroff
shutdown-vm.sh
--------------------------------------------------------------------------
#!/bin/bash
# A script to safely shutdown a guest OS running in VMWare
# We can hack /etc/kde3/kdm/kdmrc (/HaltCmd) to run this at shutdown
VMCMD='/usr/bin/vmware-cmd'
WINDOWS='/var/lib/vmware/Virtual Machines/Windows XP Professional/Windows XP Professional.vmx'
Automatic Shutdown
Posted by: Anonymous [ip: 65.60.70.211] on February 01, 2008 05:07 PMHaltCmd=/path/to/shutdown-vm.sh&&/sbin/poweroff
shutdown-vm.sh
--------------------------------------------------------------------------
#!/bin/bash
# A script to safely shutdown a guest OS running in VMWare
# We can hack /etc/kde3/kdm/kdmrc (/HaltCmd) to run this at shutdown
VMCMD='/usr/bin/vmware-cmd'
WINDOWS='/var/lib/vmware/Virtual Machines/Windows XP Professional/Windows XP Professional.vmx'
$VMCMD "$WINDOWS" stop trysoft & >> /var/log/shutdown-vm.log
echo "[`date`] VM $WINDOWS safely powered off " >> /var/log/shutdown-vm.log
#