CloudGenix的虚拟形状因子配置推送
cloudgenix_vff_push_config的Python项目详细描述
cloudgenix vff push配置
概要
帮助程序脚本,将虚拟形状因子(vff)配置推送到等待配置的新启动的虚拟ion。
可用方法:
- 串行(需要知道串行端口的TTY/PTY路径)
- serial还需要pyserial模块,这可能需要额外安装。
- telnet(kvm串行重定向到tcp端口/telnet样式)
- virsh控制台(无串行的kvm/qemu)
- ssh(对于aws/gce/azure-可以使用密码或私钥。)
要求
- 活动CloudGenix帐户
- python>;=2.7或>;=3.6
- Python模块:
- pyserial=3.0-https://pythonhosted.org/pyserial/
- pexpect>;=4.0-https://pexpect.readthedocs.io/en/stable/
安装
- pyserial=3.0-https://pythonhosted.org/pyserial/
- pexpect>;=4.0-https://pexpect.readthedocs.io/en/stable/
可通过PIP-pip install cloudgenix_vff_push_config
获得。
PIP应该向路径添加一个vff_push_config
或vff_push_config.exe
命令
示例
CloudGenix Virtual Form Factors(VFF)的示例配置文件位于./Example\u configs子目录中。 有关cloudgenix vff配置文件选项的更多信息,请参见https://support.cloudgenix.com
序列示例用法:
aaron@partner-lab-traf:~/vff_push_config$ sudo vff_push_config serial --file ./example_configs/example.cfg --pty /dev/pts/2
[VFF_PUSH] Starting VFF Config Push script.
[VFF_PUSH] Current directory is /home/aaron/vff_push_config
[VFF_PUSH] Successfully loaded 373 chars from ./example_configs/example.cfg.
[VFF_PUSH_SERIAL] Opening /dev/pts/2
[VFF_PUSH_SERIAL] 1 Got config prompt. Continuing.
[VFF_PUSH_SERIAL] Setting up config push.
[VFF_PUSH_SERIAL] Config successfully sent! Exiting.
aaron@partner-lab-traf:~/vff_push_config$
telnet示例用法:
aaron@partner-lab-traf:~/vff_push_config$ vff_push_config telnet --file ./example_configs/example.cfg --host 127.0.0.1 --port 4000
[VFF_PUSH] Starting VFF Config Push script.
[VFF_PUSH] Current directory is /home/aaron/vff_push_config
[VFF_PUSH] Successfully loaded 373 chars from ./example_configs/example.cfg.
[VFF_PUSH_TELNET] Opening 127.0.0.1:4000
[VFF_PUSH_TELNET] 127.0.0.1:4000 Opened
[VFF_PUSH_TELNET] 1 Got config prompt. Continuing.
[VFF_PUSH_TELNET] Setting up config push.
[VFF_PUSH_TELNET] Config successfully sent! Exiting.
aaron@partner-lab-traf:~/vff_push_config$
virsh控制台示例用法:
aaron@partner-lab-traf:~/vff_push_config$ vff_push_config virsh --domain Test_script_kvm4_ion_1 --file example_configs/example.yaml
[VFF_PUSH] Starting VFF Config Push script.
[VFF_PUSH] Current directory is /home/aaron/vff_push_config
[VFF_PUSH] Successfully loaded 380 chars from example_configs/example.yaml.
[VFF_PUSH_VIRSH] Launched '/usr/bin/virsh console Test_script_kvm4_ion_1', waiting for prompt.
[VFF_PUSH_VIRSH] 1 Got config prompt. Continuing.
[VFF_PUSH_VIRSH] Setting up config push.
[VFF_PUSH_VIRSH] Config successfully sent! Exiting.
aaron@partner-lab-traf:~/vff_push_config$
SSH控制台示例用法:
aaron@partner-lab-traf:~/vff_push_config$ vff_push_config ssh --file example_configs/example.yaml --host 172.22.5.244 --user virtualsetup --privkey ../TME-LAB-CONTROLLER.pem
[VFF_PUSH] Starting VFF Config Push script.
[VFF_PUSH] Current directory is /home/aaron/vff_push_config
[VFF_PUSH] Successfully loaded 380 chars from example_configs/example.yaml.
[VFF_PUSH_SSH] Connecting to virtualsetup@172.22.5.244:22, Password: No, Private Key: Yes. Waiting for prompt.
[VFF_PUSH_SSH] 1 Got config prompt. Continuing.
[VFF_PUSH_SSH] Setting up config push.
[VFF_PUSH_SSH] Config successfully sent! Exiting.
aaron@partner-lab-traf:~/vff_push_config$
kvm/qemu特定注释:
- 要设置串行端口pty-add
--serial=pty
to virt install命令。- 要确定pty文件名,请执行
virsh dumpxml "VMNAME" | grep console | grep pty
示例输出:<console type='pty' tty='/dev/pts/2'>
- 要确定pty文件名,请执行
- 要设置串行端口telnet listener,请向virt install命令添加
--serial tcp,host=<IF IP or 0.0.0.0>:<TCP PORT>,mode=bind,protocol=telnet
。
许可证
麻省理工学院
版本
Version | Changes |
---|---|
1.1.1 | Fix parser_type and global config file data |
1.1.0 | Updated with Dynamic menu item support, and minor fixes. |
1.0.0 | Initial Release. |