Author Archives: admin

How to copy VMs directly between ESXi Hosts using ovftool

I need to copy a Virtual Machine from one host to another, if you do not have shared storage sometimes it’s could be a little difficult. On my HomeLab I have two hosts (micro servers). I wish to copy, not to move the VM from host. I can leverage tools like VMware Converter or exporting the VM to OVF and then re-importing that VM into the destination host but it could take awhile or I have to run a Windows system (I have but I don’t like). If you are looking for a quick and easy way to copy a VM from one host to another, try using the ovftool (yes, I know that PowerCLI now works on a Mac System, even I have it, but that topic will be another article on my blog).

My HomeLab’s first host has the IP address 192.168.1.80 (the source), and the target host has the address 192.168.1.81.

I had used ovftool before for convert a VMware Fusion VM to OVF file. Then when I tried to use to export VMs I got this error:

root@mymacpro:$ ./ovftool vi://root@192.168.1.80
Segmentation fault: 11

Because I found some references where people had used ovftool to export VMs, like virtuallyGhetto site, I guessed my problem was the version.

I checked my Mac has the version: 3.5.2:

aavelar@mymacpro:$ ./ovftool -v
VMware ovftool 3.5.2 (build-1880279)

I looked for a new one version, and I found the version 4.2.0 available on VMware site (VMware-ovftool-4.2.0-4586971-mac.x64.dmg file). After I installed the new one version, I checked again:

aavelar@mymacpro:$ ./ovftool -v
VMware ovftool 4.2.0 (build-4586971)

We are ready. First, I need to check what is the list of VM’s on the source host:

aavelar@mymacpro:$ ./ovftool vi://root@192.168.1.80
Enter login information for source vi://192.168.1.80/
Username: root
Password: ********
Error: Found wrong kind of object (ResourcePool). Possible completions are:
VMware vCenter Orchestrator Appliance
VMware vCenter Server 6
VMware vCenter Orchestrator Appliance OTB
vRealize Infrastructure Navigator
VMware vRealize Appliance 7.0
Redhat Enterprise Linux 7.2 x86_64

I choose “vRealize Infrastructure Navigator”, just because it’s the little one. Also I need to define what is the datastore on target host, I chose datastore_1_Server1 datastore. We are ready, go:

aavelar@mymacpro:$ ./ovftool -ds=datastore_1_Server1 vi://root@192.168.1.80/vRealize\ Infrastructure\ Navigator vi://root@192.168.1.81
Enter login information for source vi://192.168.1.80/
Username: root
Password: ********
Opening VI source: vi://root@192.168.1.80:443/vRealize%20Infrastructure%20Navigator
Opening VI target: vi://root@192.168.1.81:443/
Deploying to VI: vi://root@192.168.1.81:443/
Transfer Completed
Completed successfully

Also, you can create some too simple script to do the task for each VM on source host, in my case it could be:

  1. #!/bin/bash
  2.  
  3.  
  4. OVFTOOL="/Applications/VMware\ OVF\ Tool/ovftool"
  5. OIFS="$IFS"
  6. IFS=$'\n'
  7. VMs="VMware vCenter Orchestrator Appliance
  8. VMware vCenter Orchestrator Appliance OTB"
  9.  
  10. for vm in ${VMs}; do
  11.     echo "${vm}"
  12.     echo $OVFTOOL -ds=datastore_1_Server1  vi://root:VMware1\!@192.168.1.80/${vm} vi://root:VMware1\!@192.168.1.81
  13. done
  14.  
  15. IFS="$OIFS"

Done. The VM’s were copied. Remember, with this method you will copy the VM, not move it. Then, after you are sure the VM was copied fine, you need to remove the old one VM from the source host (after you tested the new copy is working).

Regards

Upgrading from ESXi 5.5 to ESXi 6.x via SSH using esxcli

If you want to upgraded your ESXi 5.5 server to ESXi 6 you can do using the install ISO file. However, it is also possible to perform the upgrade from 5.5 to 6.0 via SSH and esxcli.

To upgrade from ESXi 5.5 to 6.0 using esxcli:

1. Shut down all VMs running on your ESXi host machine.

2. Connect via SSH and run the following command to enter maintenance mode:

