Configuring a USB Flash drive to transfer files between Windows and an ESXi/ESX host
search cancel

Configuring a USB Flash drive to transfer files between Windows and an ESXi/ESX host

book

Article ID: 307927

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

This article provides steps to configure a USB drive to transfer files to and from a Windows machine and an ESXi/ESX host if a management agent is not available. For more information on supported USB devices, see Supported USB device models for passthrough from an ESX or ESXi host to a virtual machine (1021345).

Environment

VMware vSphere ESXi 5.0
VMware vSphere ESXi 5.1
VMware ESXi 4.0.x Installable
VMware ESXi 3.5.x Embedded
VMware ESX 4.1.x
VMware ESXi 4.1.x Embedded
VMware ESX Server 3.5.x
VMware ESXi 4.1.x Installable
VMware ESXi 3.5.x Installable
VMware ESX 4.0.x
VMware vSphere ESXi 5.5
VMware ESXi 4.0.x Embedded

Resolution

To transfer files between a Windows machine and an ESXi/ESX host, perform these steps.

Note: The USB key must be a minimum of 4 GB in size. This procedure is not recommended for basic file transfers.
  1. Plug the USB key in to the Windows machine that you want to transfer files from.
  2. To launch the Logical Disk Manager, go to Start > Run, type diskmgmt.msc, and click OK.

    Note: The output displays the disk name, therefore you can use this step to verify that the USB drive is recognized by Windows.
The next steps format the USB key so that it is compatible with both systems. Ensure you remove all important data from the USB key prior to performing these steps.
  1. To open diskpart, click Start > Run and type diskpart

    Note: This step opens a command prompt window.
     
  2. To list all the connected disks, including the USB device, run the command:

    list disk
     
  3. To replace disk x with the USB disk number, for example disk 0 or disk 2, run the command:

    select disk x
     
  4. To list all partitions on the USB device, run the command:

    list partition

    Note: Most USB devices contain one partition.
     
  5. To select the partition, noted in step 4, run the command:

    select partition 1
     
  6. To delete the partition, run the command:

    delete partition
     
  7. To select the disk again, run the command:

    select disk x

    Note: This is the same disk as in step 2.
     
  8. To create a VFAT file system, run the command:

    create partition primary size=4000 id=6

    Note: This command creates a primary partition on the USB key as a 4 GB volume. The GUID is id=6. The compatibility of VFAT with FAT is limited, as Windows recognizes VFAT as FAT12.
     
  9. To format the partition with FAT16 so that the ESXi/ESX host recognizes it, run the command:

    format fs=fat quick
     
  10. To close the command prompt window, run the command:

    Exit
The USB flash drive is prepared and the ESXi/ESX host is able to see it. To mount the drive on the host, perform these steps.

Note: This process requires a reboot, migrate all virtual machines to a different host and place your host in Maintenance Mode before you proceed.
  1. Connect to the ESXi/ESX host using SSH or the DCUI. For more information, see Connecting to an ESX host using an SSH client (1019852) or Using Tech Support Mode in ESXi 4.1 and ESXi 5.x (1017910).
  2. Plug the USB device in to the host.
  3. To perform a rescan on the host, run the command:

    esxcfg-rescan -A
     
  4. To scan for new volumes, run the command:

    vmkfstools -V
     
  5. To disable the USB passthrough service so that the USB drive is recognized by the host but not automatically passed through to the virtual machines that are on that host, run the command:

    chkconfig usbarbitrator off
     
  6. Run this command twice, to update the changes:

    /sbin/auto-backup.sh
     
  7. Reboot the host.
When the host reboots, it will mount as /vmfs/volumes/NO NAME. You can now transfer files to and from the USB key.

Additional Information

The USB key must be a minimum of 4 GB in size. This procedure is not recommended for basic file transfers. Identifying disks when working with VMware ESXi/ESX
Using Tech Support Mode in ESXi 4.1, ESXi 5.x, and ESXi 6.x
Connecting to an ESX host using an SSH client
Supported USB device models for passthrough from an ESX or ESXi host to a virtual machine
Cannot mount a USB key or disk device media to an ESX/ESXi host
Windows と ESXi/ESX ホスト間でファイルをやりとりするために、USB フラッシュドライブを使用する方法
配置 USB 闪存驱动器以在 Windows 和 ESXi/ESX 主机之间传输文件