Kamis, 20 Mei 2021

ESXI-setting compatibility

https://netosec.com/transfer-files-to-vmware-esxi-server/ 

There are different ways to transfer installation files or VMs over to ESXi server. You can do it over the network or you can do it using USB. Although ESXi server does not directly support file transfer through USB, there are steps we can do to achieve that.

We will be going over the a few ways:

Through vSphere web GUI

vSphere GUI
  • login to ESXi
  • right click on Storage
  • click Browse datastores on context menu
browse
  • click Upload
  • select the file to upload
upload

Note: you can also download file by navigating to the file, right click on the file and click Download.

Through USB

Step 1: Enable SSH

  • do this through ESXi console
  • log in to SSH

Step 2: Disable USB arbitrary

USB arbitrator service will automatically allow pass-through of USB devices to VMs. Therefore, when this service is running, the USB device is only available to VMs, not host. To allow ESXi host access to the USB device, we need to stop the USB arbitrator service

/etc/init.d/usbarbitrator stop
reference:  https://www.virtuallyghetto.com/2012/03/how-to-access-usb-storage-in-esxi-shell.html 

Step 3: Identify USB device

fdisk -l
fdisk

Find out the disk that is corresponding to the USB device. In this example, the device is:

/dev/disks/mpx.vmhba35:C0:T0:L0:

Next we will find out the partition number for the USB drive:

ls /dev/disks/mpx.vmhba35:C0:T0:L0:*
device ID

In this case, the full device ID to reference the USB drive is:

/dev/disks/mpx.vmhba35:C0:T0:L0:1

Step 4: Transferring file

For FAT32 USB drive

mcopy -i /dev/disks/mpx.vmhba35:C0:T0:L0:1 ::/your-file.txt /targetFolder/your-file.txt

Limitation: FAT32 has a file size limit of 4GB. To overcome this limitation, you can use the linux split command to split file into chunks and then use cat command to put them back together at ESXi server.

For NTFS USB drive

note: NTFS USB drive is readonly. Therefore, can’t copy files to it.

ntfscat -f  /dev/disks/mpx.vmhba35:C0:T0:L0:1 ::/your-file.txt > /targetFolder/your-file.txt

You may encounter the following error message but the file would still be copied.

error message

Finding your hard disk drive

If you are not sure where your hard disk drive is located, run the df command

df

In my case, my hard drive is located at /vmfs/volumes/HDD

Step 5: Restart USB arbitrary service

Once you are done with transferring files, you can start the USB arbitrary service again.

 /etc/init.d/usbarbitrator start

Through VMware Workstation

VMware Workstation does not allow arbitrary file transfer but it allows you transfer VMs from Workstation to ESXi

Step 1: Connect to ESXi server

We will first establish connection to ESXi server at VMware Workstation:

  • click on File > Connect to Server…
  • enter server name or IP address
  • enter User name and password
  • click Connect
connect to server

Step 2: Change Hardware Compatibility

Virtual machine running on VMware Workstation is not directly compatible with ESXi server. We will first need to convert the virtual machine to make it compatible with ESXi.

  • right click on the virtual machine
  • select Manage > Change Hardware Compatibility…
  • click Next on the popup
  • select ESXi 6.7 U2
change compatability
  • select Create a new clone of this virtual machine
  • click Next
clone
  • enter desire virtual machine name & location for the clone
  • click Next
clone step 2
  • click Finish on Review Changes screen
review

The process will take quite a while. Once done, you should be able to start the virtual machine from ESXi server

Tidak ada komentar:

Posting Komentar