• BAT启动关闭VMWARE的虚拟机


    借用多年前一个来自于WAMP产品的脚本改装成启动关闭VM中的hadoop主机N.bat,参考均来自于网络!

    @ECHO OFF
    SETLOCAL
    TITLE VMware管理
    echo VMware管理
    REM 管理服务
    
    @for /f  "delims=," %%i in ( '1','2','4') do echo "%%i"
    
    
    :_VMWARE_SELECT_
    :{
        cls 
        echo =================================================================
        echo ========================VMWARE后台启动=======================
        echo =================================================================
        cd 
        cd C:Program Files (x86)VMwareVMware Workstation
        echo 1、帮助
        echo 2、启动hadoop集群
        echo 3、重启hadoop集群
        echo 4、停止hadoop集群
        echo 5、挂起hadoop集群
        echo 6、查看activeVMware
        echo 0、退出
        echo.
        SET SELECT=9
        SET /P SELECT=请选择您要进行的操作(默认:1)
        IF "%SELECT%" == "0" goto _VMWARE_SELECT_END_
        IF "%SELECT%" == "1" vmrun --help && pause && sleep 5 && goto END
        IF "%SELECT%" == "2" @set op=start
        IF "%SELECT%" == "3" @set op=reset
        IF "%SELECT%" == "4" @set op=stop
        IF "%SELECT%" == "5" @set op=suspend
        IF "%SELECT%" == "5" vmrun list && pause && @goto END
        vmrun %op% "C:softVMHadoop01Hadoop01.vmx" nogui
        vmrun %op% "C:softVMHadoop02Hadoop02.vmx" nogui
        vmrun %op% "C:softVMHadoop03Hadoop03.vmx" nogui
        goto _VMWARE_SELECT_
    :}
    
    :_VMWARE_SELECT_END_
    :{
        @goto END
    :}
    
    :END
    :{
        ENDLOCAL
        exit 0
        goto :EOF
    :}
  • 相关阅读:
    Notes about "Exploring Expect"
    Reuse Sonar Checkstyle Violation Report for Custom Data Analysis
    Eclipse带参数调试的方法
    MIT Scheme Development on Ubuntu
    Manage Historical Snapshots in Sonarqube
    U盘自动弹出脚本
    hg的常用配置
    Java程序员的推荐阅读书籍
    使用shared memory 计算矩阵乘法 (其实并没有加速多少)
    CUDA 笔记
  • 原文地址:https://www.cnblogs.com/silencemaker/p/12573052.html
Copyright © 2020-2023  润新知