Hi All,
Is it possible to add a new hard disk to the VM while composing a Vapp using a vappTemplate?
I have tried adding the VirtualHardwareSection in the InstantiationParams of the VM as below. I get the compose Vapp success, but the hard disk is not being added. It is completely ignoring the VirtualHardware Section I had specified.
InstantiationParamsType vmInstantiationParamsType = new InstantiationParamsType(); List<JAXBElement<? extends SectionType>> vmSections = vmInstantiationParamsType.getSection(); vmSections.add(new ObjectFactory().createNetworkConnectionSection(networkConnectionSectionType)); vmSections.add(new ObjectFactory().createGuestCustomizationSection(guestCustomizationSectionType) ); vmSections.add(new com.vmware.vcloud.api.rest.schema.ovf.ObjectFactory().createVirtualHardwareSection(addNewDisk("Hard Disk 2", "4096"))); vappTemplateItem.setInstantiationParams(vmInstantiationParamsType);
Thanks,
Ramakrishna.