You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows10 Pro+Hyper-V环境Docker Machine创建启动报错求助

Fixing "exit status 1" Error with docker-machine + Hyper-V on Windows 10 Pro

Hey there! I know it’s frustrating getting stuck right at the start with Docker—let’s work through this docker-machine create error step by step. The "exit status 1" error with Hyper-V usually boils down to network configuration issues or missing permissions, so we’ll cover all the bases clearly.

Step 1: Verify Hyper-V Virtual Switch Setup

Hyper-V needs a properly configured virtual switch for docker-machine to spin up a working VM. Here’s how to check and set it up:

  • Open Hyper-V Manager (search for it directly in the Windows Start Menu)
  • Click Virtual Switch Manager on the right-hand sidebar
  • Ensure you have an External virtual switch (internal/private switches won’t work for docker-machine):
    • If you don’t have one, click Create Virtual Switch, select External, name it something like DockerSwitch, and choose your physical network adapter. Check the box that says "Allow management operating system to share this network adapter"
    • Double-check the switch name—you’ll need to use it exactly as-is later.

Step 2: Create the Machine with the Correct Hyper-V Switch

The most common fix is explicitly telling docker-machine which virtual switch to use. Open an Administrator PowerShell/Command Prompt (right-click Start → choose "Windows PowerShell (Admin)") and run this command:

docker-machine create --driver hyperv --hyper-v-virtual-switch "DockerSwitch" default

Replace "DockerSwitch" with the exact name of your external virtual switch from Step 1.

Step 3: Clean Up Failed Previous Attempts

If you tried creating the machine before and it failed, leftover broken configurations might be causing issues. Delete the faulty machine first:

docker-machine rm default

Then re-run the create command from Step 2.

Step 4: Check Docker Service Status

Make sure the Docker Desktop service is running properly:

  • Right-click the Start Menu → open Task Manager
  • Go to the Services tab
  • Find Docker Desktop Service and confirm its status is Running. If not, right-click it and select "Start".

Step 5: Verify the Machine Works

Once the create command finishes without errors, check the machine’s status:

docker-machine ls

You should see default listed with a status of Running. To start using this machine, activate its environment variables:

docker-machine env default

Follow the output’s instructions—for PowerShell, that’ll be running:

& docker-machine env default | Invoke-Expression

Now you can test with a basic command like docker run hello-world to confirm everything works.

Bonus: Consider Upgrading Docker

Your Docker version (18.03.1-ce) is quite outdated. Newer versions of Docker Desktop have better Hyper-V integration and fewer bugs. If the steps above don’t resolve the issue, upgrading to the latest stable version might help simplify things.

内容的提问来源于stack exchange,提问作者sets911

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.26 11:01:34