root@esxi-01:$ ~ # vim-cmd /hostsvc/maintenance_mode_enter

3. After putting ESXi into maintenance mode, run the following command to set the correct firewall rules for the httpClient:

root@esxi-01:$ ~ # esxcli network firewall ruleset set -e true -r httpClient

4. Next, run the following command to list the ESXi 6.x updates available. You want the latest one that ends in “-standard” for your version of VMware. In my case I want the version 6.0.0 with updates on 2016.

root@esxi-01:$ ~ # esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | grep ESXi-6.0.0-2016

ESXi-6.0.0-20160804001-standard VMware, Inc. PartnerSupported
ESXi-6.0.0-20161104001-standard VMware, Inc. PartnerSupported
ESXi-6.0.0-20160504001-standard VMware, Inc. PartnerSupported
ESXi-6.0.0-20160302001-no-tools VMware, Inc. PartnerSupported
ESXi-6.0.0-20161004001-no-tools VMware, Inc. PartnerSupported
ESXi-6.0.0-20160301001s-no-tools VMware, Inc. PartnerSupported
ESXi-6.0.0-20161104001-no-tools VMware, Inc. PartnerSupported
ESXi-6.0.0-20161004001-standard VMware, Inc. PartnerSupported
ESXi-6.0.0-20161101001s-standard VMware, Inc. PartnerSupported
ESXi-6.0.0-20160101001s-no-tools VMware, Inc. PartnerSupported
ESXi-6.0.0-20160104001-no-tools VMware, Inc. PartnerSupported
ESXi-6.0.0-20160801001s-standard VMware, Inc. PartnerSupported
ESXi-6.0.0-20160204001-standard VMware, Inc. PartnerSupported
ESXi-6.0.0-20160101001s-standard VMware, Inc. PartnerSupported
ESXi-6.0.0-20160504001-no-tools VMware, Inc. PartnerSupported
ESXi-6.0.0-20160204001-no-tools VMware, Inc. PartnerSupported
ESXi-6.0.0-20161101001s-no-tools VMware, Inc. PartnerSupported
ESXi-6.0.0-20160302001-standard VMware, Inc. PartnerSupported
ESXi-6.0.0-20160804001-no-tools VMware, Inc. PartnerSupported
ESXi-6.0.0-20160301001s-standard VMware, Inc. PartnerSupported
ESXi-6.0.0-20160801001s-no-tools VMware, Inc. PartnerSupported
ESXi-6.0.0-20160104001-standard VMware, Inc. PartnerSupported

5. Once you’ve identified the correct version of VMware (my case was ESXi-6.0.0-20160302001-standard), run the following command to download and install the update.
Note: It is very important that you run esxcli software profile update here. Running esxcli software profile install may overwrite drivers that your ESXi host needs.

root@esxi-01:$ ~ # esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main
/vmw-depot-index.xml -p ESXi-6.0.0-20160302001-standard

