Hello, i'm trying to do the call directly to vsphere...
i need help for this call: vSphere Documentation Center <http://pubs.vmware.com/vsphere-50/index.jsp?topic=%2Fcom.vmware.wssdk.apiref.doc_50%2Fvim.VirtualDiskManager.html> (ExtendVirtualDisk_Task)
I'm unable to pass a correct value for parameter *name.* I'm trying the call from: https://myaddress/mob/?moid=virtualDiskManager&method=queryVirtualDiskFragmentation When i try to insert an URL formatted as manual specs: /scheme/:///authority//folder//path/?dcPath=/dcPath/&dsName=/dsName/ result is: INVALID ARGUMENT for NAME If i give a simple test string like: *test* *the call is ok with response: *task-4426 but in vsphere i receive this error: /Extend virtual disk The request refers to an unexpected or unknown type./ Someone know the right way to invoke this request? Thanks a lot. Il 19/09/2013 16:07, Marcus Sorensen ha scritto:
Something like this for 4.2... for 4.1 it would be pretty much the same, just that in 4.1 the code was in StorageManagerImpl.java iff --git a/server/src/com/cloud/storage/VolumeManagerImpl.java b/server/src/com/cloud/storage/VolumeManagerImpl.java index 1d6b44f..4ef57ed 100644 --- a/server/src/com/cloud/storage/VolumeManagerImpl.java +++ b/server/src/com/cloud/storage/VolumeManagerImpl.java @@ -1110,17 +1110,12 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager { "Volume should be in ready state before attempting a resize"); } - if (!volume.getVolumeType().equals(Volume.Type.DATADISK)) { - throw new InvalidParameterValueException( - "Can only resize DATA volumes"); - } - /* * figure out whether or not a new disk offering or size parameter is * required, get the correct size value */ if (newDiskOffering == null) { - if (diskOffering.isCustomized()) { + if (diskOffering.isCustomized() || volume.getVolumeType().equals(Volume.Type.ROOT)) { newSize = cmd.getSize(); if (newSize == null) { @@ -1135,6 +1130,10 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager { + " cannot be resized, need to specify a disk offering"); } } else { + if (!volume.getVolumeType().equals(Volume.Type.DATADISK)) { + throw new InvalidParameterValueException( + "Can only resize DATA volumes via new disk offering"); + } if (newDiskOffering.getRemoved() != null || !DiskOfferingVO.Type.Disk.equals(newDiskOffering On Tue, Sep 17, 2013 at 11:02 AM, Marcus Sorensen <shadow...@gmail.com> wrote:Yes On Sep 17, 2013 11:01 AM, "Mike Tutkowski" <mike.tutkow...@solidfire.com> wrote:Just checking on something. If you spin up a VM based on an ISO, the ROOT disk size is based on the selected disk offering, right? On Tue, Sep 17, 2013 at 6:33 AM, Antonio Petrocelli < a.petroce...@netsons.com> wrote:Thanks a lot for reply. Do you know how change the code? Il 17/09/2013 14:22, Marcus Sorensen ha scritto: You'd need to make minor code changes to remove the check in the code andrecompile. It should otherwise work, its just that traditionally root disk size is based on template size, while data disks are based on disk offerings. Not everyone wants root resize, e.g. if they are billing based on disk offering rather than checking actual vol size. You could request an enhancement where root resize can be enabled via config parameter. On Sep 17, 2013 4:28 AM, "Antonio Petrocelli" <a.petroce...@netsons.com> wrote: Hello,is there a way to resize the ROOT disk of a vm? API reply is: *Can only resize DATA volumes* Does anyone know a method to bypass that control? Thanks a lot. Regards.-- *Mike Tutkowski* *Senior CloudStack Developer, SolidFire Inc.* e: mike.tutkow...@solidfire.com o: 303.746.7302 Advancing the way the world uses the cloud<http://solidfire.com/solution/overview/?video=play> *™*
smime.p7s
Description: Firma crittografica S/MIME