LoginSignup
3
1

More than 5 years have passed since last update.

Installation How to: Nested ESXi on KVM

Posted at

Installation How to: Nested ESXi on KVM

目的

  • ESXi のテストを仮想環境で

システム

  • Ubuntu 14.04.3 LTS
  • qemu-kvm 2.0.0
  • libvirt 1.2.2

手順

1. 空き VNC ポート調べ

$ for i in `virsh -c qemu:///system list --all | awk '{print $2}' | grep -v Name` ; do virsh dumpxml $i|grep vnc  ; done | sort
output_sample
    <graphics type='vnc' port='5926' autoport='no' listen='0.0.0.0'>
    <graphics type='vnc' port='5927' autoport='no' listen='0.0.0.0'>
    <graphics type='vnc' port='5928' autoport='no' listen='0.0.0.0'>

2. VNC ポートアサイン

$ VNCPORT='5929'

3. VM 名の決定と Disk 作成

$ VMNAME='esxi6.5-test01'
qemu-img create -f qcow2 -o preallocation=metadata $VMNAME.qcow2 20G

4. メモリアサイン

$ RAM='4096'

5. iso ファイル名、OS タイプ指定

$ ISOFILE='/pathto/VMware-VMvisor-Installer-201701001-4887370.x86_64.iso'
$ OSTYPE='linux'

6. VM インストール

$ virt-install --connect qemu:///system \
-n $VMNAME -r $RAM \
--vcpus=sockets=1,cores=2,threads=2 \
--cpu host --disk path=./$VMNAME.qcow2 \
-c $ISOFILE --os-type $OSTYPE \
--accelerate --network=bridge:br0,model=e1000 \
--hvm --graphics vnc,port=$VNCPORT,listen=0.0.0.0

7. VNC クライアントで KVM ホストの $VNCPORT に接続

Screenshot 2017-02-23 03.30.41.png

Screenshot 2017-02-23 03.35.54.png

8. あとは通常の ESXi 同様にインストーラを進めて下さい

9. おわり

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1