ESXi服务器和Xen服务器控制脚本。
pyxenter的Python项目详细描述
ESXi服务器和Xen服务器控制脚本。
要求
- python 2.7版
功能
- 非兴
ESXi子命令
- 列表
- IP
- 打开
- 关
- 销毁
- 导入
ESXi示例
虚拟机列表。
$ esxi list -H [IPv4 Address of Server] -u [User name] -p [Password]
虚拟机已打开。
$ esxi on -H [IPv4 Address of Server] -u [User name] -p [Password] [VM name1] [VM name2] ...
获取虚拟机的IPv4地址。(已安装的vmware工具)
$ esxi ip -H [IPv4 Address of Server] -u [User name] -p [Password] -n [VM name]
使用文件路径导入ovf或ova文件。
$ esxi import -H [IPv4 Address of Server] -u [User name] -p [Password] --file [OVF or OVA File path] [New VM name1] [new VM name2] ...
使用url导入ova文件。
$ esxi import -H [IPv4 Address of Server] -u [User name] -p [Password] --url [OVA URL] [New VM name1] [New VM name2] ...
Xen子命令
- 列表
- IP
- 打开
- 关
- 重新启动
- 挂起
- 暂停
- 销毁
- 安装
Xen示例
虚拟机列表。
$ xen list -U [URL of Server] -u [User name] -p [Password]
虚拟机已打开。
$ xen on -U [URL of Server] -u [User name] -p [Password] [VM name1] [VM name2] ...
获取虚拟机的IPv4地址。(已安装Xen工具)
$ xen ip -U [URL of Server] -u [User name] -p [Password] -n [VM name]
使用模板安装xen vm。
$ xen install -U [URL of Server] -u [User name] -p [Password] -t [Template name] [New VM name1] [New VM name2] ...
使用模板安装Xen虚拟机。(创建多个虚拟机)
$ xen install -U [URL of Server] -u [User name] -p [Password] -t [Template name] [New VM name1] [New VM name2] ...
多个虚拟机控制命令
- 命令(ESXI& GT;ON-GON,XEN & GT;OFF重启暂停暂停)
- 导入命令(ESXI>导入,Xen & Gt;安装)
- 销毁命令(销毁)
安装
易于安装:
$ easy_install pyxenter
管道:
$ pip install pyxenter
许可证
版权所有(c)2013,Kazuki Hasegawa保留所有权利。
在满足以下条件的情况下,允许以源代码和二进制格式重新分发和使用(无论是否修改):
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
此软件由著作权人和出资人提供,如“是”,任何明示或默示保证,包括但不限于,适销性和适合特定目的的默示保证。在任何情况下,版权持有人或贡献者均不对任何直接、间接、附带、特殊、惩戒性或后果性损害(包括但不限于替代货物或服务的采购;使用、数据或利润的损失;或业务中断)承担责任,无论其原因如何,也不论其责任理论是否在合同中,严格责任,或因使用本软件而产生的侵权行为(包括疏忽或其他),即使被告知此类损害的可能性。