Get the App
SLTechnology News&Howtos  ›  Network Security  › 

How to clone the current ESXi system to an SD card or USB disk?

Shulou Source: shulou.com Published: 2022-06-01 07:36:19 10月15日 Update

Recently, there are students on how to clone the ESXi system installed on the local disk to the SD card or USB disk, in order to quickly achieve the VSAN-Ready state of the ESXi host. It just so happens that cats and cats are also a little interested, so I studied this way, and the general working idea is to "first clone the ESXi system to VMFS Datastore to become a file through the dd command, and then get the SD card or USB disk from the file". The specific steps are as follows:

1. First, confirm the specific location of the partition where the ESXi system is installed with the following command:

1. # ls-l / dev/disks/

As shown in the following figure:

2. After confirming which disk is the system disk through the command, record the parameters of its mpx.vmhbaxxxx, and execute the following command to copy the disk to VMFS Datastore:

1.#dd if=/dev/disks/mpx.vmhba1:C0:T0:L0 of=/vmfs/volumes/Datastore/ESXi.img

As shown in the following figure:

In VMFSDatastore, you can see this result:

Note: if necessary, for example, if the local disk is large, it is recommended to add a compression instruction as follows:

1.#dd if=/dev/disks/mpx.vmhba1:C0:T0:L0 | gzip > / vmfs/volumes/Datastore/ESXi.img.gz

3. After completing the first two steps, it means that you have a complete ESXi system message, and the next thing to do is to write the ESXi.img to the SD card or USB disk. If it is a Linux system, you can continue to do it directly with the dd command, copy the ESXi.img to the Linux system, and insert the SD card or USB disk into that machine, and then command:

1. # dd if = ESXi.img of=/dev/sdc

Note: the sdc here indicates the drive letter path after the SD card or USB disk is Mount to Linux.

If gzip compression is useful in step 2, the command is as follows:

1. # dd if=ESXi.img | gunzip dd of=/dev/sdc

4. If it is a Windows machine, insert the SD card or USB disk into the system and use the USBImage Tool tool to do this. Download the tool, install and open it, click Device Restore, select the location of the ESXi.img file, and wait for the copy to be completed.

Virtual Human: focusing on Virtualization and Cloud Computing

For more small technology sharing, please follow Wechat.

Tags: Disks systems commands copies files things locations remarks that is tools machines larger necessary next hosts interests parameters students suggestions ideas Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft OPPO Reno vpn Huawei Shulou Technology