VMware Cloud Community
Topstep1
Enthusiast
Enthusiast

Isn't it time already? (snapshot with PCI Device (GPU Passthru)

I have 2 Samsung 980 Pros (2TB) drives as local storage in an ESXi host (latest version). Partitions on one of those drives disappeared. (stuff happens)

 

I would like to use VEEAM to replicate a VM on 980_a to 980_b, for high availability. Both drives are in the same host.

Thing is this vm has a Quadro RTX400 passed thru from the host.

Historicity, Snapshots are not allowed with PCI devices connected to a VM.

 Given that, how can I do this? It's not about VEEAM is about the Snapshot. Without having to MANUALLY remove the PCI device EVERY time.

 

Labels (2)
Tags (1)
Reply
0 Kudos
2 Replies
BinaryBlueBull
Contributor
Contributor

For anyone else that might stumble in here after searching google for a way to snapshot VM's with PCI passthrough: you can write a script executed by Veeam before the backup, which shuts down the VM remotely. Then Veeam runs the backup and then, finallly, another script executed after the backup which  starts it back up. Veeam has settings in the backup job definition to run scripts before and after a backup. And VM's with PCI passthrough that are in the off (shutdown) state can in fact be snapshotted and backed up. You could use VMware PowerCLI for this, though you would have to install it on the Veeam server and of course write two (very simple) scripts. Do make sure you add a "Start-Sleep -Seconds <xx>" after initiating the shutdown, with enough seconds waited to give the VM time to fully shut down, otherwise Veeam will start the backup as soon as it has sent the shutdown-command, which could be too soon and make the backup fail because the VM is not yet offline

PS: I believe you need vCenter to be able to use PowerCLI but I'm not sure about this. I used to use these scripts I described myself and I seem to remember that they had to connect to the vCenter server to shut down the VM

Reply
0 Kudos
BarryGrowler
Enthusiast
Enthusiast

For VMs with PCI passthrough, automate the backup process without manual device removal by scripting VM shutdowns and restarts around the backup. Use some backup solution like Nakivo to execute a pre-backup script that powers down the VM, ensuring it's snapshot-ready despite the PCI passthrough. Incorporate a delay to ensure full shutdown before backup initiation. After backup, a post-backup script restarts the VM, minimizing downtime. Utilize VMware PowerCLI for these scripts, allowing seamless control over the VM's state. This method requires vCenter for PowerCLI commands but ensures an efficient backup process for high availability scenarios.

Reply
0 Kudos