use RevertToSnapshot(), but my vm will power off

59 views
Skip to first unread message

Jeffery

unread,
Aug 22, 2013, 7:02:21 AM8/22/13
to vmwar...@googlegroups.com
HI, 

There are two buttons in WinForm, I add CreateSnapshot() to button_1 click event :

// ===============================================
private void button_1_Click(object sender, EventArgs e)
{
    string name = "Snapshot_1";
    virtualMachine.Snapshots.CreateSnapshot(name, "test" );
}
// ===============================================

and I add snapshot.RevertToSnapshot() to button_2 click event :

// ===============================================
private void button_2_Click(object sender, EventArgs e)
{
    VMWareSnapshot snapshot = virtualMachine.Snapshots.GetNamedSnapshot("Snapshot_1");
    snapshot.RevertToSnapshot();
// ===============================================

After click button_1, I can see the "Snapshot_1" in Snapshot Manager.
But click button_2 result in my vm(Win XP) powering off, and never revert to snapshot.

So, is anywhere wrong in button click event or I misuse these function ?
Thx



Jeffery

unread,
Aug 22, 2013, 7:06:20 AM8/22/13
to vmwar...@googlegroups.com
I use VMware Workstation(7.0.0), VMware VIX(1.12), VMwareTasks(1.7), Win7 64bit.

Daniel Doubrovkine

unread,
Aug 22, 2013, 9:48:09 AM8/22/13
to vmwar...@googlegroups.com
Does the second part work at all if you hard-code another snapshot name? 

Does it work if you don't create the snapshot first yourself?


On Thu, Aug 22, 2013 at 7:06 AM, Jeffery <chij...@gmail.com> wrote:
I use VMware Workstation(7.0.0), VMware VIX(1.12), VMwareTasks(1.7), Win7 64bit.

--
You received this message because you are subscribed to the Google Groups "vmwaretasks" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vmwaretasks...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--

dB. | Moscow - Geneva - Seattle - New York
code.dblock.org - @dblockdotorg - artsy.net - github/dblock

Jeffery

unread,
Aug 23, 2013, 4:49:15 AM8/23/13
to vmwar...@googlegroups.com
I don't create another snapshot before I click button_2.

Then I use the "take snapshot" option in VM tool bar to create another snapshot -"Snapshot2"
in pic_1 (https://www.dropbox.com/s/h1fdqyotf92hw68/2013-08-23%2016%2004%2018.jpg)
Snapshot_1 is my WinForm created, the icon is different to Snapshot2

in my directory of vm guest os, "Snapshot8.vmsn" is created after I use Snapshots.CreateSnapshot() in my WinForm
"Snapshot9.vmsn" and "Snapshot9.vmem" are created after I take snapshot using VN tool bar option

The file amount of "Snapshot8.vmsn" is smaller than "snapshot9.vmsn", and there is no "Snpashot8.vmem"

Dose snapshot file which Snapshots.CreateSnapshot() created is not complete ?

Daniel Doubrovkine於 2013年8月22日星期四UTC+8下午9時48分09秒寫道:

Daniel Doubrovkine

unread,
Aug 26, 2013, 9:01:38 AM8/26/13
to vmwar...@googlegroups.com
I know nothing about files that VMWare creates. The VMWareTasks library is just an API wrapper. You might try asking the VixCOM forum on the vmware website.

Jeffery

unread,
Sep 4, 2013, 6:34:20 AM9/4/13
to vmwar...@googlegroups.com
OK!
thanks you reply my question!

Daniel Doubrovkine於 2013年8月26日星期一UTC+8下午9時01分38秒寫道:

Gary Escoffery

unread,
Jul 10, 2014, 9:56:25 AM7/10/14
to vmwar...@googlegroups.com

Hey guys was this issue ever solved? I'm experiencing the same thing. If I programatically create a snapshot the Snapshot gets created but it's very small and it does not save the state of the memory so when I try to revert to this snapshot it just powers off.
Reply all
Reply to author
Forward
0 new messages