How to create a snapshot of a VMWare virtual machine using PowerCLI

Home > Search > How-to
  by

  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.



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




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




Comments