Jump to content
Welcome to our new Citrix community!
  • 0

Extend VM disk on Citrix Hypervisor using powershell


Kid Kooijmans1709160840

Question

Hi,

 

I'm trying to extend to extend a disk of a VM using the Hypervisor 8.2 powershell SDK. I can't seem to find a way.

 

I have set up a connection and read the VM I want to edit the disk of.

 

$VMs = get-xenvm  | where {$_.name_label.StartsWith("VMName")}


foreach($VM in $VMs){

    $VBDrefs = $VM.VBDs
     
    foreach($VBDref in $VBDrefs){
        $VBD = Get-XenVBD -Ref $VBDref
        $VDI = Get-XenVDI -Ref $VBD.VDI
        
        if($VDI.name_label -eq $VM.name_label + " 0"){ 
           
           $VirtualSize = ($GB * 120)
           $VirtualSize

           Set-XenVDI -VDI $VDI .... --> there is no option to set the new size of the disk here
 
           
        }

    }

}

Link to comment

3 answers to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...