未验证 提交 2a25fdb0 编写于 作者: Y Yu Yihuang 提交者: GitHub

Merge pull request #2278 from yanglei-rh/bug1847466

Add one case for Windows cpu model flag
from virttest import error_context
from virttest import utils_net
@error_context.context_aware
def run(test, params, env):
"""
Boot a winodws guest add Vendor ID with name "KVMKVMKVM" to cpu model flag
1) Boot a vm with 'e1000e + hv_vendor_id=KVMKVMKVM' on q35 machine
2) Run the bcdedit command as administrator
3) reboot guest by shell
4) do ping test
:param test: QEMU test object.
:param params: Dictionary with the test parameters.
:param env: Dictionary with test environment.
"""
login_timeout = params.get_numeric("login_timeout", 360)
vm = env.get_vm(params["main_vm"])
vm.verify_alive()
session_serial = vm.wait_for_serial_login(timeout=login_timeout)
bcdedit_debug = params["bcdedit_debug"]
bcdedit_cmd = params["bcdedit_cmd"]
ext_host = params.get("ext_host")
try:
session_serial.cmd(bcdedit_debug)
session_serial.cmd(bcdedit_cmd)
vm.reboot(timeout=login_timeout)
status, output = utils_net.ping(dest=ext_host, count=10,
session=session_serial, timeout=30)
if status:
test.fail("ping is failed, output %s" % output)
finally:
session_serial.close()
- boot_e1000e_with_cpu_flag:
only q35
only e1000e
only Windows
type = boot_e1000e_with_cpu_flag
cpu_model_flags += ",hv_vendor_id=KVMKVMKVM"
bcdedit_debug = "bcdedit /debug on"
bcdedit_cmd = "bcdedit /dbgsettings net hostip:192.168.0.12 port:50000 key:this.key.isnt.secure"
ext_host = "www.redhat.com"
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册