vmware vmrun命令简介
来源:互联网 发布:hash 统计海量数据 编辑:程序博客网 时间:2024/06/03 17:58
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 简介
- 微分方程小记
- 【hdu 2544】最短路 (dijkstra算法模板题)
- 并发新特性—Executor框架与线程池
- python中大小写字符转换及字符判断
- elasticSearch基础普及篇
- vmware vmrun命令简介
- Android线程之AsyncTask使用与原理分析
- 解决:Chrome查看源码时出现乱码
- Unity2D Sprite灰白图
- ASCII、Unicode、UTF-8
- sublime3之路 准备好了才能上路
- 消息中间件学习
- fabric 不要混淆了
- Android 缓存(2)---硬盘缓存DiskLruCache