Quantcast
Channel: VMware Communities : All Content - VMware vCloud Director
Viewing all 3544 articles
Browse latest View live

Changing the default root folder for new Tenant vCDs

$
0
0

Is it possible to change the folder path for a new Tenant vCD to use a subfolder?

 

By default, when creating a new Tenant vCD, it tries to create a folder under the root (named for the vCD install) with Tenant folders under that.

 

But we actually need to put this one level deeper.  Like this:

 

vCenter

    Datacenter

         OldBusiness

                vCD Root folder

                      vCD Tenant folders

 

Its the "old business" folder we are trying to insert.


vcdclient is not able to login using Java SDK

$
0
0

Hi,

 

We've written sample vcdClient.java and we are using vcloud-java-sdk-5.5.0.jar file to access vcloud director setup.

Using below mentioned code, we are able to create instance of vcloudClient:

VcloudClient vcloudClient = new VcloudClient(vcdUrl, Version.V5_5);

 

However, when we try to login using below code:

vcloudClient.login(userName, password);

 

We are not able to login to vCloud Director and we are getting below exception:

java.lang.StringIndexOutOfBoundsException: String index out of range: -1

    at java.lang.String.substring(Unknown Source)

    at com.vmware.vcloud.sdk.VcloudClient.login(VcloudClient.java:316)

    at com.netmagic.vmware.vcd.Vcd.getVcdClient(Vcd.java:142)

    at com.netmagic.vmware.vcd.Vcd.main(Vcd.java:51)

 

We tried to login to vCloud director setup using fully qualified path as well as using IP address.

Still for both the things we are getting the same above error.

 

Jars which we have included in our project are:

amqp-client-2.8.6.jar

commons-codec-1.6.jar

commons-logging-1.1.1.jar

httpclient-4.2.jar

httpcore-4.2.jar

rest-api-schemas-5.5.0.jar &

vcloud-java-sdk-5.5.0.jar

 

We are using Java 1.6 and we are not using SSL certificate to connect to vcloud director setup as of now.

Need help with creating vApp Networks in vCloud Director

$
0
0

Hi Team,

 

I have deployed vCD successfully and need help with create networks for vApp. I have created External Network and Org_NW with couple of IPs which are accessible over the network. Now I need to create internal network for vApps.

 

When I try to create vApp network, it says "Realization Failed" and failed to create vApp Network.

 

I am trying to use 192.168.1.x subnet for my vApp. What steps do i need to do on vsphere before i create this vApp network?

 

Raghav

Hotjar integration

$
0
0

Hi,

 

Just out of curiosity: is it technically possible to paste custom code in between the <head> tags that vCloud Director loads?

For example, we're looking at the possibility to integrate Hotjar with vCloud Director to see how our users use VCD and our custom extensions, but in order for that to work, we need to insert a few lines of javascript in the <head> tags so that Hotjar gets loaded on all pages.

Terraform and creating org with vdc

$
0
0

Hi,

 

I'm trying to automate parts of our customer onboarding process with Terraform, but I'm running in to some issues.

The idea is to have a parameters file containing the settings like customer name, usernames, passwords etc and then create an Org, VDC, orgadmin and some networks.

 

Here's how my config looks like at the moment:

resource "vcd_org" "new_org" {  name             = "${var.cust_name_short}"  full_name        = "${var.cust_name_long}"  description      = "${var.cust_name_desc}"  is_enabled       = "true"  delete_recursive = "true"  delete_force     = "true"  can_publish_catalogs = "false"
}


#
# We need to create a customer admin user
#

resource "vcd_org_user" "vcduser" {
  org = "${var.cust_name_short}"  name          = "${var.cust_admin_user}"  description   = "${var.cust_admin_desc}"  role          = "Organization Administrator"  password      = "${var.cust_admin_pass}"
}


