I am currently running ESX 3.02 and I am trying to use the new-harddisk function to add a rawPhysical disk to a newly defined vm. I receive error message "New-HardDisk : 2/11/2009 9:45:02 AM New-HardDisk 5292f118-0355-4bdd-961a-bf54389b6b55 The operation for the entity 9008 failed with the following message: "A file was not found. /vmfs/volumes/494b81f8-5169b808-21d1-000d604e0910/test1/test1.vmdk"" when executing the following commands in my powershell script:
$devname = "/vmfs/devices/disks/" + $vmhba
New-HardDisk -VM $d -DiskType rawPhysical -DeviceName $devname
Does the New-Harddisk cmdlet not create the .vmdk files needed?
Any help or ideas would be greatly appreciated.
Thread moved to VI:ESX 3.0 forum
Shouldn't this be in the area where Toolkit questions are answered?
Hello,
Moved to VI Toolkit (for Windows)
Since this is powershell please be aware if the physical disk is a 'local' disk you may not be able to do it even in powershell. vmkfstools definitely can not do it, you have to do some trickery to make it work. http://itknowledgeexchange.techtarget.com/virtualization-pro/vmware-esx-storage-how-to-get-local-sto...
Best regards,
Edward L. Haletky
VMware Communities User Moderator
====
Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education.
Blue Gears and SearchVMware Pro Blogs -- Top Virtualization Security Links -- Virtualization Security Round Table Podcast
Thanks for the response. I tried the steps as outlined in the mentioned article without success. This server is ESX 3.03 and the vmkfstools clone step fails with "Missing required argument: vmfsPath" error. Command used was "vmkfstools -i /vmfs/volumes/storage1/test1/testdisk.vmdk -d raw:/vmfs/devices/disks/vmhba0:2:4:0". Usually just using a full path corrects the error but not in this case. Any ideas to overcome this error would be greatly appreciated?
Hello,
I would first list out what volumes are there and do not already have a partition. You want to know which device vmhba0:2:4:0 is related to.
esxcfg-vmhbdevs -q
vdf
fdisk -l
Then map between what you want to use and what is available. You may find it is already in use somewhere.
vmhba0 should be the local disks, but is it?
Also when you specify raw:/vmfs/devices/disks/vmhba0:2:4:0 do so as raw:/vmfs/devices/disks/vmhba0\:2\:4\:0
Note the backslashes otherwise : is interpreted by the shell to mean something else.
Best regards,
Edward L. Haletky
VMware Communities User Moderator
====
Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education.
Blue Gears and SearchVMware Pro Blogs -- Top Virtualization Security Links -- Virtualization Security Round Table Podcast
Hello,
I have confirmed that vmhba0:2:4:0 is the correct lun. Based on the tech article I should be able to use "vmkfstools -i" as a work around to the New-Harddisk function. Maybe I should tell what I am trying to achive here. We currently use the VI client to attach rdm disks during disaster recovery. I am trying to script this process. So far I have not been able to find a command/toolkit cmdlet that will give me the capability of selecting a lun(rdm disk) and create a new hard disk for a vm machine. Regardless of using vmkfstools in a script or on a command line it still fails with the same vmfspath error.
Hello,
The article is only for RAW disks from Local storage, not for RDMs.
Is vmhba0:2:4:0 a local storage option or on the SAN.
Best regards,
Edward L. Haletky
VMware Communities User Moderator
====
Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education.
Blue Gears and SearchVMware Pro Blogs -- Top Virtualization Security Links -- Virtualization Security Round Table Podcast
Hello,
This is a san attached lun.
Hello,
Can you report the output of:
esxcfg-vmbhadevs -q
esxcfg-mpath -l
In general anything with vmhba0 in it is actually the local storage device.
Are you booting from SAN?
Best regards,
Edward L. Haletky
VMware Communities User Moderator
====
Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education.
Blue Gears and SearchVMware Pro Blogs -- Top Virtualization Security Links -- Virtualization Security Round Table Podcast
Hello,
Yes we do boot from san and the command outputs follow:
esxcfg-vmhbadevs -q
vmhba0:1:0 /dev/sda
vmhba0:2:0 /dev/sdc
vmhba0:2:1 /dev/sdd
vmhba0:2:2 /dev/sde
vmhba0:2:3 /dev/sdf
vmhba0:2:4 /dev/sdg
esxcfg-mpath -l
Thanks to all that tried to help with this problem. After some serious testing it was determined that the error was somehow being generated by executing the command from the powershell script. When the command was executed by itself in the windows powershell it was successful.
Message was edited by: michael.adams@ncfbins.com