SCVMM: Creating Checkpoints with PowerShell
It isn’t possible to create a checkpoint with SCVMM beta1 for VMs that are running. The obvious solution is to write a script to stop the VM first, then create the checkpoint and start it again. I’ve written a script that does exactly that, and it does it for all running VMs.
When I first looked at the checkpoint feature I was dissapointed that there wasn’t an option to add a description. I’ve discovered that while it’s not possible to add and view descritptions through the GUI, you are able to do it using PowerShell.
The following script stops all running VMs, creates a checkpoint with a description, then starts the VMs again.
$VMs = Get-VM -server localhost | where{$_.VMState -eq 'Running'}
$StopVMs = $VMs | Stop-VM
$CheckpointResult = $VMs | New-VMCheckPoint -description "CheckPoint created from script"
$StartVMs = $VMs | Start-VM
You won’t be able to view the description through the GUI, but you can see it if you retreive the checkpoint information via the Get-VMCheckpoint cmdlet:
Get-vmcheckpoint -server server1
Note that server1 is the SCVMM server, not a VM. The cmdlet will list all checkpoints for all VMs that are managed by SCVMM. There is a -VM option, but it doesn’t work with beta1 (along with a lot of other options) There is a way to get around this limiation however, and that is to get the VM object first and then use the Get-VMCheckPoint cmdlet. You can do this for other commands like Start-VM and Stop-VM as well. Here’s an example, including the output:
PS C:\> $VM = "wnlabap101"
PS C:\> $VMObject = Get-VM -server localhost | where{$_.Name -eq $VM}
PS C:\> $VMObject | Get-VMCheckPoint -server localhost
VM : WNLABAP101
ObjectType : VMCheckpoint
Accessibility : Public
Name :
Description :
CreationTime : 8/03/2007 10:13:35 AM
ModifiedTime : 8/03/2007 10:13:38 AM
AccessedTime : 8/03/2007 10:13:38 AM
MarkedForDeletion : False
MostRecentTask :
ServerConnection : Microsoft.VirtualManager.Monad.Remoting.ServerConnection
ID : ca85e266-e658-47d5-951a-42af29762e8d
VM : WNLABAP101
ObjectType : VMCheckpoint
Accessibility : Public
Name :
Description : CheckPoint created from script
CreationTime : 19/03/2007 4:28:53 PM
ModifiedTime : 19/03/2007 4:28:56 PM
AccessedTime : 19/03/2007 4:28:56 PM
MarkedForDeletion : False
MostRecentTask :
ServerConnection : Microsoft.VirtualManager.Monad.Remoting.ServerConnection
ID : 1533e5df-f86c-4366-bedf-56e5944a8a83
VM : WNLABAP101
ObjectType : VMCheckpoint
Accessibility : Public
Name :
Description :
CreationTime : 12/03/2007 1:25:08 PM
ModifiedTime : 12/03/2007 1:25:11 PM
AccessedTime : 12/03/2007 1:25:11 PM
MarkedForDeletion : False
MostRecentTask :
ServerConnection : Microsoft.VirtualManager.Monad.Remoting.ServerConnection
ID : 899be449-6130-41ba-bbe9-ba47ae907981
johnmazarr said,
March 3, 2008 @ 3:44 am
A Realistic $250K First Year Income Potential
Less than four years ago I was driving this beat-up ‘94 VW with a rusty muffler. Within two years of creating this system I was making more than my doctor, accountant, and attorney COMBINED… while working less than 40 hours a week FROM HOME! Together with my group of leaders we are now seeking qualified entrepeneurs sharein the incredible results of our system.
for more information check this site out….
make money online scams
Delivoryn said,
May 15, 2010 @ 10:37 am
Good Night everybody!
Thanks for your site,
it is very interesting!
Very informative for me.
Good article.
My own online pharmacy. Visit my site if you want:
vigara pills
buy cheap generic
Delivoryn said,
May 16, 2010 @ 12:03 pm
Good Day!
Thanks for possibility to write on your site,
I read some of the posts and I think it is great!
I haven’t been up to anything recently.
Thanks!
My own online pharmacy =) Here is a way to think about it:
viagara pills
for woman
Delivoryne said,
May 20, 2010 @ 3:52 pm
Good Night everybody!
Thanks for possibility to write here,
I read some of the posts and I think it is great!
I’ve just been letting everything pass me by.
Keep up the good blogging.
HMy own online pharmacy =) Here’s what this is all about:
buy-vigra
prescription uk
Delivorynr said,
May 21, 2010 @ 6:28 pm
Cheers!
Thanks for possibility to write on your site,
it’s nice!
When I publish a blog about my personal experience I’ll definitely have it linked in the side bar.
Great job!
My own online pharmacy =) Here are the answers:
buy-vigra
order usa
Delivorynt said,
May 23, 2010 @ 12:16 pm
Good Day!
Thanks for possibility to write on your site,
it is very nice!
I have never heard of this before i will have to check it out.
Thanks! Good article.Keep it up
My own online pharmacy =) Here is just a sample of…
buy-viagera
where to buy
Delivoryny said,
May 25, 2010 @ 9:46 am
Greetings!
Thanks for your site existing,
it is very interesting!
I just don’t have much to say lately.
Good article.
My own online pharmacy =) Here is a way to think about it:
buy-viagera
online order
Delivoryni said,
May 29, 2010 @ 11:41 am
Good Day!
Thanks for possibility to write on your website,
I’m sure you will have no problems with it!
I’ve just been letting everything pass me by.
Great job!
My own online pharmacy. Here
is my site:
buy-vigra
cheap online
Delivoryno said,
June 3, 2010 @ 4:37 pm
Cheers!
Thanks for your site,
I read some of the posts and I think it is great!
When I publish a blog about my personal experience I’ll definitely have it linked in the side bar.
Thanks a lot!
My own online pharmacy =) Vitally important last and final point:
buy-vigra
substitute
Brosilono said,
June 6, 2010 @ 11:23 am
Hello everybody!
Thanks for your site,
I’m sure you will have no problems with it!
I’m still hoping there will be more posts on this site.
Keep up the good blogging.
So it adds up to this:
vigra
generic canada
Delivoryna said,
June 8, 2010 @ 10:08 am
Hello!
Thanks for your site existing,
I’m sure you will have no problems with it!
I hope it will be working for me for a longtime, because I dont know any better way!
Good article.
My own online pharmacy =) Vitally important last and final point:
buy-vigara
order online usa
Delivorynd said,
June 14, 2010 @ 9:37 am
Good day everybody!
Thanks for possibility to write on your site,
it’s nice!
Looks like a good way. I’ll try it!
Good article. Keep it up
Here my own online pharmacy if you are interesting:
buy-cheap tadacip
sale online
Delivoryng said,
June 18, 2010 @ 1:28 am
Hello!
Thanks for possibility to write here,
This is really cool!
Sounds interesting and revolutionary (in a positive sense).
Great job!
My own online pharmacy =) What it means is this:
buy cheap tadacip
get
Delivorynj said,
June 22, 2010 @ 10:50 pm
Greetings!
Thanks for possibility to write on your website,
it’s nice!
When I publish a blog about my personal experience I’ll definitely have it linked in the side bar.
Listen, there’s more. Lots more.
My own online pharmacy =) Vitally important last and final point:
buy cheap levitra
buy cheap
Delivorynl said,
June 28, 2010 @ 1:02 am
Greetings!
Thanks for possibility to write on your site,
it is very nice!
So it goes. I just don’t have much to say recently, but whatever.
I have to agree. Good article.
My own online pharmacy =) Here are some more random examples:
buy acomplia online
levitra
Delivorynz said,
July 1, 2010 @ 9:43 am
Good Day!
Thanks for your site existing,
it’s nice!
Very informative for me.
Thanks! Good article.Keep it up
My own online pharmacy. Visit my site if you want:
buy acomplia online
buy
Delivorynx said,
July 4, 2010 @ 12:44 pm
Good Night!
Thanks for possibility to write on your website,
I read some of the posts and I think it is a great place!
I’m really interested to follow some articles.
Keep up the good blogging.
My own online pharmacy =) Here is a way to think about it:
buy acomplia online
order uk