2016-08-05 92 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 –