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

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


snapshot.sh

Различия

Показаны различия между двумя версиями страницы.

Ссылка на это сравнение

snapshot.sh [2011/02/22 16:02]
snapshot.sh [2020/06/13 13:47] (текущий)
Строка 1: Строка 1:
 +====== snapshot.sh ======
 +Script VM stop, snapshot, start.
 +<file>
 +# nano /scripts/vmware/snapshot.sh
 +</file>
 +<file>
 +#!/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"
 +
 +</file>