首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Azure functions on Premises -来自守护程序的错误响应:无法终止容器

Azure functions on Premises -来自守护程序的错误响应:无法终止容器
EN

Stack Overflow用户
提问于 2018-03-15 02:30:30
回答 3查看 318关注 0票数 0

我正在使用Azure Functions on Premises V2 (运行时)。

尝试测试每分钟都会执行的简单函数,并将其写入日志。

然而,函数没有被执行,我得到了这个错误。

它在装有Windows server 2016的虚拟机上运行。(我认为可能是什么导致了这个问题)。

我是Docker和Hyper-V的新手,任何帮助都将不胜感激。

如果Hyper V和Docker运行良好,我可以执行一些命令?

提前谢谢你。

这是我得到的日志。

3/14/2018 5:42:44 PM Welcome,您现在已连接到日志流服务。3/14/2018 5:41:48 PM myteslaVM Function App 'MyContainerFuncApp‘正在启动...3/14/2018 5:41:49 PM myteslaVM拉取容器镜像myteslaVM 5:41:50 PM MyContainerFuncApp预览2-最新- myteslaVM服务器:正在从azfuncrun/azure-functions-runtime3/14/2018 5:41:50 PM myteslaVM摘要:myteslaVM 5:41:50 PM myteslaVM状态:镜像是最新的对于azfuncrun/azure-functions-runtime:preview2-latest-nanoserver

3/14/2018 5:41:50 PM f2788b6c9c5d6115bba891f463759dd0df75c2344e6c217b0280a8b9f686fb32容器镜像azfuncrun/azure-functions-runtime:preview2-latest-nanoserver拉取成功!3/14/2018 5:41:50 PM myteslaVM Provisioning容器MyContainerFuncApp_03/14/2018 5:41:51 PM myteslaVM Functions 3/14/2018 5:41:51 PM myteslaVM C:\Program Files\Azure Functions Runtime\docker\docker.exe:来自守护进程的错误响应:容器Functions

