Thursday, September 22, 2016

Q & A

Question:


What is the vmware recommendation for ESXi...to boot from SAN or local disk?

Answer:

Both are supported, and Preferred would be Local storage.

Below are the location of some documents for more details:

https://blogs.vmware.com/vsphere/2011/02/ops-changes-part-3-local-disk-vs-usb-vs-bfs.html

http://pubs.vmware.com/vsphere-55/index.jsp?topic=%2Fcom.vmware.vsphere.storage.doc%2FGUID-C1FD30A2-27C1-45A6-A736-E0AE76A0ADB2.html

http://pubs.vmware.com/vsphere-55/index.jsp?topic=%2Fcom.vmware.vsphere.storage.doc%2FGUID-2A66A330-A9E5-460B-8982-54A1B1C38C02.html

http://pubs.vmware.com/vsphere-55/index.jsp?topic=%2Fcom.vmware.vsphere.storage.doc%2FGUID-9004389B-E2C0-4BE5-811C-E4886E3B7450.html

http://pubs.vmware.com/vsphere-55/index.jsp?topic=%2Fcom.vmware.vsphere.storage.doc%2FGUID-9004389B-E2C0-4BE5-811C-E4886E3B7450.html

Q & A

Question:

One of customers ran a Rouge power cli script and now we have a huge number of VMs with missing vmdk discriptor. Is they a power cli way find out what is broke?

Answer:

Try this it will provide vm with harddisk details with size and missing vmdk will show blank in .csv file...there we can sort easily

foreach ($VM in (Get-VM 'log1' | Sort-Object -Property Name)) {
foreach ($HardDisk in ($VM | Get-HardDisk | Sort-Object -Property Name)){
$ds = Get-Datastore -Name $HardDisk.Filename.Split(']')[0].TrimStart('[')
$vmdkPath = $HardDisk.Filename.Split(']')[1].TrimStart(' ')
""| select @{N="VM";E={$VM.Name}},
@{N="Hard Disk";E={$HardDisk.Name}},
@{N="Datastore";E={$ds.Name}},
@{N="VMDKpath";E={$vmdkPath}},
@{N="VMDK Size";E={($VM.extensiondata.layoutex.file|?{$_.name -contains $HardDisk.filename.replace(".","-flat.")}).size/1GB}},
@{N="Drive Size";E={$HardDisk.CapacityGB}}
}
}