header
header Register : : Login header
header
divider
menuleft
menuright
submenu
left

[August 25th, 2008] Check the home page regarding PowerShell related news from a brand new sponsor: Idera

Disk quota on Linux VM
Last Post 09 Dec 2008 07:28 PM by Ayth. 4 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
TeslaUser is Offline
New Member
New Member
Posts:6
Avatar

--
04 Dec 2008 11:40 AM  
Hi  ... i wrote a script to get disk quota (capacity, freespace) of all of my VM ... but when i inquiry a VM with Linux like SO i get only   /boot  quotas ... solution?
marco.shawUser is Offline
Co-Community Director
Basic Member
Basic Member
Posts:188
Avatar

--
04 Dec 2008 12:58 PM  
Can you provide more info? Is this VMware? What script are you using?
Marco

*Microsoft MVP - Windows PowerShell: http://www.microsoft.com/mvp
*PowerGadgets MVP: http://www.powergadgets.com/mvp
*Blog: http://marcoshaw.blogspot.com
TeslaUser is Offline
New Member
New Member
Posts:6
Avatar

--
04 Dec 2008 01:07 PM  

 

Yes, VMWare, and this is an exctract of my script

$reportVM = @()
Get-VM | %{ $vm = $_ | Get-View
foreach($dsImpl in $vm.Config){
$d = $_ | Get-HardDisk
$row = "" | select ID_Estrazione, ID_Macchina, ID_Disco, Disco, SizeMB, DiscoFree
$row.ID_Estrazione = $dt
$row.ID_Macchina = $vm.Summary.Config.uuid
$row.ID_Disco = "Disco " + ($count +1)
$row.Disco = $d
$row.SizeMB = $d.CapacityKB/1024
$row.DiscoFree = $Null # i must set to null value for statistics query!! $count = $count + 1
$reportVM += $row}}
$reportVM | export-csv  .reportVM.csv

TeslaUser is Offline
New Member
New Member
Posts:6
Avatar

--
09 Dec 2008 01:43 PM  

Is there a way to get freespace or disk usage for VM Linux ?

AythUser is Offline
New Member
New Member
Posts:20
Avatar

--
09 Dec 2008 07:28 PM  
First thing I want to clarify. You want the disk usage/free space on the datastore for ESX right? Not the disk space free on the underlying Linux OS, right?

The reason I'm asking is that as far as I know ESX grabs a portion of the disk space for itself and creates a datastore. Then there is a portion for the actual Linux OS running ESX.

If you wan the disk available/usage on the ESX datastore check out the Get-Datastore cmdlet.

After reading this again do you mean a VM that is running Linux on the ESX server? Let me know and we will work it through. Thanks.
You are not authorized to post a reply.

Active Forums 4.1
right
   
footer Sponsored by Quest Software • SAPIEN Technologies • ShellTools, LLC • Microsoft Windows Server 2008 footer
footer