vmware vmrun命令简介
来源:互联网 发布:退款师软件 编辑:程序博客网 时间:2024/06/14 16:37
1、简介
VMWare提供了vmrun与VIX API两种手段使用户可以通过程序对虚拟机进行控制。vmrun是一种命令行控制的手段,但是可以通过Shell脚本实现连续多个操作的自动化。
2、语法
Usage: vmrun COMMAND [PARAMETERS]
Authentication flags
-gu <userName in guest OS>
-gp <password in guest OS>
POWER COMMANDS PARAMETERS DESCRIPTION
start Path to vmx file Start a VM or Team
or vmtm file
[gui|nogui]
stop Path to vmx file Stop a VM or Team
or vmtm file
[hard|soft]
reset Path to vmx file Reset a VM or Team
or vmtm file
[hard|soft]
suspend Path to vmx file Suspend a VM or Team
or vmtm file
[hard|soft]
SNAPSHOT COMMANDS PARAMETERS DESCRIPTION
listSnapshots Path to vmx file List all snapshots in a VM
snapshot Path to vmx file Create a snapshot of a VM
Snapshot name
deleteSnapshot Path to vmx file Remove a snapshot from a VM
Snapshot name
revertToSnapshot Path to vmx file Set VM state to a snapshot
Snapshot name
GUEST OS COMMANDS PARAMETERS DESCRIPTION
runProgramInGuest Path to vmx file Run a program in Guest OS
Program
[Program arguments]
fileExistsInGuest Path to vmx file Check if a file exists in Guest OS
Path to file in guest
setSharedFolderState Path to vmx file Modify a Host-Guest shared folder
Share name
New host path
addSharedFolder Path to vmx file Add a Host-Guest shared folder
Share name
Host path
removeSharedFolder Path to vmx file Remove a Host-Guest shared folder
Share name
listProcessesInGuest Path to vmx file List running processes in Guest OS
killProcessInGuest Path to vmx file Kill a process in Guest OS
process id
runScriptInGuest Path to vmx file Run a script in Guest OS
Interpreter path
script_text
deleteFileInGuest Path to vmx file Delete a file in Guest OS
File
createDirectoryInGuest Path to vmx file Create a directory in Guest OS
Directory path
deleteDirectoryInGuest Path to vmx file Delete a directory in Guest OS
Directory path
listDirectoryInGuest Path to vmx file List a directory in Guest OS
Directory path
copyFileFromHostToGuest Path to vmx file Copy a file from host OS to guest OS
Path on host
Path in guest
copyFileFromGuestToHost Path to vmx file Copy a file from guest OS to host OS
Path in guest
Path on host
renameFileInGuest Path to vmx file Rename a file in Guest OS
Original name
New name
GENERAL COMMANDS PARAMETERS DESCRIPTION
list List all running VMs
upgradevm Path to vmx file Upgrade VM file format, virtual hw
installtools Path to vmx file Install Tools in Guest OS
3、示例
1)开启虚拟机
vmrun start "/opt/VM_OS/RH_OS_B/Red Hat Enterprise Linux 5 64-bit.vmx" nogui|gui
2)停止虚拟机
vmrun stop "/opt/VM_OS/RH_OS_B/Red Hat Enterprise Linux 5 64-bit.vmx" nogui|gui
3)重启虚拟机
vmrun restart "/opt/VM_OS/RH_OS_B/Red Hat Enterprise Linux 5 64-bit.vmx" nogui|gui
4)列出正在运行的虚拟机
vmrun list
- vmware vmrun命令简介
- vmware vmrun命令简介
- VM 的管理命令vmrun
- vmrun命令行的使用(VMWare虚拟机)
- VMware ESX 4.0 vmware-cmd命令简介
- GNS3连接VMware出现error could not execute vmrun:Command "C:\\program files (x86)\\vmwork\\vmrun.exe,'-T'
- VMWare简介
- VMWare简介
- VMware简介
- VMware简介
- vmrun与VIX API
- VMWare网络简介
- Vmware SERVER 简介
- Vmware SERVER 简介
- vmware esx简介
- VMware vSphere 简介
- VMware vMotion简介
- VMware Converter 简介
- 10位IT领袖给应届毕业生的10条忠告
- 杭电2629
- java String,Jni jstring, utf-8/unicode interoperate sample code
- Cannot create a server using the selected type
- 关于jquery的ajax提交form表单的域模型问题
- vmware vmrun命令简介
- JavaScript:函数的定义和调用
- VMware ESX 4.0 vmware-cmd命令简介
- Oracle学习(5)--存储过程、索引、同义词
- eclipse连接小米2调试程序的问题
- 浅谈SNS下的人际关系的改变
- HDU/HDOJ 1677 Nested Dolls 搜索
- JVM OOM的几种情况
- 存储容量