VMware Cloud Community
electricd7
Contributor
Contributor

I would like help writing a script which removes a passthrough GPU, creates a snapshot, and then put the GPU back.

Hello,

I have a VDI deployment which I would like to backup the VMs using snapshot technology.  This works great except in the case where the machine might be using an nVidia GRID GPU as those are assinged as passthrough PCI devices.  What I would like to do, is to check the VM to collect the GPU properties, remove the GRID assignment, create the snapshot and backup the machine, then re-add the GPU using the properties collected initially.  Turning off the machine is OK for this procedure as well.  Has anyone done anything like this?  I found the "Add-PassthroughDevice" and "Remove-PassthroughDevice" commands, but honestly have no idea how to implement them or do this.  Please help if you can.  Thanks.

0 Kudos
1 Reply
vMarkusK1985
Expert
Expert

You can check this post from Alan:

http://www.virtu-al.net/2015/10/26/adding-a-vgpu-for-a-vsphere-6-0-vm-via-powercli/

I think it shoul help you getting started...

https://mycloudrevolution.com | https://twitter.com/vMarkus_K | https://github.com/vMarkusK
0 Kudos