VMware Cloud Community
wilbecker
Contributor
Contributor

vSphere 6.7 Content Library Question

I've been looking off an on to see if this is even a possibility.

Scenario:

I have a NFS mount that is populated with build ISO's on a nightly basis.

The NFS mount is connected to vSphere

I have developers in another site needing those same ISOs.

 

They have been copying the files to their site, then uploading them to their local vCenter (which is linked to the other vCenter). I was hoping to figure out a way to dump the ISO files generated nightly into a Content Library and then have their vCenter subscribe to the Library. I've found scripts to upload, but those look to require the full path to the file. I'm looking for something that can take newly created ISO's and push them to the Library, or to have the library pull. Is it that powercli isn't the correct tool for this? If so has anyone figured this out?

0 Kudos
3 Replies
daphnissov
Immortal
Immortal

You should be able to do this with the New-ContentLibraryItem cmdlet, but it will require access to a host that has access to those ISOs. That probably is fairly obvious. There are lots of ways you could automate this process from a "utility" host which mounts that NFS export, watches for changes in a directory, and then uploads those ISOs to a given content library. From there, it's just a matter of subscribing to the library where these get published.

0 Kudos
wilbecker
Contributor
Contributor

Yes that does work for the initial push. However there are 10 GB of ISO's created each night with 80-90% of those deleted by week's end. I need to be able to add the net new ISO and remove the missing ones. Essentially looking for a way to sync the network (HTTPS shared) folder to the Content Library in one site that's then subscribed to else where.

 

I'm thinking that I may be better off to rsync the files to a machine there that is mounted of NFS to the vCenter.

0 Kudos
daphnissov
Immortal
Immortal

You could certainly rsync between exports, but it wouldn't be that big of a deal to script the upload of those ISOs with PowerShell either. Include logic that gets existing item names and cross checks it against the ISOs in the target directory. Add ones not listed, delete the others.

0 Kudos