2021年9月3日 星期五

[hypervisor, main] The Docker, KVM, Vagrant, VirtualBox, VMWare, Hyper-V FAQ

The Docker, KVM, Vagrant, VirtualBox, VMWare, Hyper-V FAQ

井民全, Jing, mqjing@gmail.com



The Public FAQ Index (view)



Table of contents

1. Container 2

1.1. Docker 2

1.2. Furthering Reading 7

2. KVM 8

2.1. VM 8

2.2. Network 9

2.3. Disk I/O 9

2.4. Questions 9

2.5. References 10

3. Vagrant 10

3.1. VM 10

3.2. Network 10

3.3. Disk 11

3.4. Provision 11

3.5. Error Handling 11

4. VirtualBox 11

4.1. VM 13

4.2. VirtualBox Remote Desktop 13

4.3. Device 14

4.4. Storage and File I/O 16

4.5. Network 16

4.6. VM 16

4.7. Misc 18

5. VMWare 18

5.1. VMPlayer 18

5.2. vSphere Client 19

5.3. ESXi 19

5.4. vCenter 20

5.5. VSAN 21

5.6. I/O 21

5.7. Misc 21

6. VMWare Cli 22

6.1. ESXCLI 22

6.2. PowerCLI 22

6.2.1. VM 23

6.2.2. Storage 23

6.2.3. Snapshot 23

6.2.4. Network 23

6.2.5. Misc 24

7. Mesos 24

8. Hyper-V 24


1. Container

1.1. Docker

  1. [docker, doc, officia] Official Document (ref)

  2. [docker, install] How to install docker (view)

  3. [docker, gpu, install] How to install and use NVIDIA docker on Ubuntu (view)

  4. [docker, proxy] How to setup docker proxy (view)

  5. [docker, list] See the docker status -- sudo docker ps -a (not sudo docker ps -la) 

  6. [docker, exec] How to exec command in a container -- sudo docker exec -i -t {CONTAINER-NAME} /bin/bash (view)

  7. [package, install] How to install package in the Docker env.

    1. The environment of docker would runs as an another user who has no permission to install any package. In order to install packages, you should change the user by -u command.

    2. apt-get

sudo docker ps

# step 1: run your container as root

sudo docker exec -it -u root 0b949b34b498 bash


# step 2: apt-get install ${tool-name}

apt-get install vim

  1. pip3

sudo docker ps

# step 1: run your container as root

sudo docker exec -it -u root 0b949b34b498 bash


# step 2: apt-get install ${tool-name}

pip3 install wfdb

  1. [docker, exec, debug] How to debug your program in the Docker env.


sudo docker ps

sudo docker exec -it ${container-id} bash

  1.  

  1. [docker, without sudo] How to run docker without sudo (ref)


sudo usermod -aG docker $USER


1. Add the docker group if it doesn't already exist

$ sudo groupadd docker


2. Add the connected user $USER to the docker group

Optionally change the username to match your preferred user.

$ sudo gpasswd -a $USER docker


3. Restart the docker daemon

$ sudo service docker restart


If you are on Ubuntu 14.04-15.10, use docker.io instead:

$ sudo service docker.io restart



  1. [run, user, permission] How to run a docker with specified host user group


Why?

讓你可以存取 從 host 透過 -v 指令 mount 上來的 volume, 如果該 volume 在 host 上只有特定 group 可以存取


Scenario

# 假定 host 上的 home2 volumne 只允許目前使用者 $USER 的 group id 可以存取. 因此, 要讓在 container 裡面的程序能夠順利存取 /home2, 只要使用 -u special_uid:special_gid 參數即可.


指令:

sudo docker run -u :`id -g $USER` -p 8080:8080 -p 50000:50000 -v /home2:/home2 $my_docker_image



直接讓 docker 執行身份的 gid 變成 該 volume 相同的 group id 即可.

Ex:

在 host 機器上, home2 的 group id 是 1007. 那直接指定 docker 執行身份 gid = 1007.


/usr/bin/docker run \

          --name jenkins-server \

          --user jenkins:1007 \

          --publish 8080:8080 \

          --publish 50000:50000 \

          --volume /var/jenkins:/var/jenkins_home \

          --volume /home2:/home2 \

          jenkins-python3-v3




  1. [run, serivce, user] How to run the process as a system service using a speicifed user? (view)


