---
title: 'Quick Tip: Use USB storage devices as datastore on VMware ESXi'
url: 'https://patrik.kernstock.net/blog/quick-tip-use-usb-storage-devices-as-datastore'
markdown: 'https://patrik.kernstock.net/blog/quick-tip-use-usb-storage-devices-as-datastore.md'
date: '2020-09-12'
description: 'When attaching any kind of USB devices, the service usbarbitrator claims those devices to allow passing through USB devices into virtual machines. This is (one of) the reason you won’t see USB sticks as "Storage Devices" on your ESXi, therefore not allowing you to create a datastore on it. But at this point you have to make a decision, as you can’t have both: Using a USB device as a storage OR having the ability to passthrough USB devices to VMs Just to be very clear: This is NOT officially supported by VMware. You should not use datastores on USB devices in production. If you decide to go ahead… To temporarily workaround this, it’s possible to stop this service by using: /etc/init.d/usbarbitrato'
taxonomy:
  category:
    - VMware
    - vSphere
  tag:
    - ESX
    - QuickTip
    - Storage
---

# [Quick Tip: Use USB storage devices as datastore on VMware ESXi](https://patrik.kernstock.net/blog/quick-tip-use-usb-storage-devices-as-datastore)

   September 12, 2020    2 min 

   [VMware](https://patrik.kernstock.net/category:VMware) [vSphere](https://patrik.kernstock.net/category:vSphere)    [ESX](https://patrik.kernstock.net/tag:ESX) [QuickTip](https://patrik.kernstock.net/tag:QuickTip) [Storage](https://patrik.kernstock.net/tag:Storage)  

 Note

This article is more than 6 year(s) old – information may be outdated.

 ![Quick Tip: Use USB storage devices as datastore on VMware ESXi](https://patrik.kernstock.net/images/i/m/a/g/e/image-1599938694854-800ad1db.png?g-b3a1b014 "Quick Tip: Use USB storage devices as datastore on VMware ESXi") 

When attaching any kind of USB devices, the service `usbarbitrator` claims those devices to allow passing through USB devices into virtual machines. This is (one of) the reason you won’t see USB sticks as "Storage Devices" on your ESXi, therefore not allowing you to create a datastore on it.

But at this point you have to make a decision, as you can’t have both:

1. Using a USB device as a storage
2. OR having the ability to passthrough USB devices to VMs

**Just to be very clear**: This is **NOT** officially supported by VMware. You should not use datastores on USB devices in production.

If you decide to go ahead…

To temporarily workaround this, it’s possible to stop this service by using:

```sh
/etc/init.d/usbarbitrator stop
```

After re-plugging in the USB device, you should finally see the storage device. Then you’re able to create a datastore on it as you would do on any other storage device.

Very important to note: The service `usbarbitrator` starts when rebooting the ESXi host. After the reboot you would see the storage device as being "Dead" and not accessible.

You might have guessed the reason: It’s because the service started again and claimed those USB device.

For a permanent and reboot-proof solution, you can disable the UsbArbitrator service from starting with ESXi:

```sh
vim-cmd hostsvc/advopt/update Misc.UsbArbitratorAutoStartDisabled int 1
```

To check the state:

```sh
vim-cmd hostsvc/advopt/view Misc.UsbArbitratorAutoStartDisabled
(vim.option.OptionValue) [
   (vim.option.OptionValue) {
      key = "Misc.UsbArbitratorAutoStartDisabled",
      value = 1
   }
]
```

Now you can use the datastore for scratch location and for the coredump file on a USB device just fine:
![file](https://patrik.kernstock.net/user/pages/01.blog/2020-09-12-quick-tip-use-usb-storage-devices-as-datastore/image-1599938694854.png?g-b3a1b014 "image-1599938694854")

**Just why?**
As I’m using vSAN in my smaller HomeLab which doesn’t support scratch location and coredump files on there, I’ve needed an alternative place to store these files to. I’ve decided to go for a simple USB stick.

So, to enable scratch location and coredump file on a datastore via CLI you can use (after datastore being mounted and accessible):

```sh
mkdir /vmfs/volumes/ieesxi01Local/.locker
vim-cmd hostsvc/advopt/update ScratchConfig.ConfiguredScratchLocation string /vmfs/volumes/ieesxi01Local/.locker

esxcli system coredump file add -d=ieesxi01Local
esxcli system coredump file set -s -e=true
```

And then reboot.

##     Comments    

 Sort by: 

Loading comments...

---

## Navigation

- Parent: [Blog](https://patrik.kernstock.net/index.md)
- Previous: [vCenter 7.0, Lifecycle Manager fails downloading depot metadata & proxy](https://patrik.kernstock.net/blog/vcenter-7-0-lifecycle-manager-fails-downloading-depot-metadata-proxy.md)
- Next: [piler installation guide](https://patrik.kernstock.net/blog/mailpiler-installation-guide.md)
