VMware {code} Community
RaameshKeerthi
Contributor
Contributor

Disk Defragmentation not Supported...

Hi,

I tried to execute the below code but exception has been thrown can, anybody know this root cause of this problem?


//VimPortType service; code goes on.....


service.defragmentAllDisks(mor);

but exception has been thrown while invoking the defragmentAllDisks(mor),

the error message is     Error occured while defragmenting the disks...com.vmware.vim25.NotSupported

Why it is not supported???

Thanks and Regards

Raamesh Keerthi N.J,

Raamesh Keerthi N.J.| http://www.twitter.com/raameshkeerthi
0 Kudos
2 Replies
Steve_Jin
Expert
Expert

It could be caused by license, or wrong target server type (ESXi or vCenter).

BTW, you may want to try open source vijava api for faster, cleaner code. http://vijava.sf.net, first 5 minute tutorial: http://vijava.sourceforge.net/doc/getstarted/tutorial.htm

Good luck!

Steve JIN Author of VMware VI and vSphere SDK; Creator of open source VI Java API (http://vijava.sf.net); Blogger at http://www.doublecloud.org
RaameshKeerthi
Contributor
Contributor

Thank Steve BTW let me know whether defragmentation is a necessary one...

because in some forums they said that fragmentation will not be happen in virtual Disks....

Raamesh Keerthi N.J.| http://www.twitter.com/raameshkeerthi
0 Kudos