VMware nested guests 64bit VM 實作

星期六, 17th 十二月 2011

看網路上有關VMware目前可以做的nested VM, 心裡真的很癢, 也很想知道這樣子VM->VM->VM下去到底可以做到幾層.

所以開始進行測試

我目前想做的架構如下

第一層          第二層          第三層                     第四層
ESXI5          vESXI5          Win2k8 Hyper-V      單純在上面建x64的CentOS VM

Intel VT-x     nested 64     64bit 無半虛擬化

所以上面的想法無法在第四層建立任何OS, 因為hyper-v不支援全虛擬化

第一層          第二層          第三層                     第四層
ESXI5          vESXI5        vvESXI5                 單純在上面建32bit的CentOS VM

Intel VT-x    nested 64     64bit 全虛擬化         32bit

10.10.100.10 10.10.100.20 10.10.100.30      10.10.100.51

準備環境如下:
G6950 x1
16G ECC RAM
300G HDD

第一層設定

  1. 安裝ESXI5
  2. Configure a vSwitch and/or Port Group to have Promiscuous Mode enabled
  3. Create a second Port Group named “Trunk” with VLAN ID All (4095) if you want to use VLANs on virtual hypervisors
  4. Log in to Tech Support Mode (iLO or ssh) and make the following tweak to enable nested 64-bit guests
    									echo 'vhv.allow = "TRUE"' >> /etc/vmware/config
    	
  5. 	Vsphere 5.1以後改成vhv.enable = "true"
    	
  6. 							這樣設定完後第二層就會是用nested guest執行	
    	
第二層設定
  1. 創建一個Guest OS: Linux / Red Hat Enterprise Linux 5 (64-bit)的VM
  2. 創建完後選edit, 將作業系統的部份改為other , ESXI5
    CPU/MMU Virtualization: Use Intel VT … EPT… ( bottom radio button)
  3. 安裝vESXI5 
  4. 這樣裝完這個vESXI5還可以安裝64bit的作業系統

第三層設定

  1. 比照第二層這樣建立一個vvESXI5, 不過 cpu的部份不用改virtualzation, 因為這一層做完後下面的VM會走全虛擬化
  2. vvESXI5裝完後即可再下面建立第四層的32bit全虛擬化作業系統
http://www.vcritical.com/2011/07/vmware-vsphere-can-virtualize-itself/#comment-12442
http://www.virtuallyghetto.com/2011/07/how-to-enable-support-for-nested-64bit.html 
http://tw.myblog.yahoo.com/max6886/article?mid=206
 

Nesting "Other" Hypervisors


For those of you who feel inclined to run other hypervisors such as Hyper-V, you can do so with latest release of ESXi 5.1. The process if very straight forward just like running nested ESXi host.

Step 1 - Create a Virtual Hardware 9 VM and select the appropriate guestOS. In this example, I selected Windows Server 2012 (64-bit) as the guestOS version.

Step 2 - Enable VHV under the CPU section if you wish to create and run nested 64-bit VMs under Hyper-V

Step 3 - You will need to add one additional .vmx parameter which tells the underlying guestOS (Hyper-V) that it is not running as a virtual guest which in fact it really is. The parameter is hypervisor.cpuid.v0 = FALSE