[vi-admin@scofield ~]$ ./rdmManagmement.pl --server esx40-1.primp-industries.com --username root --vmname rdmVM --operation query
Enter password:
Device Name: /vmfs/devices/disks/eui.caa68a778fc27982
Capacity: 30.00 GB
Device Name: /vmfs/devices/disks/eui.1f79d354801b3936
Capacity: 1000.00 MB
Device Name: /vmfs/devices/disks/eui.8f713e8e3c0a58d2
Capacity: 1.95 GB
Device Name: /vmfs/devices/disks/eui.c028c79e0ee07daa
Capacity: 28.00 GB
[vi-admin@scofield ~]$ ./rdmManagmement.pl --server esx40-1.primp-industries.com --username root --vmname rdmVM --operation add --device /vmfs/devices/disks/eui.8f713e8e3c0a58d2 --compatmode physical --filename databaseRDM.vmdk
Enter password:
Creating and adding "physicalMode" RDM: "databaseRDM.vmdk" to rdmVM ...
Successfully added RDM to VM!
[vi-admin@scofield ~]$ ./rdmManagmement.pl --server esx40-1.primp-industries.com --username root --vmname rdmVM --operation destroy --filename databaseRDM.vmdk
Enter password:
Destroying RDM: "databaseRDM.vmdk" to rdmVM ...
Successfully destroyed RDM to VM!
Comments |
|
Nov 11, 2009 8:15 AM
lamw says:
in response to: rub1
I don't think you understand what an RDM is ... it can be both physical and virtual and has nothing to do wit normal virtual disks. You've seen to have posted all over the forums but I've already created a fully functional script that allows you to add existing VMDK(s) to a VM: vmdkManagement.pl. If you need further clarification, please post on your original thread versus going all over the forums. These scripts are intended to provide functional sample code performing certain operations using the vSphere API's, if you have a more specific use case then you're more than welcome to extend and modify any of the scripts that I've or others have created. ========================================================================= William Lam VMware vExpert 2009 VMware ESX/ESXi scripts and resources at: http://engineering.ucsb.edu/~duonglt/vmware/ Twitter: @lamw vGhetto Script Repository Getting Started with the vMA (tips/tricks) Getting Started with the vSphere SDK for Perl VMware Code Central - Scripts/Sample code for Developers and Administrators VMware Developer Comuunity If you find this information useful, please award points for "correct" or "helpful". |
Hi Lamw
I am looking for a similar script that does the same but with virtual disks
which are not rdm.
can I use the rdmManagement.pl current script with " --compatmode virtual" to achieve this task ?
( I guess no..)
thanks
rub1