Jump to content


Photo

Expand / resize Citrix PVS vdisk

Started by Joakim Henningsson , 02 February 2016 - 07:45 PM
9 replies to this topic

Joakim Henningsson Members

Joakim Henningsson
  • 5 posts

Posted 02 February 2016 - 07:45 PM

We need to expand the PVS vdisk because it only have a few gb avalible.

But how can we do that the right way?
I have found different suggestions on the web but would like to here the really right now to do it:)
 
 
1. Should we merge all versions of the image to base (merge base - last base + all updates from that base) right?. Not "Merge updates"?

2. Can I merge base this while the image are still in use by a number of devices/servers (in production), or will it reboot the servers running the image at the moment?

3. Could i backup the disks and versions will still in use? or do we need to shut down the servers when coping the files?
 
What is the right tway to do this?
 
 
 

 



shocko Members

Darragh O'Shaughnessy
  • 1,141 posts

Posted 02 February 2016 - 09:05 PM

Merge base and all updates the copy out to a new vDisk, You will then nee to expand the actual vDisk the at the OS layer, the volume/partition. 



Joakim Henningsson Members

Joakim Henningsson
  • 5 posts

Posted 02 February 2016 - 10:04 PM

thanks for your answer shoko,

Can I merge base this while the image are still in use by a number of devices/servers (in production), or will it reboot the servers running the image at the moment?



shocko Members

Darragh O'Shaughnessy
  • 1,141 posts

Posted 02 February 2016 - 10:17 PM

What version of PVS? Generally, yes as long as you don't merge it to production. Do the following:

 

  1. Merge base + all updates it to test or maintenance
  2. Once merged, grab the underlying .VHD file and copy off to a new name
  3. Now, in PVS console you can delete the merged disk if you like (i.e. delete the version created in 1)
  4. Mount and expand the .VHD file (lots of ways of dong this. Here's one http://blogs.technet.com/b/danstolts/archive/2011/04/02/how-to-expand-and-extend-to-increase-capacity-on-a-virtual-hard-disk-the-easy-and-fast-way-solve-the-problem-of-out-of-disk-space-on-drive-c-forever.aspx

     

  5. Import this new .VHD file
  6. Set properties
  7. handle MAK/KMS (as hthis is a new disk)
  8. Boot in maitenance
  9. Expand OS volumes

;)



Joakim Henningsson Members

Joakim Henningsson
  • 5 posts

Posted 23 February 2016 - 08:49 PM

​Hi

We are using PVS 7.6. is that ok to merge to maintenance/Test while I have a number of targets running the image?

Please see my screenshots from our PVS console, can you see any problem merging this?

http://goo.gl/wXM0VS

 

 

What version of PVS? Generally, yes as long as you don't merge it to production. Do the following:

 

  1. Merge base + all updates it to test or maintenance
  2. Once merged, grab the underlying .VHD file and copy off to a new name
  3. Now, in PVS console you can delete the merged disk if you like (i.e. delete the version created in 1)
  4. Mount and expand the .VHD file (lots of ways of dong this. Here's one http://blogs.technet.com/b/danstolts/archive/2011/04/02/how-to-expand-and-extend-to-increase-capacity-on-a-virtual-hard-disk-the-easy-and-fast-way-solve-the-problem-of-out-of-disk-space-on-drive-c-forever.aspx

     

  5. Import this new .VHD file
  6. Set properties
  7. handle MAK/KMS (as hthis is a new disk)
  8. Boot in maitenance
  9. Expand OS volumes

;)



Joshua Millen Members

Joshua Millen
  • 4 posts

Posted 23 September 2016 - 02:47 PM

​Hi

We are using PVS 7.6. is that ok to merge to maintenance/Test while I have a number of targets running the image?

Please see my screenshots from our PVS console, can you see any problem merging this?

http://goo.gl/wXM0VS

 

You can merge, it should just create a new version'd disk. When I have done it, the old versions that you will have to cleanup out of the store will have a red X when you view the versions in PVS console.

 

But, what drive are you expanding?

 

Is it the actual PVS disk that is booted to? (The C: drive)

 

Or is it a log drive?

 

(side note:

Never let the pagefile write to the C: drive, you also want your vdiskdif.vhdx pointed away from C: as well. For a production PVS guest booting from the PVS image, the more changes made to the C: drive will cause the vdiskdif.vhdx to grow rapidly. Hence scheduled reboots.)

 

---------------------------

If it is not the PVS C: drive that you are extending, the below will help.

 

Since we know nobody want to deal with KMS any more than needed.... avoid private mode.

 

I am in the process of doing this now and it is working like a champ.

I have a 20GB D drive on the guests for logs and EdgeSight, which was not enough once we added PrinterLogic to the PVS image.

 

I extended it on the my PVS image Maintenance server by 5GB and Generalized the image and promoted it.

Booted the Maintenance guest up and it has the new space.

 

Booted one of the other guest servers and it sees the extra 5GB but has not been extended, so it is not usable. 

For giggles, I extended it on the PVS guest (not in maintenance mode) and rebooted. But to my surprise that it actually retained it...... 

 

I think it has more to do with the actual disk itself for that PVS guest. Each PVS guest is unique and such each disk is also.

Citrix PVS is not provisioning that "Log" disk, so it cannot manipulate it as each PVS guest boots.

 

But once it is extended on the PVS image and set in Production, you still have to manually extend it in each existing PVS guest.

 

The only way around that would be to modify your VMware (hyper-V) template to include the extended space, delete the guests and run the Streamed Vm Setup and deploy from the new template.

 

It just depends which one you think will cause more work. I guess that would depend on how many PVS guests you have.



tduplan303 Members

Terry Duplantis
  • 89 posts

Posted 22 January 2017 - 03:56 PM

See Trevors response here:  http://discussions.citrix.com/topic/371819-how-do-i-expand-pvs-vdisk-with-versions/

 

This is by far the easiest way to extend a vhdx file, and also works on dynamic disks.  As stated, you will need to first merge to base, mount the vdisk on the PVS server, then use diskpart.  

 

"diskpart" 
"Select vdisk file="<path to your visk> eg V:\store\my.vhd" "
"list vdisk" (you should now see your vdisk and the path)
"expand vdisk maximum=60000" (This is the size in megabytes of the size you want to extend, so 60000 is 60Gb)

 

Once you expand it, you can use disk management to extend it, then detach the vdisk.  All done.



amccloa60 Members

Anthony McCloat
  • 9 posts

Posted 23 February 2017 - 12:52 PM

Hi Terry

This works fine for my 2008R2 VHD's but no for any of my Win7 VHD's.

Error occurs when I try to select the vDisk file.

No entry in Event Viewer, disk is not in use or locked.

Also being run as admin

 

Is it OS sensitive?

 

Attached Thumbnails

  • Select vdisk file - error.PNG


Alan Lantz Members

Alan Lantz
  • 6,989 posts

Posted 23 February 2017 - 02:42 PM

It may be, are you trying to do that diskpart command from a Windows 7 machine ? 

 

--Alan--



amccloa60 Members
  • #10

Anthony McCloat
  • 9 posts

Posted 24 February 2017 - 11:03 AM

Initially failed on Win7 machine also.

 

Used a tool called - vhdresizersetup.msi

This created me a new VHD that I was able to mount and follow the standard steps above.

 

Not sure if the issue was with a possible corrupt VHD (but tried this on two seperate Win7 VHD's with same errored result), but issue seems to have disappeared when I recreated the VHD from that tool.