Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> ระบบ >> Windows 10

วิธีติดตั้ง VMWare ESXi ใน Hyper-V Virtual Machine

ผมต้องการติดตั้ง VMWare ESXi ใน Hyper-V Virtual Machine ที่รันบน Windows 10 สำหรับ Homelab Stand ของผม Hyper-V และ VMWare ESXi รองรับ Nested Virtualization ดังนั้น Scenario นี้จึงเป็นไปได้ (แม้จะไม่ได้รับการ Support อย่างเป็นทางการ) อย่างไรก็ตาม มีบาง Aspects ของ ESXi Installation บน Hyper-V ที่ควรทราบ

ปัญหา Network Adapter Driver

ไม่มี Drivers สำหรับ Hyper-V Virtual Network Adapters ใน ESXi Image และ NIC นี้ไม่ได้รับการ Support โดย VMware (ไม่ได้รวมอยู่ใน VMware Hardware Compatibility List — HCL) ดังนั้น ก่อน Install VMWare ESXi บน Virtual Machine คุณต้อง Slipstream Driver สำหรับ Hyper-V Network Adapter (net-tulip) เข้าไปใน ESXi Installation Image

Net-tulip เป็น Community DECchip 21140 Ethernet Driver เพื่อรัน ESXi เป็น VM บน Microsoft Hyper-V รองรับ ESXi Versions ทั้งหมดจนถึง ESXi 6.5

หาก ESXi Installer ไม่พบ Network Adapters มันจะคืน Error ต่อไปนี้และป้องกันไม่ให้คุณดำเนินการติดตั้งต่อ:

No Network Adapters. No network adapters were detected. Either no network adapters are physically connected to the system, or a suitable driver could not be located. A third-party driver may be required.

วิธีติดตั้ง VMWare ESXi ใน Hyper-V Virtual Machine

การเพิ่ม net-tulip Driver เข้า ESXi Image

ติดตั้ง VMWare PowerCLI Module บนคอมพิวเตอร์ของคุณ

