2016-08-05 100 views
1

在Windows 10上运行chefdkhyperv测试厨房卡住“创建虚拟机”

我可以使用kitchen create创建Windows VM,它工作正常,但我只是想在Linux虚拟机,我得到这个errror:

PS> kitchen create 
-----> Starting Kitchen (v1.10.0) 
-----> Creating <default-centos-72>... 
     Creating differencing disk for default-centos-72. 
     Created differencing disk for default-centos-72. 
     Checking for existing virtual machine. 
     Creating virtual machine for default-centos-72. 
     Created virtual machine for default-centos-72. 

QBiA...AA== -outputformat Text ---- 
STDOUT: 
STDERR: #< CLIXML 
---- End output of c:\windows\sysnative\windowspowershell\v1.0\powershell.exe -noprofile -executionpolicy bypass -encodedcommand LgAg...AA== -outputformat Text ---- 

ProcessId: 18780 
app_name: c:\windows\sysnative\windowspowershell\v1.0\powershell.exe 
command_line: c:\windows\sysnative\windowspowershell\v1.0\powershell.exe -noprofile -executionpolicy bypass -encodedcommand LgAgAEM...BjADC0ASgBzAG8AbgAKAA== -outputformat Text 
timeout: 600] on default-centos-72 
>>>>>> ---------------------- 
>>>>>> Please see .kitchen/logs/kitchen.log for more details 
>>>>>> Also try running `kitchen diagnose --all` for configuration 

现在,它创建一个虚拟机,我可以手动ssh成通过PuTTY或从cmd通过openssh for Windows,所以我不知道为什么它的挂起看起来像不能访问它。

这是我.kitchen.yml

--- 
driver: 
    name: hyperv 
    parent_vhd_folder: c:\HyperV\VHDs\ 
    parent_vhd_name: CentOS-7.vhdx 
    vm_switch: NAT 
    memory_startup_bytes: 2GB 

provisioner: 
    name: chef_zero 

transport: 
    password: [email protected]# 

platforms: 
    - name: centos-7.2 

suites: 
    - name: default 
    run_list: 
     - recipe[myrecipe::default] 
    attributes: 

编辑 - 更多信息: 服务器配置为DHCP 当我看着.kitchen文件夹中的日志是空 .kitche \默认的CentOS-72 .yml只列出一个ID(不知道如果多数民众赞成应该有它的管理员名称和IP像RDP文件? 我也尝试指向一个静态IP在.kitchen.yml

+0

你看过位于'.kitchen/logs/kitchen.log'的日志吗? –

+0

厨房日志是emtpy – red888

+0

您是否在管理员模式命令提示符下运行“厨房创建”? –

回答

0

OK史蒂芬是正确的,应该看看到这个越快。

看起来这可能与this bug有关。

正如他建议我发现的Hyper-V并没有在来宾汇报了IP,我看到: enter image description here

禁用SELinux和重启似乎解决了这个错误,我可以看到访客的IP在超-V和厨房创作。

有没有办法让这个服务访问没有完全禁用selinux?

2

@ red888是否vm有最新的客人组件? Hyper-V管理器是否查看与vm nic关联的IP地址?您可以检查无论是在Hyper-V管理或通过PowerShell的

(get-vm 'your vm name').networkadapters[0].ipaddresses

如果是这样,请在https://github.com/test-kitchen/kitchen-hyperv文件中的问题,我会很乐意进行深入分析。

你会想要最新的集成组件(我觉得4.1是最新的 - https://www.microsoft.com/en-us/download/details.aspx?id=51612

+0

因此,CentOS7随附了Integration Services,但是我没有看到IP显示在hyperv控制台或PowerShell中。它应该还是这是linux客户没有的功能之一? – red888

+0

我会尝试一个gen 2 vm或许 – red888

+0

它带有一个IC的基本级别,您需要单独安装更多的集成组件。 @ red888 –