Инструменты пользователя

Инструменты сайта


Боковая панель

Связь

snapshot.sh

snapshot.sh

Script VM stop, snapshot, start.

# nano /scripts/vmware/snapshot.sh
#!/bin/bash 
#
# This script snapshots VMware machine
#
VMSTORAGE="[standard]"
# the URL of the VMware host
HOST="https://localhost:8333/sdk"
# admin user on VMware host
HOST_USER="root"
HOST_PWD="your password"
# the VMware script 
VMRUN="/usr/bin/vmrun"

#----------- VM VisiCAR Windows XP Pro SP3 + VMware tools
# Stop. If install VMware tools
$VMRUN -T Server -h $HOST -u $HOST_USER -p $HOST_PWD stop "[standard] WinXpSP3_visicar/WinXpSP3_visicar.vmx" soft
# Delete snapshot
#$VMRUN -T Server -h $HOST -u $HOST_USER -p $HOST_PWD deleteSnapshot "[standard] WinXpSP3_visicar/WinXpSP3_visicar.vmx"
# Create snapshot
$VMRUN -T Server -h $HOST -u $HOST_USER -p $HOST_PWD snapshot "[standard] WinXpSP3_visicar/WinXpSP3_visicar.vmx"
# Start
$VMRUN -T Server -h $HOST -u $HOST_USER -p $HOST_PWD start "[standard] WinXpSP3_visicar/WinXpSP3_visicar.vmx"

#----------- VM FreeBSD 6.2 NOT install VMware tools
# Stop. If NOT install VMware tools
$VMRUN -T Server -h $HOST -u $HOST_USER -p $HOST_PWD stop "[standard] FreeBSD_visicar/FreeBSD_visicar.vmx"
# Create snapshot
$VMRUN -T Server -h $HOST -u $HOST_USER -p $HOST_PWD snapshot "[standard] FreeBSD_visicar/FreeBSD_visicar.vmx"
# Start
$VMRUN -T Server -h $HOST -u $HOST_USER -p $HOST_PWD start "[standard] FreeBSD_visicar/FreeBSD_visicar.vmx"

#----------- VM Ubuntu Ubuntu 10.04.2 LTS GIT
# Stop. If NOT install VMware tools
$VMRUN -T Server -h $HOST -u $HOST_USER -p $HOST_PWD stop "[standard] Ubuntu1004LTS_GIT/Ubuntu1004LTS_GIT.vmx"
# Create snapshot
$VMRUN -T Server -h $HOST -u $HOST_USER -p $HOST_PWD snapshot "[standard] Ubuntu1004LTS_GIT/Ubuntu1004LTS_GIT.vmx"
# Start
$VMRUN -T Server -h $HOST -u $HOST_USER -p $HOST_PWD start "[standard] Ubuntu1004LTS_GIT/Ubuntu1004LTS_GIT.vmx"

#----------- VM Ubuntu Ubuntu 10.04.2 LTS Monitor
# Stop. If NOT install VMware tools
$VMRUN -T Server -h $HOST -u $HOST_USER -p $HOST_PWD stop "[standard] Ubuntu1004TLS_monitor/Ubuntu1004TLS_monitor.vmx"
# Create snapshot
$VMRUN -T Server -h $HOST -u $HOST_USER -p $HOST_PWD snapshot "[standard] Ubuntu1004TLS_monitor/Ubuntu1004TLS_monitor.vmx"
# Start
$VMRUN -T Server -h $HOST -u $HOST_USER -p $HOST_PWD start "[standard] Ubuntu1004TLS_monitor/Ubuntu1004TLS_monitor.vmx"



snapshot.sh.txt · Последние изменения: 2011/02/22 13:02 (внешнее изменение)