#建立 Ubuntu service

sudo vim /etc/systemd/system/jenkins-docker.service



資料庫: 可能設定為 algo group (gid=1007) 才可以存取, 

所以使用 --user 指令: 讓 docker 執行身份的 gid =  1007, 

就可以存取掛載上來的資料庫


== 關鍵片段 ==

ExecStart=/usr/bin/docker run \

          --name jenkins-server \

          --user jenkins:1007 \

          --publish 8080:8080 \

          --publish 50000:50000 \

          --volume /var/jenkins:/var/jenkins_home \

          --volume /home2:/home2 \

          jenkins-python3-v3"



  1. [volume, multi] bind more than one folder

    1. Use the option volume again

/usr/bin/docker run \

          --name jenkins-server \

          --publish 8080:8080 \

          --publish 50000:50000 \

          --volume /var/jenkins:/var/jenkins_home 

          --volume /home2:/home2\

          jenkins-python3-v3



  1. [start & attach] How to start and attached a container -- sudo docker start [name]; sudo docker attach [name]

  2. [container, rm] How to remove a container -- sudo docker stop {id} && sudo docker rm {id} (ref)

  3. [docker, images, list] How to list docker images (view

  4. [docker, images, rm] How to remove a docker image -- sudo docker rmi {image-id}


sudo docker rmi {image-id}



  1. [docker, image, build, dockerfile] How to use Dockerfile to automatic set up your environment (view)


Step 1: Create a Dockerfile


FROM phusion/baseimage:0.9.11

RUN mkdir /usr/src/app

WORKDIR /usr/src/app

RUN apt-get update -y

RUN apt-get install -y git

RUN apt-get install -y nodejs

RUN apt-get install -y npm


Step 2: Build the image

docker build -t {Your-Repository}/{Your-Tag}:{This-Image-Version} .

Ex:

sudo docker build -t jing/my-react-env:0.0.1 .


Step 3: Run

sudo docker exec -it -u root {image-id} bash


  1. [docker, image, save/load] How to save/load the docker image  (ref)


docker save <dockernameortag> | gzip > mycontainer.tgz


gunzip -c mycontainer.tgz | docker load


  1. [docker, image, phusion/baseimage] How to use phusion/baseimage in your dev (view)

  2. [docker, network, host dhcp] How to let your container on host subnet (view)

  3. [network, subnet] How to setup a subnet for your container with docker (view)

  4. [network, host network] How to setup your container using host network -- --net=host (ref)

  5. [todo, docker, change cpu freq]

  6. [restart policy, auto-start] How to auto start your service when the service in a container -- --restart=always (view)

  7. [docker and vagrant] How to use docker provider in vagrant (view) (ref

    1. vagrant up db --provider=docker

    2. vagrant docker-logs db

    3. vagrant status

    4. vagrant up app --provider=docker

    5. vagrant destroy --force

  8. [docker, dnsmasq] Install dnsmasq in docker (view)

  9. [docker-machine, install] How to install docker-machine (view)

  10. [docker-machine, ssh] How to ssh to a docker-machine (view)

  11. [docker-machine, scp] How to copy file/folder to your docker-machine (view)

  12. [docker-compose, install] How to install docker-compose (view)

  13. [docker-compose, web app] How to use docker-compose, a web app example (view)

  14. [container, kill] How to kill a running container?


sudo docker ps

sudo docker kill ${container-id}


  1. [image, list] List installed Docker images from your system -- docker images (view)

  2. [image, save] How to save your container to file (view)

  3. [image, registry] How to setup Docker Registry (view)

  4. [log] How to see the logs for the service in the docker? -- sudo docker logs {container}

  5. [daemon, restart] How to restart your docker daemon? (view)

  6. [ceph, installation, docker, allinone] How to install ceph using Docker -- allinone (view)

  7. [ceph, installation, docker, 3 hosts] How to install ceph using Docker -- 3 hosts (view)

1.2. Furthering Reading

  1. Docker 及 Device Mapper分析 (ref)

  2. [docker, vnc] How to setup docker vnc: https://github.com/fcwu/docker-ubuntu-vnc-desktop

  3. [boot2docker] Boot2Docker is a lightweight Linux distribution made specifically to run Docker containers. It runs completely from RAM, is a small ~24MB download and boots in ~5s (YMMV).

  4. [todo, docker and kubernetes]

2. KVM

用 virt-manager 啟動的 VM 可以出去, 也可以 ssh host <-> guest 

  1. bios: Enable Intel Virtual Technology TRUE

  2. [vmware, nested kvm] Install KVM under vmplayer (view)

  3. [qemu, windows, software] Qemu for Windows (view)

  4. [qemu, windows, basic] Create, Install and Boot System using Qemu, Windows Qemu Manager 7.0 (view)

2.1. VM

  1. [qemu, create] How to create a base image and install Ubuntu 12.04 Server (view)

    1. [qemu, create] How to install Ubuntu server on KVM (view)

  2. [qemu, virtualbox, create] Create a QEMU/KVM VM from a virtualbox vdi image (view)

  3. [qemu, image] How to create a copy-on-write image from a template (view)

  4. [qemu, run] Run your VM from qemu with host forwarding (view)

  5. [libvirt, install] How to install libvirt (ref)


sudo apt-get install qemu-kvm libvirt-bin bridge-utils ubuntu-vm-builder virt-manager virt-viewer -ysudo apt-get install qemu-kvm libvirt-bin bridge-utils ubuntu-vm-builder virt-manager virt-viewer -y


  1. [libvirt, live migration] How to migrate your VM in live -- virsh (view)

  2. [libvirt, image import] How to import a qcow2 to virtual image storage pool  (virt-manager:: view) (virt-install:: view)

  3. [libvirt, create] How to create your virtual machines from iso -- virt-manager (view)

  4. [libvirt, import vm] How to import a VM to your virt-manager -- virt-manager (view)

  5. [vmbuilder, create vm] Create a new virtual machine using vmbuilder -- 直接建立 user, passwd (view)

  6. [libvirt, list] How to list the VM -- virsh -list  (view)

  7. [libvirt, live migration] How to migrate your VM in live (view)

  8. [libvirt, internal snapshot] How to do the internal snapshot for your VM (view)

  9. [libvirt, snapshot restore] How to restore your VM from a snapshot -- virsh snapshot-revert (view)

  10. [libvirt, snapshot delete] How to delete your VM snapshot -- virsh snapshot-delete (view)

  11. [libvirt] How to manage your virtual machines -- virsh (view) -- draft

    1. Live snapshot (live disk mirror, live block operation)


2.2. Network

  1. [qemu, user networking] How to setup the user networking mode for your KVM (view)

  2. [qemu, scp] How to transfer a file to your guest virtual machine (view)

  3. [qemu, image, compression] How to compress your qcow2 image -- qemu-img convert -c (view) -- draft

  4. [qemu, vnc] How to run qemu with vnc (view)

  5. [qemu, network, user/nat] How to setup the simple user network mode for your VM (view)

  6. [qemu, network, user/nat, host forward] How to enable the host forward option for your VM (view

  7. [qemu, network, user/nat, customized NAT] (more complexity: change guest ip, change host ip)

  8. [qemu, network, tap] How to connect your VM to a tap device (view)

  9. [qemu, network, tap, bridge, 1vm] How to connect single VM with a bridge using TUN/TAP model (view)

  10. [qemu, network, tap, bridge, 2vm] How to connect two VMs with a bridge using TUN/TAP model (view)

  11. [qemu, network, socket] How to connect your VM to a VLAN in socket mode (view) -- draft

  12. [qemu, network, multicast] How to use multicast (view) -- draft

  13. [libvirt, network, redirection] How to run your VM with port redirection (view)

  14. [libvirt, network] guest -> host and host -> guest -- virt-manager (view)

2.3. Disk I/O

  1. [libvirt, disk performance] How to evaluate the VM I/O (ref)

2.4. Questions

  1. boot VM from remote qcow2 image, how?

  2. access guest image disk, how? guestfish (ref)

2.5. References

  1. [ref] A lot of reference document from IBM (ref)

  2. [mac os, qemu] Run Mac OS X Yosemite (ref)


3. Vagrant

  1. [vagrant, lab: 2-node with 500G] os: ubuntu/trusty64, hd: 500G, ip: 192.168.50.10/11 (download)

  2. [box, searh box] searh the box -- https://atlas.hashicorp.com/search

  3. [box, crate box] How to create a vagrant box (view) (go)

  4. [box, list box] How to list your vagrant box -- vagrant box list (view)

  5. [box, add box] How to install a box for your vagrant -- vagrant box add <name> <filename>  (view)

  6. [box, copy box] How to copy your vagrant box -- just cp (view)

3.1. VM

  1. [vm, create vm] How to create your vm by vagrant -- vagrant init; vagrant up

  2. [vm, two vm] How to create two vms by vagrant (view)

  3. [vm , create vm] How to create vms using for loop (view)

  4. [vm, list vm] How to list your running vm -- vagrant status(view)

  5. [vm, destroy vm] How to destroy a VM -- vagrant status; vagrant destroy <vm>

  6. [vm, clean & restart] Clean & Restart a VM -- vagrant destroy;vagrant up

  7. [vm, hostname] How to setup hostname for your VM, vagrant (view)

  8. [vm, memory] How to setup memory for your VM, vagrant (view)

3.2. Network

  1. [network, bridge] How to setup a bridge device for your VM, vagrant (view)

  2. [network, private] How to setup a private network for your VM, vagrant (view)

  3. [network, nic] How to assign your vagrant network to specific network adapter (view)

3.3. Disk

  1. [disk, add new disk] How to add a new disk for your VM (view)

  2. [disk, multi config] How to create disk with random name (view)

3.4. Provision

  1. [provision, bash] How to use bash to provision your vm (view)

  2. [provision, bash, library file] How to use bash to provision your vm with library (view)

  3. [provision, puppet] The experimental environment as code by vagrant + puppet (view)

  4. [vagrant, show gui] How to show your vm in GUI -- vbox.gui = true (view)

  5. [vagrant, snapshot] How to enable vagrant snapshot (view)

  6. [vagrant, run script] How to run script from vagrant command -- vagrant ssh [your vm name] -- 'command 1;command2'

  7. [VagrantFile, pass parament] How to pass argument to your provision script in vagrant (view) (ref)

  8. [default password] What is the default username/password of vagrant? -- vagrant/vagrant

  9. [insecure key] How to keep using default insecurity key to your guest VM (view)

  10. [ssh, private key] How to use vagrant user' private key to login (view)

  11. [cli] How to run command in VM -- vagrant ssh {VM-NAME} -c "command"

  12. [add user] How to add deploy script with adding user (view)

3.5. Error Handling

  1. [error] A VirtualBox machine with the name 'ubuntu-xenial-16.04-cloudimg' already exists. (view)


4. VirtualBox

  1. [summary] The Quick Sheet (view)

  2. [upgrade] How to upgrade to VirtualBox-6.0 (ref)


  1. wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -

  2. wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -

  3. sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib" >> /etc/apt/sources.list.d/virtualbox.list'

  4. sudo apt remove virtualbox virtualbox-5.2

  5. sudo apt update

  6. sudo apt-get install virtualbox-6.0



  1. [install] How to install VirtaulBox (view)


"vi /etc/apt/sources.list

--

deb https://download.virtualbox.org/virtualbox/debian xenial contrib

--



wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -

wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -


sudo apt-get update

sudo apt-get install virtualbox-6.0"



  1. [install, ext package] How to install the extention package


"vboxmanage extpack install $tar-ball


ex:

sudo vboxmanage extpack install Oracle_VM_VirtualBox_Extension_Pack-6.0.8.vbox-extpack"



  1. [installation, Guest Additional] How to install VirtualBox Guest Additional Package (view) -- require gcc.

    • [virtualbox, guest additions] How to install Guest Additions from command line (view)


4.1. VM

  1. [vm, create] How to create a VM (view) (view2)

  2. [vm, remove] How to remove a VM


"== delete vm =="

vboxmanage list vms

vboxmanage storageattach win10-100g-01 --storagectl "SATA" --port 1 --medium none

vboxmanage unregistervm win10-100g-01 --delete

vboxmanage list vms


"== remove hdds =="

vboxmanage list hdds

vboxmanage closemedium disk $uuid --delete


  1. [vm, list How to list VM

    • vboxmanage list vms

  2. [vm, list running vm] How to list running vm

    • vboxmanage list running VMs (view)

  3. [vm uuid] How to get the vm uuid (view)

  4. [vm info] How to get vm information -- vboxmanage guestproperty enumerate <vm-name>

    • vboxmanage showvminfo $your_vm_name

  5. [network, ip] How to list running vm name and ip** (view)

  6. [network, add bridge nic] How to create VM with a bridge nic (view)

4.2. VirtualBox Remote Desktop

  1. [guide] A quick guide for creating a virtualbox remote desktop enabled VM


"== create vm ==""

scp ~/Documents/

vboxmanage import win10-bare-100g.ova

vboxmanage snapshot win10-bare-100g take win10-bare-100g-snapshot-01

vboxmanage clonevm win10-bare-100g --options link --snapshot win10-bare-100g-snapshot-01 --register --name win10-100g-01

vboxmanage modifyvm win10-100g-01 --vrde on # enable the RDP option

vboxmanage modifyvm win10-100g-01 --vrdeport 5000,5010-5020 # setup RDP port range


"== create hdd =="

cd ~/VirtualBox VMs/win10-bare-100g-01/

diskname="win10-100g-01-disk-01.vdi"

vboxmanage createmedium disk --filename $diskname --size 102400 --format VDI --variant Fixed # 100GB

vboxmanage storageattach win10-100g-01 --storagectl SATA --port 1 --type hdd --medium $diskname

vboxmanage startvm win10-100g-01 --type headless # start vm

vboxmanage showvminfo win10-100g-01 | grep VRDE # check vrde port

  1. [quide, remove] How to remove a VM that attachemtn a hdd


"== delete vm =="

vboxmanage list vms

vboxmanage storageattach win10-100g-01 --storagectl "SATA" --port 1 --medium none

vboxmanage unregistervm win10-100g-01 --delete

vboxmanage list vms


"== remove hdds =="

vboxmanage list hdds

vboxmanage closemedium disk $uuid --delete


  1. [vrdp, enable] How to enable a Virtualbox Remote Desktop function for a VM


vboxmanage modifyvm win10-guest-01 --vrde on

  1. [vrdp, port] How to setup a range of RDP port


vboxmanage modifyvm win10-guest-01 --vrdeport 5000,5010-5012

vboxmanage showvminfo win10-guest-01 | grep VRDE

  1. [vrdp, info] How to get the port number for a VRDE VM


vboxmanage showvminfo | grep VRDE

  1. [rdp, client] How to connect to a VRDE VM


remmina

192.168.21.32:5000



4.3. Device

  1. [vbox, usb] Enable USB device for your VirtualBox (view)


[Host] $sudo usermod -a -G vboxusers $USER

[Host] $logout



  1. [vbox, bluetooth] How to enable your Bluetooth device in your guest OS (host: Ubuntu, guest: Windows) (view)


Before do anything: 

         Make sure the host os can detect the Bluetooth device


VirtualBox Downloads

Step 1: Install VirtualBox Extension Pack in Host

Step 2: Install Guest Additions CD image in Guest and reboot

Step 3: Enable USB device for your VirtualBox

  • [Host] $sudo usermod -a -G vboxusers $USER

  • [Host] $logout


Now, Right click your USB Devices on VirtualBox (Not inside Windows 10, but on the VirtualBox bar below it) 

4.4. Storage and File I/O

  1. [file, share] Share folder to VirtualBox (view)

  2. [file, mount] automatically mount a VirtualBox shared folder for guest OS Ubuntu (view)

  3. [storage, extend partition] How to extend a VirtualBox partition (view


4.5. Network

  1. [network, nat porting] Configuring port forwarding with NAT (view)

  2. [network, host-only, dhcp] How to disable DHCP server in host-only mode (view)

  3. [network, network, nat] Setup NAT, Can two NAT VMs communication? -- no (view)

  4. [network, private, Host-only] 建立自己的 Private Host-Only Network, 使用自己建立的 Host-only 專用虛擬網卡  (view)

  5. [network, private, Bridge] 建立自己的 Private Bridge Network, 使用自己建立的虛擬網卡 (view)

  6. [network, private network] Openvswitch vs. VirtualBox, http://networkstatic.net/open-vswitch-on-virtualbox/

    • 觀念:  讓 VM 連接到聯外的網路, 

      • 利用 ip 指令建立 tap 型態的虛擬 nic => vboxnet01, 然後你就可以讓 virtualbox 連到它 (ref).

      • 要出去 => 用 ovsctl 建立一個新的 bridge, 把 虛擬 nic  和 實體 nic eth0 都接上去. 指定 br 外網的 ip.

    • 觀念: 建立另一個 private network

      • 建立 virtual nic, 讓 VM 用 host-only 連到這個 nic.

      • 每一台 VM 都用同樣的方式, 連到相同的 nic

  7. [network, vlan, concept] {Host-Only (vb) == Private Network (vagrant) == VLAN} via eth0 (NAT) connect to Internet

  8. [network, bridge, virbr0] What is virbr0 (view)

4.6. VM

  1. [vm, config] video memory > 128 to prevent Windows size issue

  2. [vm, linux-02] How to use linux-02 image as you just enough VM in VirtualBox (view)

  3. [vm, list] How to list vm


vboxmanage list vms

  1. [vm, import] How to import a osv file


#step 1: list ova info

vboxmanage import win10-bare.ova --dry-run


#step 2: import

vboxmanage import win10-bare.ova


#check

vboxmanage list vms

  1. [rename] How to remove a VM


vboxmanage modifyvm win10-guest-01 --name new_vm_name


  1. [delete] How to remove a VM


vboxmanage unregistervm win10-guest-01 --delete


  1. [snapshot] How to shnapshot a VM


vboxmanage snapshot win10-bare take win10-bare-snapshot-01

  1. [vm, clone] How to clone a virtualbox vm (view)


vboxmanage snapshot win10-bare take win10-bare-snapshot-01  # shanshut at first

vboxmanage list vms

vboxmanage clonevm win10-bare --options link --snapshot win10-bare-snapshot-01 --register --name win10-guest-01


  1. [start] How to start a VM


vboxmanage list vms

vboxmanage startvm win10-guest-01 --type headless

  1. [stop] How to stop a VM


vboxmanage list vms

vboxmanage controlvm win10-guest-01 acpipowerbutton


Or 

vboxmanage controlvm win10-guest-01 poweroff

vboxmanage showvminfo win10-guest-01 | grep State    # check the instance state


4.7. Misc

  1. [openstack, fuel] How to install openstack on virtualbox (view), (new)

  2. [display, dpi] How to adjust the guest display dpi 

    • Vitualbox -> (select guest) -> Settings -> Display -> Scale Factor




5. VMWare

  1. [serial] vSphere 5.5 serial number (view)

  2. [package, download] Evaluate and Download (go

  3. [lab] http://labs.hol.vmware.com/

5.1. VMPlayer

  1. [vmplayer, install] Install VMPlayer (view)

  2. [vmplayer, install, vmware tool] How to install vmware tool (view)

  3. [vmplayer,share] Share folder setting for VMware (view)

  4. [uninstall] How to uninstall VMware Workstation?

    •  sudo vmware-installer -u vmware-workstation

  5. [vmplayer, clone] How to copy your vmplayer image (go)

  6. [vmplayer, cp] scp vs. cp in VMware (view)

  7. [vmplayer, promiscuous] How to enable promiscuous mode? (view)

  8. [vmplayer, network] How to create vmware subnet? (view)

  9. [vmplayer, adapter] How to create vmware virtual adapter (view)

5.2. vSphere Client

  1. [vsphere web client, IE security] How to disable IE protected mode for vSphere Web Client (view)

  2. [vsphere client, display] How to modify the display resolution for your vm from vsphere client (view)

  3. [vsphere client, boot] How to setup VM to boot from CD-ROM (view)

  4. [vsphere web client, localized language] How to change the localized language? -- https://localhost:9443/vsphere-client/?locale=en_US# (view)

  5. [vSphere client] How to connect to the local vCenter: hostname=local, username=administrator@vsphere.local, password =xxx (view)

5.3. ESXi

  1. [esxi, install] How to install VMware hypervisor? (view)

    • 請先用 parted tool 或 ESXi partedUtil  delete 指令. 把硬碟中的 partition 全部清掉

    • usb stick installation Windows: lili with fat32 format 

    • vSphere 5.5 requirement (view), OS support (view)

  2. [esxi, install, customization] How to create a customized iso for installing vSphere 5.5 (ref) (ESXi-Customizer)

  3. [esxi, install, usb] Install ESXi on USB driver (ref)

    • 請先用 parted tool 或 ESXi partedUtil  delete 指令. 把硬碟中的 partition 全部清掉

    • But you cannot use the USB stick as a datastore.

  4. [esxi, reset] How to reset the ESXi System (ref)

  5. [esxi, installation, pxe] How to install ESXi by PXE (draft)

  6. [esxi, 64bits simulation] How to enable 64-bit VM -- create vm and set the vcpu support Hardware Virtualization (view)

  7. [esxi, check nested VM]  Checking nested VM on ESXi (view

  8. [esxi, hardware virtualization] How to enable hardware virtualization (view)

  9. [esxi, nested esxi] How to setup a nested ESXi lab at home (view)

  10. [esxi, list partition] How to list partitions from a disk (view)

  11. [esxi, delete partition] How to delete a partition from your storage device in ESXi (view)

  12. [esxi, clean up disk] How to clean up your disk before you install ESXi or VSAN (view)

  13. [esxi, get core dump partition] How to get the core dump partition info (view)

  14. [esxi, hdd -> ssd] How to simulate hdd -> ssd (draft)

  15. [esxi, ntp server] Let an esxi host as a ntp server (ref)

  16. [esxi, ntp client] Assign esxi host as a ntp client (ref)

  17. [esxi, vmdk] How to extend size of VMDK (view)

  18. [esxi, hba driver] How to install HBA driver (view)

  19. [esxi, console] How to login the ESXi host from console (view)

  20. [esxi, disk usage] How to determine disk usage in thin provision (view)

5.4. vCenter

  1. [vcenter, install, package] How to install vcenter 5.5 (view) (usb ref)

  2. [vcenter, install, appliance, 5.5] How to install vcenter by vcenter server appliance, port: 9443  (view)

  3. [vcenter, install, appliance, 6.0] How to install vcenter by vcenter server appliance, port: 9443  (view)

  4. [vcenter, service] How to check the vcenter service is ready (view)

  5. [vcenter, troubleshooting] vcenter cannot login (view)

  6. [vcenter, change ip] How to change vcenter IP from appliance, 5.5 (view)

  7. [vcenter, enable vMotion] How to enable vMotion (view)

  8. [vcenter, enable vSphere HA] How to enable vSphere HA (slide)

  9. [vcenter, DRS] How to enable VMware Distributed Resource Scheduler (slide, draft)

  10. [vcenter, vm template, register] How to register VM from datastore (view

  11. [vcenter, create vm, template] How to create a new vm from template (view)

  12. [vcenter, add datastore, nas] How to add a new datastore from NFS (view)

  13. [vcenter, startup] How to setup the default VM startup and shutdown automatically (view)

  14. [vcenter, alarm, definition] Where is the alarm definition (view

  15. [vcenter, storage, vm size] How to evaluate a VM size (view)

  16. [vcenter, storage, thin provision] How thin provisioning works (slide), 11 pages

  17. [vcenter, storage, provision] How to check the VM or Virtual Disk provision type (view)

  18. [vcenter, storage, rdm] How to create RDMs for your SATA device (view)

  19. [vcenter, storage, iscsi] How to setup iSCSI device for your ESXi system (view)

  20. [vcenter, switch, jumbo] How to setup jumbo frame for your kernel vswitch (view)

5.5. VSAN

  1. [vsan, summary] the summary of vsan (view)

  2. [vsan, white paper] the data locality whitepaper for VSAN (ref) (draft)

  3. [vsan, lab] The VMware virtual SAN lab (ref)

  4. [vsan, installation] How to enable vsan for your infrastructure (view)

  5. [vsan, remove] How to remove vsan from your system (view)

  6. [vsan, location] Where is your data location in vsan enabled (view)

  7. [vsan, storage policy] How to setup your vm policy for vsan storage -- concept, stripe number, tolerate  (view)

  8. [vsan, evaluate] How to evaluate the stripe number for your vm storage (view)

  9. [vsan, tool, check disk] How to check your storage device -- HD Tune Pro 

  10. [vsan, cache status] How to determine the vsan cache status -- write through/write back, hit rate? (view)

VM

  1. [vm, vmx file] Where is the vm configuration file (vmx file) for a vm (view)

  2. [vm, powercli, set locale) How to setup the locale for your powerCli (view)

  3. [vm, start, dos] How to start a VM (view)

  4. [vm, copy&paste] How to enable copy & paste (view)

  5. [vm, add hd] How to add new storage from vSphere Web Client (view)

  6. [nsx, introduction] Introduce to the VMware NSX (draft)

  7. [nsx, installation] How to install NSX (draft)

  8. [vmmark] Introduce to the VMMark (slide draft)

5.6. I/O

  1. [direct io, pass-through] How to setup passthrough for a PCI device (view)

5.7. Misc

  1. [vmtool] How to install vmtool in your VM (view)

  2. [vmware, tool] How to install vmware tool in your Ubuntu -- extract the tgz. run the pl (ref)

  3. [evo rail, hw spec] What is the hardware spec for vmware evo rail (view)

  4. [vds, create] How to create vSphere distributed switch (view)

  5. [vds, create kernel switch] How to create a VMKernel switch on VDS (ref)


References

  1. [vDS] Distributed Virtual Switches (draft)

  2. [vds, config] Configuring a vSphere Distributed Switch in the vSphere Web Client (ref)

  3. [vds, config] Configuring vNetwork Distributed Switch using vCenter Server (1010557) (ref)

  4. [vds, overview] Overview of vNetwork Distributed Switch concepts (ref) (6.0)

  5. [vds, lacp] LACP Support on a vSphere Distributed Switch (ref)

  6. [esxi, deployment] Completely Automated Deployment ESXi (ref)

  7. [esxtop] Field of esxtop (ref)


Questions

  1. What is the dirty ratio of VSAN?


6. VMWare Cli

6.1. ESXCLI

  1. [esxcli, installation] vCLI, vSphere Command Line Interface (view)

  2. [esxcli, create vm] How to create a VM (draft)

  3. [esxcli, list vm] How to list the running virtual machine on the system (view)

6.2. PowerCLI

  1. [powercli, installation] Download the PowerCli (5.5_download) (5.5 r2 download, release note) (6.0 download) (document)

  2. [powercli, init] Prepare your powercli environment (view)

6.2.1. VM

  1. [powercli, list vm] List VM by PowerCli (view)

  2. [powercli, create vm] Create VM by PowerCli (view)

  3. [powercli, create vm + 3 nic] How to create VM with 3 NIC (view)

  4. [powercli, create vm, array] How to create VM from array by PowerCli (view)

  5. [powercli, create 10 vm + csv] How to batch create VM (view)

  6. [powercli, clone vm] How to clone to VM (view)

  7. [powercli, create vm, template] How to create a VM from template (view)

  8. [powercli, start vm] How to start VM by PowerCli (view)

  9. [powercli, stop vm] How to shutdown and power off the vm by PowerCli (view)

  10. [powercli, remove vm] How to remove VM by PowerCli (view)

  11. [powercli, move vm] How to move VM by PowerCli (view)

6.2.2. Storage

  1. [powercli, add cd] How to add CD device to your VM (view)

  2. [powercli, add hd] How to add a storage to your VM (view)

  3. [powercli, check, storage policy] How to check the storage policy for VM and Disk (view)

  4. [powercli, setup, storage policy] How to setup a specified storage policy to VM and Disk (view)

  5. [powercli, setup, storage format] How to setup the Disk storage format to eager zero (view)

  6. [powercli, add hd to controller] How to add a lot of hdd to your VM and attached them to the specified controller (view)

  7. [powercli, remove hd] How to remove the second hd from your VM (view)

  8. [powercli, list hd detail] How to list hard disk detail (view)

6.2.3. Snapshot

  1. [powercli, snapshot list] How to get snapshot list from you VM (view)

6.2.4. Network

  1. [powercli, network traffic] How to get esxtop network traffic using get-esxtop command (view)

  2. [powercli, 60 sec network traffic] How to retrieving 60 sec network traffic from esxtop (view)

6.2.5. Misc

  1. [powercli, cpu num] How to get cpu number from esxtop (view)

  2. [powercli, lcpu used] How to get lcpu used (view)

  3. [powercli, virtualportgroup] How to create a virtual port group by PowerCli (view)

  4. [powercli, run dos batch file] How to run the DOS batch file (view)

  5. [powercli, vm ip] How to get the VM IP from powercli (view)

  6. [powercli, remote execute bat] Run remote batch file where is located in a share folder (view)

  7. [powercli, computer name] An example on automatically changing VMs computer name (view)

  8. [powercli, wait for task complete] How to wait for all tasks to finish (view)


7. Mesos

  1. Mesos (ref)

8. Hyper-V

  1. [vm, create] How to create a Hyper-V VM (view)

  2. [vm, internet] How to setup your VM on Internet (view)