resource "vcd_org_vdc" "orgvdc" {
  name = "${var.cust_vdc_name}"  description = "${var.cust_vdc_desc}"  org = "${var.cust_name_short}"  allocation_model = "AllocationVApp"  network_pool_name = "Labb VDC-VXLAN-NP"  provider_vdc_name = "Labb VDC"  storage_profile {    name = "vCloud Storage"    default = true    limit = 0  }  compute_capacity {    cpu {      #    }    memory {      #    }  }  enabled = true  enable_thin_provisioning = true  enable_fast_provisioning = true  delete_force = true  delete_recursive = true

}

 

The issue I'm encountering is this:

vcd_org_vdc.orgvdc: Creating...

vcd_org.new_org: Creating...

vcd_org_user.vcduser: Creating...

vcd_org.new_org: Creation complete after 1s [id=e204ec9b-90d2-4fb9-9b64-1d5700ba2dfd]

 

Error: couldn't find org with name: TestCust1. Please check Org name as it is case sensitive

 

  on customer.tf line 33, in resource "vcd_org_user" "vcduser":

  33: resource "vcd_org_user" "vcduser" {

 

 

 

Error: error retrieving Org: error retrieving Org TestCust1: couldn't find org with name: TestCust1. Please check Org name as it is case sensitive

 

  on customer.tf line 43, in resource "vcd_org_vdc" "orgvdc":

  43: resource "vcd_org_vdc" "orgvdc" {

TestCust1 is the cust_name_short variable, so the org is created sucessfully but the user is not created since I get an error.

 

Any help would be appreciated!

Terraform and edge gateways

$
0
0

Hi,

 

Has anyone got any idea how to get the assigned external IP address of an edge gateway deployed with Terraform?

The reason for asking is that I'm trying to automate a workflow for adding new customers, and I'd like to add some standard DNAT/SNAT-rules in the edge, but I need the creation of the edge gateway to somehow provide me with the assigned IP address.

unable to create VM via vcloud API

$
0
0

Hi,

 

I have an Ubuntu template in a public catalog and I was not able to instantiate an isolated VM from it via vCloud API.

Obs: I am testing against a vCloud 9.7 instance.

 

1- instantiateVmFromTemplate API

My first attempt was to call the instantiateVmFromTemplate API with very simple XML like this:

POST https://vcd01/api/vdc/c78e7423-ef80-4d50-bbea-3d58cf188ab9/action/instantiateVmFromTemplate

'Accept: application/*+xml;version=32.0'

'Content-Type: application/vnd.vmware.vcloud.instantiateVmTemplateParams+xml'

<InstantiateVmTemplateParams xmlns="http://www.vmware.com/vcloud/v1.5" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" name="myUbuntu02">

    <SourcedVmTemplateItem>

        <Source href="https://vcd01/api/vAppTemplate/vappTemplate-f835057c-2138-436f-9f34-3e3008d82030" id="urn:vcloud:vapptemplate:f835057c-2138-436f-9f34-3e3008d82030"/>

    </SourcedVmTemplateItem>

</InstantiateVmTemplateParams>

 

The response was HTTP Status 400 and response XML with:

majorErrorCode="400"

message="Wrong resource type null, expected application/vnd.vmware.vcloud.vm+xml"

minorErrorCode="BAD_REQUEST"

 

2- createVM API

So I tried the createVM API again with very simple XML payload like this:

POST https://vcd01/api/vdc/c78e7423-ef80-4d50-bbea-3d58cf188ab9/action/createVm

'Accept: application/*+xml;version=32.0'

'Content-Type: application/vnd.vmware.vcloud.CreateVmParams+xml'

<CreateVmParams xmlns="http://www.vmware.com/vcloud/v1.5" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" xmlns:environment_1="http://schemas.dmtf.org/ovf/environment/1" name="myUbuntu01">

    <Description>created by cloud-server</Description>

    <CreateVm name="myUbuntu01"/>

</CreateVmParams>

 

The response was HTTP Status 400 and response XML with:

majorErrorCode="400"

message="[ ec1f6a9e-c519-4ae5-8d6b-ad289282e1ad ] The value for Number of CPUs must be above zero. You provided &lt;null&gt;."

minorErrorCode="BAD_REQUEST"

 

The odd part of this response is that I could not see a request parameter to fill in this information.

 

3- instantiateVAppTemplate API

Than I tried instantiateVAppTemplate API with success:

POST https://vcd01/api/vdc/c78e7423-ef80-4d50-bbea-3d58cf188ab9/action/instantiateVAppTemplate

'Accept: application/*+xml;version=32.0'

'Content-Type: application/vnd.vmware.vcloud.instantiateVAppTemplateParams+xml'

<vcloud:InstantiateVAppTemplateParams xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"

        deploy="true" name="apiTest" powerOn="false">

    <vcloud:Description>my last test</vcloud:Description>

    <vcloud:Source href="https://vcd01/api/vAppTemplate/vappTemplate-f835057c-2138-436f-9f34-3e3008d82030" id="urn:vcloud:vapptemplate:f835057c-2138-436f-9f34-3e3008d82030"/>

</vcloud:InstantiateVAppTemplateParams>

 

For this one I had a HTTP Status OK and the vAPP+VM were created.

 

Conclusion

As I need to reproduce via API the vCloud web interface behaviour where we can launch a new isolated VM from an existing template (Virtual Machines -> New VM -> from template models -> select template), can anyone see what I am doing wrong?

Or it looks like a vCloud API application bug?

Append dFW Section when enabeling dFW in OrgVDC


ovftool export meet error: ChecksumMismatchException

$
0
0

@

Hi,

I tried to download vapp template by following command:

 

ovftool --X:skipContentLength --skipManifestCheck 'vcloud://mhcai:123456@135.2.200.140:443?org=pcmcas&vdc=PCMCAS-large&vappTemplate=mcasToolkitNew' /root/mhcai/vcloudtoolkitTemp.ova

 

but it finally failed with following error:

Opening vCloud source: vcloud://mhcai@135.2.200.140:443/

Waiting for task on server ...................................................................................................................................................................................................done

Error: Task failed (500:INTERNAL_SERVER_ERROR) : [ 6406dbee-1913-4193-81d5-6d1bc1c8d230 ] Unable to perform this action. Contact your cloud administrator.

Completed with errors

 

and in vcd log: it indicated:

com.vmware.vcloud.val.exceptions.ChecksumMismatchException: Checksum of the downloaded file (vm-c5d80d5e-f9f1-406e-9098-440f33437a55-disk-1.nvram) and the one in the manifest does not match.

        at com.vmware.vcloud.val.internal.impl.ExportVmToOvfActivity$InitiateExportPhase.downloadFileFromVc(ExportVmToOvfActivity.java:280)

        at com.vmware.vcloud.val.internal.impl.ExportVmToOvfActivity$InitiateExportPhase.downloadFilesFromLease(ExportVmToOvfActivity.java:236)

        at com.vmware.vcloud.val.internal.impl.ExportVmToOvfActivity$InitiateExportPhase.invoke(ExportVmToOvfActivity.java:179)

        at com.vmware.vcloud.activity.executors.ActivityRunner.runPhase(ActivityRunner.java:175)

        at com.vmware.vcloud.activity.executors.ActivityRunner.run(ActivityRunner.java:112)

        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

        at java.util.concurrent.FutureTask.run(FutureTask.java:266)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

        at java.lang.Thread.run(Thread.java:748)

                                                     

 

Did someone has any suggestions?

 

Thanks

Vcloud director 9.7.0 SAML authentication issue

$
0
0

Hi All,

 

I have one query regarding SAML issue.

 

My setup:- vcloud director integration with duo security(like OKTA setup)

 

We completed the setup with VCD/DUO(with ADFS)–>When i try to login my vCloud director,First authentication is AD credentials(its successful) and second authentication is DUO push(to my mobile-->Its also successful)).Everything is working fine.After approving the DUO push from my mobile,it is landing to VCD page where we are getting error “SAML authentication failed for this organization”

Else“Use integrated authentication”.If i use this Integrated auth(VCD local account),everything will work as this VCD local admin login page.

 

How to mitigate the SAML authentication issue ? Any ideas?   

 

DUO Security  provider admin console SAML response fields:-

 

Thanks,

Manivel R

VM / Template / Alternative storage policies

$
0
0

Hello everyone,

 

I got a error when deploying a VM from an existing template (template from a shared catalog , available to all tenant).

 

To be precise, i got the error when trying to deploy the vm to a different storage policies than the shared catalog's storage polices. Here is the message "The operation is not supported on the object. " and under vCenter, the error says that it is not possible to change storage policies during cloning operation.

 

By away, if i deploy the vm on the same storage policies, it works fine, i got the root cause: during cloning operation (deploy from template), we can only create vm on the same source storage policie. This method does not fit our vision, we need our customers to create vm from our ISO on alternative storage policies (SAS,SSD,SATA).

 

Do you share a catalog with ISO for customers ? If yes, how ?

 

Best regards

how to config Cross OrgvDC-A VM move or copy to OrgvDC-B from vCD9.7 ?

$
0
0

my Lab

2 vCenter,

vCenterA and vCenterB

 

vCD9.7

Provider vDCs

vCenterA and vCenterB

 

is both assign to Org A

vCenterA>>OrgA_vDCA

vCenterB>>OrgA_vDCB

 

Q:

how to move or copy VM to OrgA_vDCB from OrgA_vDCB

vCloud director 9.7 API - create new logical VM group

$
0
0

Hi,

 

I started to explorer API and did some basic stuff. Now I want to create new VM logical group, but I'm out of understanding.

According VMware documentation syntax should be like this:

 

/cloudapi/1.0.0/logicalVmGroups

{
 
"id":"string",
 
"description":"string",
 
"name":"string",
 
"namedVmGroupReferences":[
  
{
  
"name":"string",
  
"id":"string"
  
}
 
]
}

 

I'm not familiar with VMware API and confused what I should put in ID? Searched API documentation, but can't find answer.

Thanks!

VCD 9.8 - changing VIDEO MEMORY

$
0
0

Hi,

 

I'm the ORG admin of VCD which is running on 9.8. For a tenant VM, how do I increase the VIDEO memory? I've searched and I'm unable to find the options. I've looked through the FLEX UI and the HTML5 UI.

Please advise.

 

Thanks.

Capture vApp to template via API

$
0
0

Hi,

 

I want to create template from vApp and also as parameter include vdc compute policy. Main goal is separate win OS on selected hosts.

Successfully created  template via API without "CaptureVmParams" elements, but when I add these parameters call fails with 500 error code.

VM link I think is correct because I can browse VM parameters using this link also VDC policy is in place. What I'm missing?

 

POST https://1.1.1.1/api/catalog/f4382924-bf6c-44f0-9c0a-7263e5bab8db/action/captureVApp

 

<?xml version="1.0" encoding="UTF-8"?>

<CaptureVAppParams

   xmlns="http://www.vmware.com/vcloud/v1.5"

   name="Example Corp’s CRM Appliance">

   <Description>Captured CRM Appliance</Description>

   <Source

      href="https://1.1.1.1/api/vApp/vapp-bcb173ad-3c43-4f38-8d4d-29c294ea3a21" />

   <CaptureVmParams>

         <Source href="https://1.1.1.1/api/vApp/vm-e0b95812-88e1-4bf7-81f4-da630335ebc4" />

  <VdcComputePolicy

        href="https://1.1.1.1/cloudapi/1.0.0/vdcComputePolicies/urn:vcloud:vdcComputePolicy:87d220b1-2ff7-4e9b-bd28-5a99048e5648"

          name="WIN" />

</CaptureVmParams>

  </CaptureVAppParams>

 

 

Thanks!


Change default NIC type for VMs

$
0
0

Hi,

 

is there any way to change the default NIC type of new created NICs of vCD VMs?

If i add an extra nic to a Win2K12 vm it will be E1000e instead of our prefeerd vmxnet3.

 

Kind regards

pfSense as internal FW

$
0
0

Hello

 

Im new to vCloud which is being supplied by a third party and am trying to get a pfsense to act as an edge firewall to distribute traffic from the edge gateway to the approprite internal network. I am not sure if my goal is possible, the diagram below gives rough idea of what I am trying to do. Thanks

 

 

--------------------------------------------------------

                       edge router

--------------------------------------------------------

                                   |

                                   |

--------------------------------------------------------

                              pfsense

--------------------------------------------------------

         |                          |                      |

         |                          |                      |

vapp network     vapp network    vapp network

All vApp Access rights in Roles

$
0
0

Hello,

 

i'm playing with the access rights and roles in vCD.

I created a new role which has more rights than vApp Author but less than an Organization Administrator.

By default a vApp Author only can see and access it's own vms while an OrgAdmin can see and access all VMs.

My new created role can only see and access it's own created VMs and I can't find the permission setting in the role to give the new created role access to all VMs within the OrgVDC.

Any idea?

CSE 2.0 installation error

$
0
0

While installing CSE 2.0.0 extension with command cse install -c ./config.yaml i got error during execution of cust-ubuntu-16.04.sh script.

There was a wrong command in cust-ubuntu-16.04.sh because i edited script earlier, so i fixed it.

Then i deleted extension via vcd-cli, temporary template and ova file were deleted manually (and i guess there was a mistake, i should use --update flag with cse install command).

Then i rerun cse install -c ./config.yaml (without --update).

Then i got error below. Temporary VM rebooted twice, and just before executing cust-ubuntu-16.04.sh inside VM, all process crashed.

pyVmomi.VmomiSupport.vim.fault.InvalidGuestLogin: (vim.fault.InvalidGuestLogin) {

   dynamicType = <unset>,

   dynamicProperty = (vmodl.DynamicProperty) [],

   msg = 'Failed to authenticate with the guest operating system using the supplied credentials.',

   faultCause = <unset>,

   faultMessage = (vmodl.LocalizableMessage) []

}

 

 

Traceback (most recent call last):

  File "/usr/local/lib/python3.7/site-packages/container_service_extension/config.py", line 587, in create_template

    vapp = VApp(client, resource=vdc.get_vapp(vapp_name))

  File "/usr/local/lib/python3.7/site-packages/pyvcloud/vcd/vdc.py", line 141, in get_vapp

    return self.client.get_resource(self.get_resource_href(name))

  File "/usr/local/lib/python3.7/site-packages/pyvcloud/vcd/vdc.py", line 108, in get_resource_href

    raise EntityNotFoundException('vApp named \'%s\' not found' % name)

pyvcloud.vcd.exceptions.EntityNotFoundException: vApp named 'ubuntu1604-temp' not found

 

 

During handling of the above exception, another exception occurred:

 

 

Traceback (most recent call last):

  File "/usr/local/bin/cse", line 10, in <module>

    sys.exit(cli())

  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 764, in __call__

    return self.main(*args, **kwargs)

  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 717, in main

    rv = self.invoke(ctx)

  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1137, in invoke

    return _process_result(sub_ctx.command.invoke(sub_ctx))

  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 956, in invoke

    return ctx.invoke(self.callback, **ctx.params)

  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 555, in invoke

    return callback(*args, **kwargs)

  File "/usr/local/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func

    return f(get_current_context(), *args, **kwargs)

  File "/usr/local/lib/python3.7/site-packages/container_service_extension/cse.py", line 227, in install

    amqp_install=amqp_install, ext_install=ext_install)

  File "/usr/local/lib/python3.7/site-packages/container_service_extension/config.py", line 516, in install_cse

    org=org)

  File "/usr/local/lib/python3.7/site-packages/container_service_extension/config.py", line 601, in create_template

    ssh_key)

  File "/usr/local/lib/python3.7/site-packages/container_service_extension/config.py", line 660, in _create_temp_vapp

    is_photon=is_photon)

  File "/usr/local/lib/python3.7/site-packages/container_service_extension/config.py", line 754, in _customize_vm

    callback=vgr_callback())

  File "/usr/local/lib/python3.7/site-packages/vsphere_guest_run/vsphere.py", line 203, in execute_script_in_guest

    self.upload_file_to_guest(vm, user, password, content, target)

  File "/usr/local/lib/python3.7/site-packages/vsphere_guest_run/vsphere.py", line 143, in upload_file_to_guest

    False)

  File "/usr/local/lib/python3.7/site-packages/pyVmomi/VmomiSupport.py", line 706, in <lambda>

    self.f(*(self.args + (obj,) + args), **kwargs)

  File "/usr/local/lib/python3.7/site-packages/pyVmomi/VmomiSupport.py", line 512, in _InvokeMethod

    return self._stub.InvokeMethod(self, info, args)

  File "/usr/local/lib/python3.7/site-packages/pyVmomi/SoapAdapter.py", line 1374, in InvokeMethod

    raise obj # pylint: disable-msg=E0702

