Hi there, I''m running several VMs within Xen, and now I''m trying to create/revert snapshots of my VMs. Along with Xen and blktap2, another utility, vhd-util is also delivered, and according to its description, i guess I can use it to create/revert VM snapshots. To create a snapshot is actually easy, I just call |vhd-util snapshot -n aSnapShot.vhd -p theVMtoBackup.vhd | But when it comes to reverting a snapshot, things get really annoying The "revert" command requires a mandatory argument "journal", like this: |vhd-util revert -n aSnapShot.vhd -j someThingCalledJournalOfWhichIHaveCompletelyNoIdea | And vhd-util expects some info from the journal, which means it''s not some empty file you can write logs in. But I''ve went through the code and the internet, still get no idea where this Journal comes from ?? Similar question is askedhttp://xen.1045712.n5.nabble.com/snapshots-with-vhd-util-blktap2-td4639476.htmlbut poor guy never get answered. Hope someone here could help me out!! Really appreciate it! _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
this question did get a response here: http://stackoverflow.com/questions/20189231/how-2-use-vhd-util-to-manage-snapshots what did you think of that one? On Tue, Nov 26, 2013 at 12:05 AM, Sean Lin <iamlinix@gmail.com> wrote:> Hi there, > > I''m running several VMs within Xen, and now I''m trying to create/revert > snapshots of my VMs. > > Along with Xen and blktap2, another utility, vhd-util is also delivered, > and according to its description, i guess I can use it to create/revert VM > snapshots. > > To create a snapshot is actually easy, I just call > > vhd-util snapshot -n aSnapShot.vhd -p theVMtoBackup.vhd > > But when it comes to reverting a snapshot, things get really annoying > > The "revert" command requires a mandatory argument "journal", like this: > > vhd-util revert -n aSnapShot.vhd -j someThingCalledJournalOfWhichIHaveCompletelyNoIdea > > And vhd-util expects some info from the journal, which means it''s not some > empty file you can write logs in. > > But I''ve went through the code and the internet, still get no idea where > this Journal comes from ?? > > Similar question is asked > http://xen.1045712.n5.nabble.com/snapshots-with-vhd-util-blktap2-td4639476.html > but poor guy never get answered. > > Hope someone here could help me out!! > > Really appreciate it! > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xen.org > http://lists.xen.org/xen-users >-- Americium Dream Documents "(real opportunity starts with real documentation) _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
Aha, that is actually my post on stackoverflow. And I have talked with Thanos who offered me generous help yesterday that I have already tried the method, but it did not work, qemu complains that "No bootable device found". And later I did some research, it turns out that [vhd-util snapshot] will create a backing file chain which by now qemu does not support, so simply passing the snapshot to qemu would never work. And I did notice that in some product like XenServer, the backing file chain system seems to be working somehow, just can''t figure out how.. ? 2013/11/27 9:27, Ph.T ??:> this question did get a response here: > http://stackoverflow.com/questions/20189231/how-2-use-vhd-util-to-manage-snapshots > what did you think of that one? > > > On Tue, Nov 26, 2013 at 12:05 AM, Sean Lin <iamlinix@gmail.com > <mailto:iamlinix@gmail.com>> wrote: > > Hi there, > > I''m running several VMs within Xen, and now I''m trying to > create/revert snapshots of my VMs. > > Along with Xen and blktap2, another utility, vhd-util is also > delivered, and according to its description, i guess I can use it > to create/revert VM snapshots. > > To create a snapshot is actually easy, I just call > > |vhd-util snapshot -n aSnapShot.vhd -p theVMtoBackup.vhd > | > > But when it comes to reverting a snapshot, things get really annoying > > The "revert" command requires a mandatory argument "journal", like > this: > > |vhd-util revert -n aSnapShot.vhd -j someThingCalledJournalOfWhichIHaveCompletelyNoIdea > | > > And vhd-util expects some info from the journal, which means it''s > not some empty file you can write logs in. > > But I''ve went through the code and the internet, still get no idea > where this Journal comes from ?? > > Similar question is > askedhttp://xen.1045712.n5.nabble.com/snapshots-with-vhd-util-blktap2-td4639476.htmlbut > poor guy never get answered. > > Hope someone here could help me out!! > > Really appreciate it! > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xen.org <mailto:Xen-users@lists.xen.org> > http://lists.xen.org/xen-users > > > > > -- > Americium Dream Documents > "(real opportunity starts with real documentation)_______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
Take two snapshots vhd-util snapshot -n child1.vhd -p parent.vhd vhd-util snapshot -n child2.vhd -p parent.vhd Use child1.vhd as your new disk. When you want to revert, you point your config to child2.vhd or rename it to child1.vhd after deleting/renaming child1.vhd In xenserver the parent vhd file gets renamed with a new uuid and made hidden. Two snapshots are made and the disk that will be used is named with the old parent uuid. The second snapshot is the point in time. When a revert happens, the 1st child gets deleted, and the point in time snapshot gets renamed to the old parent uuid. Vhd-util can give you lineage and other attributes: vhd-util scan -m *.vhd -p vhd=parent.vhd capacity=26843545600 size=2798916096 hidden=0 parent=none vhd=child1.vhd capacity=26843545600 size=57344 hidden=0 parent=parent.vhd vhd=child2.vhd capacity=26843545600 size=57344 hidden=0 parent=parent.vhd From: xen-users-bounces@lists.xen.org [mailto:xen-users-bounces@lists.xen.org] On Behalf Of Sean Lin Sent: Tuesday, November 26, 2013 7:56 PM To: Ph.T Cc: xen-users@lists.xen.org Subject: Re: [Xen-users] How can I take/revert snapshot of a VHD image Aha, that is actually my post on stackoverflow. And I have talked with Thanos who offered me generous help yesterday that I have already tried the method, but it did not work, qemu complains that "No bootable device found". And later I did some research, it turns out that [vhd-util snapshot] will create a backing file chain which by now qemu does not support, so simply passing the snapshot to qemu would never work. And I did notice that in some product like XenServer, the backing file chain system seems to be working somehow, just can''t figure out how.. δΊ 2013/11/27 9:27, Ph.T ει: this question did get a response here: http://stackoverflow.com/questions/20189231/how-2-use-vhd-util-to-manage-snapshots what did you think of that one? On Tue, Nov 26, 2013 at 12:05 AM, Sean Lin <iamlinix@gmail.com<mailto:iamlinix@gmail.com>> wrote: Hi there, I''m running several VMs within Xen, and now I''m trying to create/revert snapshots of my VMs. Along with Xen and blktap2, another utility, vhd-util is also delivered, and according to its description, i guess I can use it to create/revert VM snapshots. To create a snapshot is actually easy, I just call vhd-util snapshot -n aSnapShot.vhd -p theVMtoBackup.vhd But when it comes to reverting a snapshot, things get really annoying The "revert" command requires a mandatory argument "journal", like this: vhd-util revert -n aSnapShot.vhd -j someThingCalledJournalOfWhichIHaveCompletelyNoIdea And vhd-util expects some info from the journal, which means it''s not some empty file you can write logs in. But I''ve went through the code and the internet, still get no idea where this Journal comes from ?? Similar question is asked http://xen.1045712.n5.nabble.com/snapshots-with-vhd-util-blktap2-td4639476.html but poor guy never get answered. Hope someone here could help me out!! Really appreciate it! _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org<mailto:Xen-users@lists.xen.org> http://lists.xen.org/xen-users -- Americium Dream Documents "(real opportunity starts with real documentation) _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users