VMware Cloud Community
jlymath
Contributor
Contributor
Jump to solution

Add Subscription to Local Published Content Library

Hello,

I'm seeing a strange result when trying to add a subscription to a Local Published Content Library, Here is a description of the situation:

  • Local Published Content Library (I'll call this, CL "A")
  • Subscribed Content Library (I'll call this CL "B")

I'm trying to subscribe to all Content that is in CL "A" -> CL "B". I can create CL "B" with PowerCLI, provide the CL "A" Subscription URL and sync OVA's perfectly fine.

When I try to add a subscription to CL "A" (Menu > Content Libraries > CL "A" > Actions > Edit Settings > New Subscription), CL "B" is never discovered as a subscribing Content Library. Without being able to set up this subscription, I cannot set CL "B" to get CL "A" VM Templates.

Here is the command used to create CL "B":

New-ContentLibrary -Name <CL_B_NAME> -SubscriptionURL $subscriptionURL -Password <CL_A_PASSWORD> -DownloadContentOnDemand:$true -Datastore <DATASTORE>

If I use the UI to create CL "B", it is discovered and shown as expected when trying to add a Subscription. It's only when I create the CL with PowerCLI that it isn't found. Based on the fact that it's syncing OVA templates I know the initial subscription is working, but the bi-directional relationship doesn't seem to be working properly.

My only theory is that because this is a demo environment, both Content Libraries are on the same vCenter host, which I understand is not reflective of typical usage of this feature.

 

Additionally, I'm not seeing anything in PowerCLI or API documentation that I can use to script this out. Is adding a subscription to an existing Published Content Library supported?

 

 

UPDATE:

Since it doesn't seem to be possible with PowerCLI (at least as far as I can tell), I just tried to record my browser actions with a browser-based scripting tool. This was successful in that it sets up the Subscribed Content Library in the UI, but vSphere still does not discover this Subscribed Library as expected.

Tags (2)
Reply
0 Kudos
1 Solution

Accepted Solutions
knikolov
VMware Employee
VMware Employee
Jump to solution

We figured it out. When creating the subscribed library PowerCLI removes the port number from the subscription URL. And to find which libraries are subscribed for a specific library the UI checks for all libraries that are subscribed to a specific URL (including the port number).

The workaround that you can use is as follows:

1. Go to problematic libraries in the UI and click on Edit settings
2. Update the Subscription URL to include the port number 443
3. The CLs will now be visible when trying to add a new subscription

View solution in original post

4 Replies
knikolov
VMware Employee
VMware Employee
Jump to solution

I was able to reproduce the issue and we're looking at it. I'll keep you posted when we have more information.

Reply
0 Kudos
knikolov
VMware Employee
VMware Employee
Jump to solution

I also tried to find the API information on how to create a subscription and it looks like this is the API: https://developer.vmware.com/apis/vsphere-automation/latest/content/api/content/library/library/subs.... At the bottom you can see a PowerCLI example, but I hadn't enough time to play with it and make it work

Reply
0 Kudos
knikolov
VMware Employee
VMware Employee
Jump to solution

We figured it out. When creating the subscribed library PowerCLI removes the port number from the subscription URL. And to find which libraries are subscribed for a specific library the UI checks for all libraries that are subscribed to a specific URL (including the port number).

The workaround that you can use is as follows:

1. Go to problematic libraries in the UI and click on Edit settings
2. Update the Subscription URL to include the port number 443
3. The CLs will now be visible when trying to add a new subscription

jlymath
Contributor
Contributor
Jump to solution

Awesome, thanks for looking into this! @knikolov 

Reply
0 Kudos