pyVmomi.VmomiSupport.InvalidGuestLogin: (vim.fault.InvalidGuestLogin) {

   dynamicType = <unset>,

   dynamicProperty = (vmodl.DynamicProperty) [],

   msg = 'Failed to authenticate with the guest operating system using the supplied credentials.',

   faultCause = <unset>,

   faultMessage = (vmodl.LocalizableMessage) []

I cant login into temporary VM with autogenerated password from VM's Guest OS Customization section.

I particularly solved this problem by renaming temporary vApp in config.yaml (temp_vapp).

After that renamimg cse install -c ./config.yaml worked fine, then i successefully created k8s cluster via vcd cse command.

But from time to time i get the same error as above even when use --update flag. And afrer renaming temp_vapp, it works again.

Could somebody tell is this some CSE version's bug or feature? Or its just my bad knowledge of documentation?

Adding External Network via REST API is not working on vCD 9.7

$
0
0

Hi,

 

I'm using vCloud Director 9.7 With NSX-T.

 

Due to HTML5 UI is not working with full functionality, It needs to be make some configurations with the REST API such as adding Provider vDC, adding External Network etc...

 

I'm triying to add an External network with the REST API according to "vCloud API Programming Guide for Service Providers"  document, But i am getting an error.  Because, the POST parameters specified in the document belongs to old version of vCloud Director.

 

Because, the procedure of adding external network is different from the old. I think the api document is not updated.

 

How can i find new post parameters ?

Viewing all 3544 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>