คุณสามารถเพิ่ม net-tulip เข้า Image โดยใช้ PowerShell Cmdlets จาก VMware.ImageBuilder Module (Add-EsxSoftwareDepot, Add-EsxSoftwarePackage, Export-EsxImageProfile) ในกรณีนี้ คุณจะต้อง Download ESXi Image และ net-tulip Driver ด้วยตนเอง (https://vibsdepot.v-front.de/depot/bundles/net-tulip-1.1.15-1-offline_bundle.zip)

วิธีที่ง่ายที่สุดคือใช้ ESXi-Customizer-PS Module สำเร็จรูป (เราเคยอธิบายในบทความวิธี Inject Drivers เข้า ESXi Image)

คุณสามารถ Download Latest Version ของ ESXi-Customizer-PS 2.8.1 Module จาก GitHub (https://github.com/VFrontDe/ESXi-Customizer-PS/blob/master/ESXi-Customizer-PS.ps1) Script Version นี้รองรับ VMWare ESXi 7.0 และ 6.7 ปัจจุบัน

แสดงรายการ ESXi Versions ที่พร้อม Download:

.\ESXi-Customizer-PS-v2.8.1.ps1 -sip –ozip

ในกรณีของเรา Download Image หมายเลข 203 (ESXi-6.0.0-20170604001-standard) ใส่ 203 และกด Enter

วิธีติดตั้ง VMWare ESXi ใน Hyper-V Virtual Machine

น่าเสียดายที่ผมไม่สามารถรัน Latest Versions ของ VMWare ESXi 7.0 และ 6.5 ใน Hyper-V ได้ ทุก Current Versions ของ ESXi Block Legacy Hyper-V Virtual Network Adapter ไม่ให้ Load Highest ESXi Version ที่ Boot ถูกต้องกับ Net-tulip Driver คือ ESXi-6.0.0-20170604001 Build 5572656 儘管 ESXi-Customizer-PS 2.8.1 อนุญาตให้ทำงานกับ ESXi 7.0 Image และ Integrate Net-tulip Network Driver เข้าไป Installer ไม่ Load Driver และไม่เห็น Hyper-V Virtual Network Adapter

รอจน Script Download ZIP File พร้อม ESXi Image ไปยัง Current Directory

เพื่อ Integrate net-tulip เข้า ZIP Image และได้ ISO Image ให้รันคำสั่งด้านล่าง:

.\ESXi-Customizer-PS-v2.8.1.ps1 -iZip "C:\Ps\ESXi-6.0.0-20170604001-standard.zip" -vft -load net-tulip

This is ESXi-Customizer-PS Version 2.8.1 (visit https://ESXi-Customizer-PS.v-front.de for more information!) (Call with -help for instructions) Logging to C:\Users\user\AppData\Local\Temp\ESXi-Customizer-PS-15076.log ... Running with PowerShell version 5.1 and VMware PowerCLI version .. build Adding base Offline bundle C:\Ps\ESXi-6.0.0-20170604001-standard.zip ... [OK] Connecting the V-Front Online depot ... [OK] Getting Imageprofiles, please wait ... [OK] Using Imageprofile ESXi-6.0.0-20170604001-standard ... (Dated 02/07/2020 11:36:33, AcceptanceLevel: PartnerSupported, For more information, see https://kb.vmware.com/kb/2149958.) Load additional VIBs from Online depots ... Add VIB net-tulip 1.1.15-1 [New AcceptanceLevel: CommunitySupported] [OK, added] Exporting the Imageprofile to 'C:\PS\ESXi-6.0.0-20170604001-standard-customized.iso'. Please be patient ... All done.

วิธีติดตั้ง VMWare ESXi ใน Hyper-V Virtual Machine

ตัวเลือก -vft หมายถึง Latest VIB Driver ต้อง Download จาก V-Front Online Repository

ตอนนี้คุณมี ESXi ISO Installation Image แล้ว จากนั้นสร้าง Virtual Machine ใหม่บน Hyper-V Host ของคุณ ใช้ Settings ต่อไปนี้สำหรับ Hyper-V VM:

  • สร้าง VM Generation 1;
    วิธีติดตั้ง VMWare ESXi ใน Hyper-V Virtual Machine
  • เพิ่มอย่างน้อย 2 vCPUs สำหรับ VM ของคุณ;
  • ลบ Default Network Adapter ใน VM Properties และเพิ่ม Legacy Network Adapter ใหม่;
    วิธีติดตั้ง VMWare ESXi ใน Hyper-V Virtual Machine
  • อนุญาตให้ใช้ Nested Virtualization Feature สำหรับ VM: Set-VMProcessor -VMName test-esxi1 -ExposeVirtualizationExtensions $true
  • Mount ESXi ISO Image ของคุณไปยัง VM

หากคุณพยายาม Boot Virtual Machine จาก ESXi Install Image ของคุณ จะเกิด Error ว่า Video Adapter ไม่เข้ากันได้กับ VMkernel:

Shutting down firmware services… Relocating modules and starting up the kernel…

วิธีติดตั้ง VMWare ESXi ใน Hyper-V Virtual Machine

เพื่อข้ามปัญหาและดำเนินการติดตั้ง ESXi ต่อ ให้กด TAB ตอน Boot VM และเพิ่ม Option ต่อไปนี้:

ignoreHeadless=TRUE

วิธีติดตั้ง VMWare ESXi ใน Hyper-V Virtual Machine

ESXi Installer จะตรวจสอบ Hardware Configuration Detect Network Card และเสนอให้ดำเนินการติดตั้ง ESXi Image บน Virtual Disk ต่อ

วิธีติดตั้ง VMWare ESXi ใน Hyper-V Virtual Machine

จากนั้นทำตาม Prompts ของ VMWare ESXi Installation Wizard (Steps อธิบายรายละเอียดในบทความ How to Install and Configure VMWare Hypervisor?)

หลัง Installation จบ ให้ Restart VM และกด Shift+O เมื่อเลือก ESXi Boot Options ระบุว่า ESXi ต้อง Boot โดยไม่มี Videocard Check ต่อไปนี้ ให้ Type ignoreHeadless=TRUE ท้ายบรรทัดและกด Enter

วิธีติดตั้ง VMWare ESXi ใน Hyper-V Virtual Machine

เพื่อไม่ให้ต้องทำทุกครั้งที่ Boot VM ให้เปลี่ยน ESXi Configuration:

  1. หลัง Boot ESXi แล้ว กด F2 และใส่ Root Password;
  2. เลือก Troubleshooting Options -> Enable ESXi Shell ใน DCUI ESXi;
    วิธีติดตั้ง VMWare ESXi ใน Hyper-V Virtual Machine
  3. เพื่อเปิด ESXi Console กด Alt+F2;
  4. รันคำสั่งต่อไปนี้ใน Console Prompt: Esxcfg-advcfg -k TRUE ignoreHeadless
    วิธีติดตั้ง VMWare ESXi ใน Hyper-V Virtual Machine

ปิด Console โดยกด ALT+F2 จากนั้นกำหนด Network Settings สำหรับ ESXi Host ใน DCUI และ Restart VM ตรวจสอบว่า ESXi สามารถ Boot ถูกต้องและคุณสามารถเชื่อมต่อมันได้โดยใช้ vSphere Web Client

วิธีติดตั้ง VMWare ESXi ใน Hyper-V Virtual Machine

ดังนั้น เราได้แสดงวิธีรัน ESXi ใน Hyper-V Virtual Machine แล้ว อย่างไรก็ตาม Configuration นี้ไม่ได้รับ Support อย่างเป็นทางการ แต่จะช่วยให้คุณทำงานกับ Earlier VMWare ESXi Versions ใน Sandbox บน Home Computer ที่รัน Windows 10 ได้