VMware Cloud Community
Umapat77
Contributor
Contributor

New-Hardisk and RDM issues

While trying to add a new raw disk to a VM, it is throwing the error "A general system error occurred: Error creating disk Function not implemented".  But the same is happening fine when I tried to do through vsphere client.

New-HardDisk

-VM "myvm1" -DiskType rawPhysical -DeviceName "/vmfs/devices/disks/naa.6090a03800ff58405ce2b4e13901e00f"

Then the system spits out this error:

New-HardDisk : 7/20/2011 10:32:02 AM New-HardDisk The operation for the entity Vi

rtualMachine-vm-73 failed with the following message: "A general system error occurred: Err

or creating disk Function not implemented"

At line:1 char:13

+ New-HardDisk <<<< -VM "myvm1" -DiskType rawPhysical -DeviceName "/vmfs/devices/disks/n

aa.6090a03800ff58405ce2b4e13901e00f"

+ CategoryInfo : NotSpecified: (:) [New-HardDisk], SystemError

+ FullyQualifiedErrorId : Client20_TaskServiceImpl_CheckServerSideTaskUpdates_Operatio

If someone can lead me in the right direction, I would greatly appreciate it.

0 Kudos
3 Replies
Deepikap
Contributor
Contributor

Hi ,

Have you tried giving variables for the input for -VM and -DeviceName i.e

$vm= get-vm myvm1

$deviceName=($host1 | get-Scsilun | where {$_.CanonicalName -match "naa"})[0].ConsoleDeviceName  where the value in the [] depends where your naa id listed when you type the command ($host1 | get-Scsilun | where {$_.CanonicalName -match "naa"})

then type the command

new-harddisk -vm $vm -DiskType RawPhysical -Devicename $deviceName

Hope this information helps you

0 Kudos
Umapat77
Contributor
Contributor

Hi ,

  I am trying to do through my application, these are some of the properties I am setting, where vdrdmi is an object of VirtualDiskRawDiskMappingVer1BackingInfo

          vdrdmi.setCompatibilityMode(diskUsageBO.getDiskcompatability());

            vdrdmi.setDatastore(getDataStoreMor(cb, diskUsageBO));

            vdrdmi.setFileName("");

            vdrdmi.setDeviceName("/vmfs/devices/disks/" + diskUsageBO.getLunID());

            vdrdmi.setDiskMode(VMCreateConstants.PERSISTENT);

            vdrdmi.setLunUuid(diskUsageBO.getLunID());

            disk.setBacking(vdrdmi);

Am I missing anything here ? . Device name and disk mode are set in this case.

0 Kudos
franc01s
Contributor
Contributor

Hi,

I Experienced the same,  adding  -Datastore parameter solved my problem

François

0 Kudos