代码语言:javascript
复制
encountered an error during CreateContainer: failure in a Windows system call: No hypervisor is present on this system. (0xc0351000) extra info: {"SystemType":"Container","Name":"f2788b6c9c5d6115bba891f463759dd0df75c2344e6c217b0280a8b9f686fb32","Owner":"docker","IgnoreFlushesDuringBoot":true,"LayerFolderPath":"C:\\Program Files\\Azure Functions Runtime\\docker\\windows\\windowsfilter\\f2788b6c9c5d6115bba891f463759dd0df75c2344e6c217b0280a8b9f686fb32","Layers":[{"ID":"951f96e7-ad8c-5e5c-8533-4f70d49a4e6a","Path":"C:\\Program Files\\Azure Functions

"HostName":"f2788b6c9c5d","MappedDirectories":{"HostPath":"c:\windows\temp\fwas\mycontainerfuncapp",“ContainerPath”:“c:\f2788b6c9c5d”,"ReadOnly":false,"BandwidthMaximum":0,"IOPSMaximum":0,"CreateInUtilityVM":false},"HvPartition":true,Azure "HvRuntime":{"ImagePath":"C:\Program Files\Azure Functions Runtime\docker\windows\windowsfilter\545c1be2ad30f1933a07de48e4ffe611900bacafbf4b717de969b56fb8a725d6\UtilityVM"},"AllowUnqualifiedDNSQuery":true}。

2018.3.14- 5:41:51 PM myteslaVM向容器下发停止命令: MyContainerFuncApp_

代码语言:javascript
复制
    03/14/2018 5:41:52 PM [myteslaVM] Error response from daemon: Cannot kill container: MyContainerFuncApp_0: No such container: MyContainerFuncApp_03/14/2018 5:41:52 PM [myteslaVM] Stop complete for container: MyContainerFuncApp_03/14/2018 5:41:52 PM [myteslaVM] ExecuteCommand called with C:\Program Files\Azure Functions Runtime\docker\docker.exe returned 125.3/14/2018 5:42:03 PM [myteslaVM]

    Function App 'MyContainerFuncApp' is starting...3/14/2018 5:42:04 PM [myteslaVM] Pull container image azfuncrun/azure-functions-runtime:preview2-latest-nanoserver3/14/2018 5:42:06 PM [myteslaVM] preview2-latest-nanoserver: Pulling from azfuncrun/azure-functions-runtime3/14/2018 5:42:06 PM [myteslaVM] Digest: sha256:dfdb47a7638d0cdd1a42c603e3e59311ee0d229222f88329a7c561fc3d8b2ff3

    3/14/2018 5:42:06 PM [myteslaVM] Status: Image is up to date for azfuncrun/azure-functions-runtime:preview2-latest-nanoserver3/14/2018 5:42:06 PM [myteslaVM] The container image azfuncrun/azure-functions-runtime:preview2-latest-nanoserver has been pulled successfully!3/14/2018 5:42:06 PM [myteslaVM] Provisioning container MyContainerFuncApp_13/14/2018 5:42:07 PM [myteslaVM] 10dfbab15acef64780c34d5d01ded776a10d074500b33ba916b032920404d1d13/14/2018 5:42:07 PM [myteslaVM] C:\Program Files\Azure Functions Runtime\docker\docker.exe: 
EN

回答 3

Stack Overflow用户

发布于 2018-05-17 00:33:10

对这个主题进行了更多的研究,我意识到它不适用于虚拟机的基本计划(SKU)。

仅适用于标准计划中的SKU。

适用于Windows Pro和Windows Server 2016。

票数 1
EN

Stack Overflow用户

发布于 2018-04-03 22:29:48

在一些研究之后,我做了下一步来尝试解决这个错误。

1. 1.Windows 2016配置

https://app.pluralsight.com/player?course=installing-windows-server-2016&author=greg-shields&name=installing-windows-server-2016-m2&clip=5&mode=live

代码语言:javascript
复制
--Install Features and Roles.

2.安装Hyper-V

代码语言:javascript
复制
https://docs.microsoft.com/en-us/windows-server/virtualization/hyper-v/get-started/install-the-hyper-v-role-on-windows-server

To check Hyper-V installed, run this cmd let in Power Shell.
Get-WindowsFeature -ComputerName <computer_name>  

Get-WindowsFeature -ComputerName MyteslaVM

To Install Hyper-V
Add-WindowsFeature –name RSAT-Hyper-V-Tools

    https://social.technet.microsoft.com/Forums/windows/en-US/f750d5e3-69f8-4cbd-a7aa-98e2fd41c618/need-to-install-hyperv-management-tools-on-server-2012-vm?forum=winserverhyperv

3.执行Docker版本。

4.执行Dockerd守护进程。

代码语言:javascript
复制
https://www.bountysource.com/issues/40602674-can-t-start-docker-service-on-windows-server-vm
dockerd --debug

Stop-service docker
Get-ContainerNetwork | Remove-ContainerNetwork -Force
Start-service docker

  1. Get-VM | Set-VMProcessor -ExposeVirtualizationExtensions $true

代码语言:javascript
复制
https://github.com/Azure/Azure-Functions/issues/359

6.安装Docker

代码语言:javascript
复制
https://docs.microsoft.com/en-us/virtualization/windowscontainers/quick-start/quick-start-windows-server

Install-Module -Name DockerMsftProvider -RequiredVersion 1.0.0.3
Install-Module -Name DockerMsftProvider -Repository PSGallery -Force
Install-Package -Name docker -ProviderName DockerMsftProvider

7.安装最新的azure-functions core-tools:

代码语言:javascript
复制
npm i -g azure-functions-core-tools@core

 Run npm i -g npm           **to update

  1. 安装.NET核心2.0

https://www.microsoft.com/net/download/windows

9.要启用嵌套虚拟化,您需要在Hyper-V主机中运行以下cmdlet:

代码语言:javascript
复制
Get-VM | Set-VMProcessor -ExposeVirtualizationExtensions $true

10.运行脚本

代码语言:javascript
复制
https://github.com/moby/moby/issues/19685

11.下载azure-函数-运行时:2.0.0-nanoserver

代码语言:javascript
复制
docker pull microsoft/azure-functions-runtime:2.0.0-nanoserver-1709

12.其中一个Hyper-V组件未运行

https://social.technet.microsoft.com/Forums/en-US/b4d0761d-6048-4cb8-9a1f-1a2544b4ceb2/one-of-the-hyperv-components-is-not-running?forum=win10itprovirt

13.禁用Windows defender。

https://www.windowscentral.com/how-permanently-disable-windows-defender-windows-10

票数 0
EN

Stack Overflow用户

发布于 2018-05-04 02:32:21

似乎Azuer函数运行时组件不适用于Windows Server 2016,因为容器。

我在一台装有Windows 10专业版的新虚拟机上试用了一下。现在它正在发挥作用。步骤:

具有Windows 10 Pro

  • Install/enable Hyper-V

  • Install和配置组件的
  1. 创建虚拟机。

see image for Azure Function Running

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/49285253

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档