• 请不要在回答技术问题时复制粘贴 AI 生成的内容
Huelse
V2EX  ›  程序员

Docker Desktop 与 VMware 不能共存,晕

  •  
  •   Huelse · Apr 10, 2020 · 10056 views
    This topic created in 2407 days ago, the information mentioned may be changed or developed.

    昨天下了最新的 Docker Desktop,其使用 Hyper-V 作为主机了,使用感觉良好,除了部分小问题

    然而今天照常打开 VMware 时,突然出现了VMware Workstation 与 Device/Credential Guard 不兼容,吓我一跳

    网上找了一圈后就确认了一个命令可以解决问题 bcdedit /set hypervisorlaunchtype auto/off

    管理员 powershell 下运行,重启生效,off 只有 VMware 能运行,auto 只有 Docker 能运行

    真是无奈,请问有解决方案吗?

    30 replies  •  2020-04-11 19:24:45 +08:00
    acrisliu
    acrisliu
    Apr 10, 2020
    1
    VWware 是最新版吗?我记得新版本可以和 Hyper-V 共存的。
    yulihao
    yulihao
    Apr 10, 2020
    2
    @acrisliu 最新版好像还在 beta ?不是特别清楚
    Huelse
    Huelse
    OP
    Apr 10, 2020
    3
    @yulihao #2
    @acrisliu #1
    我现在用的是 15.5.1 build-15018445
    hantsy
    hantsy
    Apr 10, 2020
    4
    最近我也切换到了 Hyper+Docker Desktop,体验好了很多,Mount 映射好像支持得 DockerToolbox 好。之前一直坚持用几年 Docker Toolbox (也就是 Dokcer for VirtualBox ),但这货更新越来越慢了。很大一部分原因我不想用 Hyper,是因为支持得没 Vitualbox 广泛,毕竟还要玩其它的,比如 Vagrant (很多 Boxes 没有 HyperV 格式),Minikube (现在也支持 Hyper V )。

    VirtualBox 也一样的问题,VB6 也宣称支持 Hyper-V,但我试了运行两个现成的 Image,改成 Hyper V 都出错。

    bcdedit /set hypervisorlaunchtype auto/off 这个只是启用与禁用 Hyper 吧?
    lithiumii
    lithiumii
    Apr 10, 2020 via Android
    5
    或者不要用 Docker for Windows,用 wsl2,然后在里面装 Docker
    Huelse
    Huelse
    OP
    Apr 10, 2020
    6
    @hantsy #4 字面上是这个意思,具体我也没深究,但要两个切换用的话,确实用这个命令就够了,连 windows 功能里面的设置都不用改
    Huelse
    Huelse
    OP
    Apr 10, 2020
    7
    @lithiumii #5 有空试试,主要是 C 盘空间不够了
    hantsy
    hantsy
    Apr 10, 2020
    8
    @lithiumii Docker Desktop, Docker for Windows 是一个东西,一直在改名。最新的 2.2.3.0 默认推荐 WSL2,目前感觉还好。不错,Docker 在 Windows 下真的各种问题。
    xwcs
    xwcs
    Apr 10, 2020
    9
    @Huelse VMware16 好像可以了
    xcstream
    xcstream
    Apr 10, 2020
    10
    我选择在 vmware 装 linux 里装 docker 这样就只有一个虚拟机了
    fuis
    fuis
    Apr 10, 2020
    11
    最新版 VMware 可以跟 Hyper-V 共存,但是不能打开嵌套虚拟化。
    Huelse
    Huelse
    OP
    Apr 10, 2020
    12
    好的,谢谢各位的回复,直接上车 wsl2~

    @hantsy #8
    @xwcs #9
    @xcstream #10
    @fuis #11
    @lithiumii #5
    @yulihao #2
    @acrisliu #1
    acrisliu
    acrisliu
    Apr 10, 2020❤️1
    13
    @Huelse #12 我现在就是 WSL2 + Docker for Windows,挺好用的,不过目前不兼容 Intel HAXM,如果你开发 Android 的话要谨慎,补图:
    boboliu
    boboliu
    Apr 10, 2020
    14
    目前可用 20H1 预览版(没错就是这个和巨硬学坏的版本号) bitly/getworkstation-tp

    在我这边有声音转发会导致卡死的问题
    canadahetian
    canadahetian
    Apr 10, 2020
    15
    我上次安装都不成功,所以放弃了
    HuHui
    HuHui
    Apr 11, 2020 via Android
    16
    建议虚拟机内装,少折腾
    kanepan19
    kanepan19
    Apr 11, 2020
    17
    就是因为这个,现在 Docker 都装到 虚拟机里去了
    jedihy
    jedihy
    Apr 11, 2020
    18
    VMWare 不用 Hyper-V 做后端的话好像不能和 Hyper-V 共存。
    kennylam777
    kennylam777
    Apr 11, 2020
    19
    @acrisliu 早兩年才有 HAXM 問題, 上年開始 Android emulator 都可以和 Hyper-v 共存了

    官方寫的是新版 VirtualBox 及 VMWare 都能共存
    https://docs.microsoft.com/en-us/windows/wsl/wsl2-faq
    kennylam777
    kennylam777
    Apr 11, 2020
    20
    WSL 2+ Docker 真的香, 因為網絡介面都是原生 Windows 的, 問題最少
    RangerWolf
    RangerWolf
    Apr 11, 2020
    21
    hyper-v 直接就可以装虚拟机了啊
    直接在 cortana 里面输入 hyper-v 就会出现 hyper-v 管理器
    然后直接安装 iso 就好了
    xyjincan
    xyjincan
    Apr 11, 2020
    22
    Hyper-V 是不是还是对 Intel 睿频有影响,低频用户感觉电脑有点卡好像,
    Vegetables
    Vegetables
    Apr 11, 2020
    23
    @Huelse vmware beta 和 win10 19401 以上的版本 能 共享
    darknoll
    darknoll
    Apr 11, 2020 via Android
    24
    win10 才 1909,没有 wsl2 咋办?
    xuanbg
    xuanbg
    Apr 11, 2020
    25
    都用 VM 了,还要什么 Docker Desktop……VM 装个 Linux 它不香吗?
    acrisliu
    acrisliu
    Apr 11, 2020
    26
    @kennylam777 #19 我这边是无论启用 Hyper-V 或者 WSL2,Intel HAXM 都会安装失败。官方文档里面也提到和 Hyper-V 、WSL2 等有冲突: https://github.com/intel/haxm/wiki/Installation-Instructions-on-Windows#tips-and-tricks 你那边有测试过吗?
    hantsy
    hantsy
    Apr 11, 2020
    27
    Android emulator 模拟器用 Hyper-V 没问题的。
    hantsy
    hantsy
    Apr 11, 2020
    28
    @xuanbg 开发不方便。
    baobao1270
    baobao1270
    Apr 11, 2020
    29
    本质上就是 M$ 强推自家 HV 虚拟化平台。
    感觉对于运维来说,可能 HV 更好吧。对于开发者,还是 VMWare 比较友好。总之我不用 HV 。
    建议:在 VMWare 里装 Linux,然后在这个 Linux 里装 Docker
    hejingyuan199
    hejingyuan199
    Apr 11, 2020
    30
    有同样的经历。
    我先是需要使用虚拟机,于是用的 hyper-v 。
    后来发现,VMware 和 VirtualBox 不能使用了。
    Laravel 需要的 VirtualBox 也不能用了。

    但是好处是,Docker 可以很好的和 Hyper-V 并存,因为他们是一个原理。
    我把 Laravel 放进 Docker 里了。

    不过我觉得 hyper-V 的虚拟机也挺好用的。就是设置网络有点复杂,被网络整疯过。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2401 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 104ms · UTC 12:44 · PVG 20:44 · LAX 04:44 · JFK 07:44
    ♥ Do have faith in what you're doing.