Update Result
Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
Reboot Required: true
VIBs Installed: VMWARE_bootbank_mtip32xx-native_3.8.5-1vmw.600.0.0.2494585, VMware_bootbank_ata-pata-amd_0.3.10-3vmw.600.0.0.2494585, VMware_bootbank_ata-pata-atiixp_0.4.6-4vmw.600.0.0.2494585, VMware_bootbank_ata-pata-cmd64x_0.2.5-3vmw.600.0.0.2494585, VMware_bootbank_ata-pata-hpt3x2n_0.3.4-3vmw.600.0.0.2494585, VMware_bootbank_ata-pata-pdc2027x_1.0-3vmw.600.0.0.2494585, VMware_bootbank_ata-pata-serverworks_0.4.3-3vmw.600.0.0.2494585, VMware_bootbank_ata-pata-sil680_0.4.8-3vmw.600.0.0.2494585, VMware_bootbank_ata-pata-via_0.3.3-2vmw.600.0.0.2494585, VMware_bootbank_block-cciss_3.6.14-10vmw.600.0.0.2494585, VMware_bootbank_cpu-microcode_6.0.0-0.0.2494585, VMware_bootbank_ehci-ehci-hcd_1.0-3vmw.600.2.34.3620759, VMware_bootbank_elxnet_10.2.309.6v-1vmw.600.0.0.2494585, VMware_bootbank_emulex-esx-elxnetcli_10.2.309.6v-0.0.2494585, VMware_bootbank_esx-base_6.0.0-2.34.3620759, VMware_bootbank_esx-dvfilter-generic-fastpath_6.0.0-0.0.2494585, VMware_bootbank_esx-tboot_6.0.0-2.34.3620759, VMware_bootbank_esx-xserver_6.0.0-0.0.2494585, VMware_bootbank_ima-qla4xxx_2.02.18-1vmw.600.0.0.2494585, VMware_bootbank_ipmi-ipmi-devintf_39.1-4vmw.600.0.0.2494585, VMware_bootbank_ipmi-ipmi-msghandler_39.1-4vmw.600.0.0.2494585, VMware_bootbank_ipmi-ipmi-si-drv_39.1-4vmw.600.0.0.2494585, VMware_bootbank_lpfc_10.2.309.8-2vmw.600.0.0.2494585, VMware_bootbank_lsi-mr3_6.605.08.00-7vmw.600.1.17.3029758, VMware_bootbank_lsi-msgpt3_06.255.12.00-8vmw.600.1.17.3029758, VMware_bootbank_lsu-hp-hpsa-plugin_1.0.0-1vmw.600.0.0.2494585, VMware_bootbank_lsu-lsi-lsi-mr3-plugin_1.0.0-2vmw.600.0.11.2809209, VMware_bootbank_lsu-lsi-lsi-msgpt3-plugin_1.0.0-1vmw.600.0.0.2494585, VMware_bootbank_lsu-lsi-megaraid-sas-plugin_1.0.0-2vmw.600.0.11.2809209, VMware_bootbank_lsu-lsi-mpt2sas-plugin_1.0.0-4vmw.600.1.17.3029758, VMware_bootbank_lsu-lsi-mptsas-plugin_1.0.0-1vmw.600.0.0.2494585, VMware_bootbank_misc-cnic-register_1.78.75.v60.7-1vmw.600.0.0.2494585, VMware_bootbank_misc-drivers_6.0.0-2.34.3620759, VMware_bootbank_net-bnx2_2.2.4f.v60.10-1vmw.600.0.0.2494585, VMware_bootbank_net-bnx2x_1.78.80.v60.12-1vmw.600.0.0.2494585, VMware_bootbank_net-cnic_1.78.76.v60.13-2vmw.600.0.0.2494585, VMware_bootbank_net-e1000_8.0.3.1-5vmw.600.0.0.2494585, VMware_bootbank_net-e1000e_3.2.2.1-1vmw.600.1.26.3380124, VMware_bootbank_net-enic_2.1.2.38-2vmw.600.0.0.2494585, VMware_bootbank_net-forcedeth_0.61-2vmw.600.0.0.2494585, VMware_bootbank_net-igb_5.0.5.1.1-5vmw.600.0.0.2494585, VMware_bootbank_net-ixgbe_3.7.13.7.14iov-20vmw.600.0.0.2494585, VMware_bootbank_net-mlx4-core_1.9.7.0-1vmw.600.0.0.2494585, VMware_bootbank_net-mlx4-en_1.9.7.0-1vmw.600.0.0.2494585, VMware_bootbank_net-nx-nic_5.0.621-5vmw.600.0.0.2494585, VMware_bootbank_net-tg3_3.131d.v60.4-2vmw.600.1.26.3380124, VMware_bootbank_net-vmxnet3_1.1.3.0-3vmw.600.2.34.3620759, VMware_bootbank_nmlx4-core_3.0.0.0-1vmw.600.0.0.2494585, VMware_bootbank_nmlx4-en_3.0.0.0-1vmw.600.0.0.2494585, VMware_bootbank_nmlx4-rdma_3.0.0.0-1vmw.600.0.0.2494585, VMware_bootbank_nvme_1.0e.0.35-1vmw.600.2.34.3620759, VMware_bootbank_ohci-usb-ohci_1.0-3vmw.600.0.0.2494585, VMware_bootbank_qlnativefc_2.0.12.0-5vmw.600.0.0.2494585, VMware_bootbank_rste_2.0.2.0088-4vmw.600.0.0.2494585, VMware_bootbank_sata-ahci_3.0-22vmw.600.2.34.3620759, VMware_bootbank_sata-ata-piix_2.12-10vmw.600.0.0.2494585, VMware_bootbank_sata-sata-nv_3.5-4vmw.600.0.0.2494585, VMware_bootbank_sata-sata-promise_2.12-3vmw.600.0.0.2494585, VMware_bootbank_sata-sata-sil24_1.1-1vmw.600.0.0.2494585, VMware_bootbank_sata-sata-sil_2.3-4vmw.600.0.0.2494585, VMware_bootbank_sata-sata-svw_2.3-3vmw.600.0.0.2494585, VMware_bootbank_scsi-aacraid_1.1.5.1-9vmw.600.0.0.2494585, VMware_bootbank_scsi-adp94xx_1.0.8.12-6vmw.600.0.0.2494585, VMware_bootbank_scsi-aic79xx_3.1-5vmw.600.0.0.2494585, VMware_bootbank_scsi-bnx2fc_1.78.78.v60.8-1vmw.600.0.0.2494585, VMware_bootbank_scsi-bnx2i_2.78.76.v60.8-1vmw.600.0.11.2809209, VMware_bootbank_scsi-fnic_1.5.0.45-3vmw.600.0.0.2494585, VMware_bootbank_scsi-hpsa_6.0.0.44-4vmw.600.0.0.2494585, VMware_bootbank_scsi-ips_7.12.05-4vmw.600.0.0.2494585, VMware_bootbank_scsi-megaraid-mbox_2.20.5.1-6vmw.600.0.0.2494585, VMware_bootbank_scsi-megaraid-sas_6.603.55.00-2vmw.600.0.0.2494585, VMware_bootbank_scsi-megaraid2_2.00.4-9vmw.600.0.0.2494585, VMware_bootbank_scsi-mpt2sas_19.00.00.00-1vmw.600.0.0.2494585, VMware_bootbank_scsi-mptsas_4.23.01.00-9vmw.600.0.0.2494585, VMware_bootbank_scsi-mptspi_4.23.01.00-9vmw.600.0.0.2494585, VMware_bootbank_scsi-qla4xxx_5.01.03.2-7vmw.600.0.0.2494585, VMware_bootbank_uhci-usb-uhci_1.0-3vmw.600.0.0.2494585, VMware_bootbank_vsan_6.0.0-2.34.3563498, VMware_bootbank_vsanhealth_6.0.0-3000000.3.0.2.34.3544323, VMware_bootbank_xhci-xhci_1.0-3vmw.600.2.34.3620759, VMware_locker_tools-light_6.0.0-2.34.3620759
VIBs Removed: VMware_bootbank_ata-pata-amd_0.3.10-3vmw.550.0.0.1331820, VMware_bootbank_ata-pata-atiixp_0.4.6-4vmw.550.0.0.1331820, VMware_bootbank_ata-pata-cmd64x_0.2.5-3vmw.550.0.0.1331820, VMware_bootbank_ata-pata-hpt3x2n_0.3.4-3vmw.550.0.0.1331820, VMware_bootbank_ata-pata-pdc2027x_1.0-3vmw.550.0.0.1331820, VMware_bootbank_ata-pata-serverworks_0.4.3-3vmw.550.0.0.1331820, VMware_bootbank_ata-pata-sil680_0.4.8-3vmw.550.0.0.1331820, VMware_bootbank_ata-pata-via_0.3.3-2vmw.550.0.0.1331820, VMware_bootbank_block-cciss_3.6.14-10vmw.550.0.0.1331820, VMware_bootbank_ehci-ehci-hcd_1.0-3vmw.550.0.0.1331820, VMware_bootbank_elxnet_10.0.100.0v-1vmw.550.0.0.1331820, VMware_bootbank_esx-base_5.5.0-2.33.2068190, VMware_bootbank_esx-dvfilter-generic-fastpath_5.5.0-0.0.1331820, VMware_bootbank_esx-tboot_5.5.0-2.33.2068190, VMware_bootbank_esx-xlibs_5.5.0-0.0.1331820, VMware_bootbank_esx-xserver_5.5.0-0.0.1331820, VMware_bootbank_ima-qla4xxx_2.01.31-1vmw.550.0.0.1331820, VMware_bootbank_ipmi-ipmi-devintf_39.1-4vmw.550.0.0.1331820, VMware_bootbank_ipmi-ipmi-msghandler_39.1-4vmw.550.0.0.1331820, VMware_bootbank_ipmi-ipmi-si-drv_39.1-4vmw.550.0.0.1331820, VMware_bootbank_lpfc_10.0.100.1-1vmw.550.0.0.1331820, VMware_bootbank_lsi-mr3_0.255.03.01-2vmw.550.1.16.1746018, VMware_bootbank_lsi-msgpt3_00.255.03.03-1vmw.550.1.15.1623387, VMware_bootbank_misc-cnic-register_1.72.1.v50.1i-1vmw.550.0.0.1331820, VMware_bootbank_misc-drivers_5.5.0-2.33.2068190, VMware_bootbank_mtip32xx-native_3.3.4-1vmw.550.1.15.1623387, VMware_bootbank_net-be2net_4.6.100.0v-1vmw.550.0.0.1331820, VMware_bootbank_net-bnx2_2.2.3d.v55.2-1vmw.550.0.0.1331820, VMware_bootbank_net-bnx2x_1.72.56.v55.2-1vmw.550.0.0.1331820, VMware_bootbank_net-cnic_1.72.52.v55.1-1vmw.550.0.0.1331820, VMware_bootbank_net-e1000_8.0.3.1-3vmw.550.0.0.1331820, VMware_bootbank_net-e1000e_1.1.2-4vmw.550.1.15.1623387, VMware_bootbank_net-enic_1.4.2.15a-1vmw.550.0.0.1331820, VMware_bootbank_net-forcedeth_0.61-2vmw.550.0.0.1331820, VMware_bootbank_net-igb_5.0.5.1.1-1vmw.550.1.15.1623387, VMware_bootbank_net-ixgbe_3.7.13.7.14iov-11vmw.550.0.0.1331820, VMware_bootbank_net-mlx4-core_1.9.7.0-1vmw.550.0.0.1331820, VMware_bootbank_net-mlx4-en_1.9.7.0-1vmw.550.0.0.1331820, VMware_bootbank_net-nx-nic_5.0.621-1vmw.550.0.0.1331820, VMware_bootbank_net-tg3_3.123c.v55.5-1vmw.550.2.33.2068190, VMware_bootbank_net-vmxnet3_1.1.3.0-3vmw.550.0.0.1331820, VMware_bootbank_ohci-usb-ohci_1.0-3vmw.550.0.0.1331820, VMware_bootbank_qlnativefc_1.0.12.0-1vmw.550.0.0.1331820, VMware_bootbank_rste_2.0.2.0088-4vmw.550.1.15.1623387, VMware_bootbank_sata-ahci_3.0-20vmw.550.2.33.2068190, VMware_bootbank_sata-ata-piix_2.12-10vmw.550.2.33.2068190, VMware_bootbank_sata-sata-nv_3.5-4vmw.550.0.0.1331820, VMware_bootbank_sata-sata-promise_2.12-3vmw.550.0.0.1331820, VMware_bootbank_sata-sata-sil24_1.1-1vmw.550.0.0.1331820, VMware_bootbank_sata-sata-sil_2.3-4vmw.550.0.0.1331820, VMware_bootbank_sata-sata-svw_2.3-3vmw.550.0.0.1331820, VMware_bootbank_scsi-aacraid_1.1.5.1-9vmw.550.0.0.1331820, VMware_bootbank_scsi-adp94xx_1.0.8.12-6vmw.550.0.0.1331820, VMware_bootbank_scsi-aic79xx_3.1-5vmw.550.0.0.1331820, VMware_bootbank_scsi-bnx2fc_1.72.53.v55.1-1vmw.550.0.0.1331820, VMware_bootbank_scsi-bnx2i_2.72.11.v55.4-1vmw.550.0.0.1331820, VMware_bootbank_scsi-fnic_1.5.0.4-1vmw.550.0.0.1331820, VMware_bootbank_scsi-hpsa_5.5.0-44vmw.550.0.0.1331820, VMware_bootbank_scsi-ips_7.12.05-4vmw.550.0.0.1331820, VMware_bootbank_scsi-lpfc820_8.2.3.1-129vmw.550.0.0.1331820, VMware_bootbank_scsi-megaraid-mbox_2.20.5.1-6vmw.550.0.0.1331820, VMware_bootbank_scsi-megaraid-sas_5.34-9vmw.550.2.33.2068190, VMware_bootbank_scsi-megaraid2_2.00.4-9vmw.550.0.0.1331820, VMware_bootbank_scsi-mpt2sas_14.00.00.00-3vmw.550.1.15.1623387, VMware_bootbank_scsi-mptsas_4.23.01.00-9vmw.550.0.0.1331820, VMware_bootbank_scsi-mptspi_4.23.01.00-9vmw.550.0.0.1331820, VMware_bootbank_scsi-qla2xxx_902.k1.1-9vmw.550.0.0.1331820, VMware_bootbank_scsi-qla4xxx_5.01.03.2-6vmw.550.0.0.1331820, VMware_bootbank_uhci-usb-uhci_1.0-3vmw.550.0.0.1331820, VMware_locker_tools-light_5.5.0-2.33.2068190
VIBs Skipped: VMware_bootbank_esx-ui_1.0.0-3617585

