Bootstrap FreeKB - VMWare - Create a snapshot of a virtual machine using PowerCLI
VMWare - Create a snapshot of a virtual machine using PowerCLI

Updated:   |  VMWare articles

  1. Download and install PowerCLI from www.vmware.com.
  2. In PowerCLI, using the following command to connect to your ESXi hypervisor:
Connect-VIServer -Server server_name -User username -Password password
  1. Use the Get-VM command to list the Virtual Machines installed on the hypervisor.
Get-VM

Name             PowerState   Num  CPUs  MemoryGB
----             -----------  ---  ----  --------
CentOS-FS1       PowerOn      1          1.000
Windows-WebSrv   PowerOff     1          4.000
  1. Let's say we want to create a Snapshot of CentOS-FS1. Use the Get-Snapshot -VM CentOS-FS1 command to create a new snapshot.  If there is no output, this means there are no Snapshots for the specified virtual machine.
Get-Snapshot -VM CentOS-FS1
  1. Use the New-Snapshot -VM CentOS-FS1 -Name ExampleSS command to create a new snapshot. -Name ExampleSS is the name of the new snapshot.
New-Snapshot -VM CentOS-FS1 -Name ExampleSS

Note: If message "current license or ESXi versin prohibits execution of the requested operation", this suggests you are probably using the free version of ESXi. The free version of ESXi does not allow the execution of the New-Snapshot cmdlet.




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 21b01a in the box below so that we can be sure you are a human.