Options

Inflated disk still shows "Thin"

jibbajabbajibbajabba Member Posts: 4,317 ■■■■■■■■□□
This is driving me a bit bonkers.

Here you can see a VM with a thin provisioned disk:

244p9o9.jpg

Which is confirmed by the UI as well

2lmwjdc.jpg

Now I am trying to inflate the vmdk

2nv8hea.jpg

Once done, the disk should show "thick" ..

2rditt4.jpg

Still thin .. running the inflate command again "confirms" that it isn't thin any more

6ga3r4.jpg

In addition to the error, the VMDK is still shown as thin in both, PowerCLI and the UI.

Has anyone seen this before ?

Only reference I can find is this

VMware KB: Inflating a virtual disk fails with the error: The disk is not thin-provisioned

So "You see this error if the virtual disk is not Thin Provisioned" - great, thanks.

Then I found this reference :

Virtualization & Cloud computing: Sphere client shows "wrong" disk provisioning type in VM properties after deployment from template

So the UI apparently updates once the VM is powered on.

Unfortunately this is an environment where I cannot power the VM on in question to test this, but I used the same environment to demonstrate a particular script which worked (changed to Thick etc.) and only now with more demonstrations it stopped working (and made me look like an idiot - well more than usual anyway)...

Anyone seen this before ?!? Can someone confirm that this is changing once the VM is being powered on ?

Edit: Jumped onto another environment - same test - powered VM on, still shows "Thin" after inflating ... WTH ... !??

Edit2: Interestingly enough, if you remove / re-attach the VMDK it changes to "Thick" ... getting weirder by the second.

Edit3: Same when inflating using the datastore browser
My own knowledge base made public: http://open902.com :p

Comments

  • Options
    jibbajabbajibbajabba Member Posts: 4,317 ■■■■■■■■□□
    Solved ...

    Reload of VMX file will do the trick .. Couldn't find a PowerCLI command but someone on the vmware forums helped me out, here for reference :
    (Get-VM [VM-Name] | Get-View).Reload()
    

    As a result
    PowerCLI C:\Scripts> [B][I].\clone.ps1 VM-1[/I][/B]
    
    *******************
    * Backup Starting *
    *******************
    
    Creating Snapshot of VM-1
    Creating Clone of VM-1
    VM-1-BkpClone-20130611 Created
    Removing Snapshot from VM-1
    
    
    *******************
    * Backup Finished *
    *******************
    
    PowerCLI C:\Scripts> [B][I]Get-VM | Where-Object {$_.name -like "*bkp*"} | Get-HardDisk | fl[/I][/B]
    
    
    StorageFormat   : [color=red][B]Thin[/B][/color]
    Persistence     : Persistent
    DiskType        : Flat
    Filename        : [iSCSI] VM-1-BkpClone-20130611/VM-1-BkpClone-20130611.vmdk
    CapacityKB      : 1048576
    CapacityGB      : 1
    ParentId        : VirtualMachine-vm-642
    Parent          : VM-1-BkpClone-20130611
    Uid             : /VIServer=administrator@localhost:443/VirtualMachine=VirtualMachine-vm-642/HardDisk=2000/
    ConnectionState :
    ExtensionData   : VMware.Vim.VirtualDisk
    Id              : VirtualMachine-vm-642/2000
    Name            : Hard disk 1
    
    PowerCLI C:\Scripts> [B][I]Get-VM | Where-Object {$_.name -like "*bkp*"} | Get-HardDisk | Set-HardDisk -Inflate -Confirm:$False[/I][/B]
    
    CapacityGB      Persistence                                                    Filename
    ----------      -----------                                                    --------
    1.000           Persistent           ...1-BkpClone-20130611/VM-1-BkpClone-20130611.vmdk
    
    
    PowerCLI C:\Scripts> [B][I]Get-VM | Where-Object {$_.name -like "*bkp*"} | Get-HardDisk | fl[/I][/B]
    
    
    StorageFormat   : [color=red][B]Thin[/B][/color]
    Persistence     : Persistent
    DiskType        : Flat
    Filename        : [iSCSI] VM-1-BkpClone-20130611/VM-1-BkpClone-20130611.vmdk
    CapacityKB      : 1048576
    CapacityGB      : 1
    ParentId        : VirtualMachine-vm-642
    Parent          : VM-1-BkpClone-20130611
    Uid             : /VIServer=administrator@localhost:443/VirtualMachine=VirtualMachine-vm-642/HardDisk=2000/
    ConnectionState :
    ExtensionData   : VMware.Vim.VirtualDisk
    Id              : VirtualMachine-vm-642/2000
    Name            : Hard disk 1
    
    
    PowerCLI C:\Scripts> [B][I](Get-View -ViewType VirtualMachine) |?{$_.name -like "*bkp*"} |%{$_.reload()}[/I][/B]
    
    PowerCLI C:\Scripts> [B][I]Get-VM | Where-Object {$_.name -like "*bkp*"} | Get-HardDisk | fl[/I][/B]
    
    
    StorageFormat   : [color=red][B]EagerZeroedThick[/B][/color]
    Persistence     : Persistent
    DiskType        : Flat
    Filename        : [iSCSI] VM-1-BkpClone-20130611/VM-1-BkpClone-20130611.vmdk
    CapacityKB      : 1048576
    CapacityGB      : 1
    ParentId        : VirtualMachine-vm-642
    Parent          : VM-1-BkpClone-20130611
    Uid             : /VIServer=administrator@localhost:443/VirtualMachine=VirtualMachine-vm-642/HardDisk=2000/
    ConnectionState :
    ExtensionData   : VMware.Vim.VirtualDisk
    Id              : VirtualMachine-vm-642/2000
    Name            : Hard disk 1
    

    Above is more for my own benefit / reference, but in case someone else is looking for similar issues - here is how :)
    My own knowledge base made public: http://open902.com :p
Sign In or Register to comment.