6. Once the update has been installed and prompts you to reboot, run the following command to restart:

root@esxi-01:$ ~ # reboot

7. After your ESXi host restarts, connect via SSH and run the following command to exit maintenance mode:

root@esxi-01:$ ~ # vim-cmd /hostsvc/maintenance_mode_exit
'vim.Task:haTask-ha-host-vim.HostSystem.exitMaintenanceMode-140'

At this point, your ESXi host should be upgraded to ESXi 6.0.0.

Regards

Building a Home Lab for PowerCli Testing

Building a Home Lab for #PowerCli Testing – Notes of a scripter

Building a Home Lab for PowerCli Testing

After taking the PowerCli HOL from VMware, I been thinking of putting together a home lab. I been reading a lot of information about others bloggers using Mini PCs- such as the Intel NUCs, Mac Minis, and even custom built whitebox servers. Unfortunately, being a father of 3 kids means I have to be on a tight budget, and at the same time I don’t want to skimp and have a under powered home lab. I would also like the equipment to be quiet and fan-less if at all possible.


VMware Social Media Advocacy

Install VMware ESXi ISO image on USB memory stick by using Unetbootin Freeware

Free software called Unetbootin can create bootable USB which is then used in case your system does not have CD/DVD drive, to install ESXi hypervisor. This free application can create the bootable ESXi 5 hypervizor from any system – Linux, Windows or Mac OS X.

