ESXI datastore (synoboot) on a USB stick?


Recommended Posts

Overview:

 

I am running a Dell R230 1U rackmount server. It has 4 hard disk bays.

 

At present, I am 'wasting' the 1st disk bay as my ESXI VM datastore, but I am interested to see if I can refactor this in order to allow me to pass all 4 hard disk bays through to Xpenology.

 

Background:

 

On my first attempt at using Xpenology, I used Jun's loader to do the following:

  • I installed ESXI to the internal USB stick and I boot ESXI from that USB stick
  • My first physical hard disk is a 500GB unit. I have the full 500GB set up as my VM datastore.
    • Within that datastore I have a folder for Xpenology (containing synoboot.img and synoboot.vmdk) and a folder for 'NAS' (containing .vmdk files for the physical disks that I am passing through to Xpenology and various vmware.log files)
    • Synoboot.vdmk is set up as a 50MB thinly provisioned disk on SATA controller 0:0
    • The 'NAS' VM datastore is set up as a 50GB thinly provisioned disk on SATA controller 1:0
  • I then pass through physical disks 2, 3 and 4 on SATA controller 1:1, 1:2, and 1:3, respectively.

 

My question:

 

Is it possible to set up a, say, 128GB USB stick as my VM datastore, such that I boot ESXI from USB stick #1, store the VM datastore on USB stick #2 and then pass through all four of my physical disks to Xpenology?

 

I believe the simple answer is probably "Yes - it is possible". My next question is "should I do this"?

 

I am specifically concerned about USB wear over time. Initial boot of ESXI and Xpenology into memory is low impact to the USB stick, but I am worried about constant log file / scratch file writing to the USB sticks. Is it possible to set up ESXI and the Xpenology VM datastore such that there is no writing to the USB sticks?

Edited by HerbertJ
Link to post
Share on other sites

 

how about adding a pcie card with a m.2 slot, add a small/cheap m.2 nvme and have esxi run from this, using the whole controller with its 4 disks in passthrough or rdm the 4 disks to dsm vm, the rest of the nvme ssd could also be used as virtual ssd's for dsm as cache drives(s), when its two virtual ssd's it could be a r/w cache (its risky as its not redundant in hardware, with just one ssd as cache its only read cache and thats not very effective in most home use scenarios)

 

also you could use all 4 disk as vmfs store and have thick 4 thick vmdk files the size of the disk minus ~100MB (1st disk still holds vmdk for booting)

that way you would have 4 virtual disks of the same size to use in dsm

 

other option could be to use the raid controller in raid mode and have  the whole spase as one vmfs, use just 50mb fot the boot vmdk and the rest as vmdk for dsm, that would be a basic disk in dsm and the raid redundancy is in esxi with the driver of the controller

 

why not running dsm baremetal if its the only thing that runs on this hardware?

 

Edited by IG-88
Link to post
Share on other sites
  • 1 month later...

I managed to get this working with ESXi 7.0. I used two USB Flash drives, one to install ESXi on and boot from, the other as a datastore. With 7.0, it will use up to 128GB of the install drive, so you would need something bigger than that to boot and have a datastore on the same disk (SSD or Flash for that matter). By default, datastores on removable storage are not automatically mounted, so you need to enable SSH and login to the vmware console. You will need to run the first command to find the details for your Flash Drive and then run the second command to have vmware pass it thru at boot up.

“Selective Disable USB”

#esxcli hardware usb passthrough device list

enter the Bus#,Dev#,vendorId and productId of the device in the format Bus#:Dev#:vendorId:productId using hexadecimal values

esxcli hardware usb passthrough device disable -d 1:3:456:7890                 (Example string)

 

I got it working but ultimately decided to use a 120gb SSD drive instead. It was just a more straight forward setup and seemed more dependable considering I wasn’t restricted by drive bays in my setup. Moving the USB drive to a different port or swapping the drive will require running the commands again. I would label the flash drives/USB ports so if removed you won't lose track putting them back. I was afraid that troubleshooting down the road might leave me scrambling to find my notes on this as it was not something many people do.

 

Lastly, I believe there was an issue of not having any local swap/log dump space for ESXi. It will use ramdisk so logs are lost at reboot. Just some things to keep in mind when using this setup.

Link to post
Share on other sites
  • 2 weeks later...

You will need 2 USB drives - first 8-16GB size and second at least 32GB (bigger = better = more space for datastore).

Create ESXI installer on smaller one, stick it to server.

When installing ESXI (i'm using version 7 don't know if this will work with 6.x) do same as NetworkChuck did on his RaspberryPi:

 

So during boot edit command:

runweasel cdromBoot

to look like this:

runweasel cdromBoot autoPartitionOSDataSize=8192

This way ESXI partitions will be limited to 8GB (you can use 16GB = 16384 to be sure that future updates install without issues).

Install ESXI on bigger USB drive and after that you end up with datastore on same drive.

Edited by jerry1333
Link to post
Share on other sites
  • 1 month later...

OP asked about putting the synoboot image in a datastore on a USB drive. I  wanted to create USB drives with the latest version of 6.5, 6.7 and 7.0 to test which ones would boot on a variety of PCs and learned that one could create a datastore on the ESXi boot drive itself! The following link was instrumental.

 

https://www.horizonbits.com/2017/02/19/squeezing-esxi-on-usb/
 

I haven't tried it as a datastore for deployment though.

Edited by unmesh
Clarity
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.