In my case I have Mac OS X, for that I used it.

Here are the steps to create a bootable ESXi 5 USB stick:

  • Download Free Unebootin software (use the version you need for you system: Linux, Windows, Mac OS X)
  • Format the USB stick with FAT32 and make sure it could be read from Mac OS X.
  • Use Unetbootin to select your VMware ESXi 5 iso file – VMware-VMvisor-Installer-5.5.0.update02-2068190.x86_64.iso and with the dropdown arrow choose the correct USB drive from your system.
  • Now, that’s all. You are done. Click OK to start the installation process. After, don’t forget to change the boot sequence in your BIOS to boot from USB.

Unebootin

Too easy.

Regards

Home lab – HP N54L Microservers with 16GB RAM

 

I bought a new mini server HP ProLiant N54L Microserver from a friend, it was cheaper than another options. Included 4 disks with 2TB each. The specs says this server only support 8 GB of RAM but I found it could support 16 GB.

I then added 16GB of RAM   (not a HP supported configuration, but a couple of blog post comments suggested some memory sticks worked), using 2 of these (Corsair XMS3 8GB (1x8GB) DDR3 1333 MHz (PC3 10666) Desktop Memory, part number CMX8GX3M1A1333C9. Both doesn’t have ECC support but for a personal server is not a trouble.

The microserver’s only have 1Gb network port embedded, it’s enough for my personal lab.

Future plans include to install an EXSi for vRealize Automation lab mixed with my personal labtop. May be only I will install the vRealize Automation Appliance and IaaS Server on this hardware. The vCenter Server and AD machine will remain on my personal labtop, depends of the memory.

But first I need a new no-break.

Regards