How do I create a Virtual Machine disk that when started the user can do whatever they like however, when the domain ends (for any reason) the state of the disk is automatically reverted to it''s original state. I think this could be as easy as creating a copy on write VHD of the disk I want to use as the "clean state". Then before starting the domain, delete the VHD and re-create it, then create the domain. It''s trivial to script this, but if the user was to "restart" then I want it reverted to. So how do I detect a reboot etc? _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
I''d rather not use an LVM master but use vhd COW disks. However, you''ve said "destroy it when done work". how do I detect the shutdown? Or better still, is there a way to run a script before a domain is created? It looks a bit hacky but I may be able to add something into one of the scripts in /etc/xen. Are those scripts related to the deprecated xm? I''d prefer to use what will be current, so that would not suit. Matt On 8 February 2012 19:45, Shane Johnson <sdj@rasmussenequipment.com> wrote:> Would using LVM master then using the snap shot and then just destroying > it when done work? > > Shane > > > On Wed, Feb 8, 2012 at 7:38 PM, Matthew Hook <matthew.hook@otoy.com>wrote: > >> How do I create a Virtual Machine disk that when started the user can do >> whatever they like however, >> when the domain ends (for any reason) the state of the disk is >> automatically reverted to it''s original state. >> >> I think this could be as easy as creating a copy on write VHD of the disk >> I want to use as the "clean state". >> Then before starting the domain, delete the VHD and re-create it, then >> create the domain. >> >> It''s trivial to script this, but if the user was to "restart" then I want >> it reverted to. So how do I detect a reboot etc? >> >> _______________________________________________ >> Xen-users mailing list >> Xen-users@lists.xensource.com >> http://lists.xensource.com/xen-users >> > > > > -- > Shane D. Johnson > IT Administrator > Rasmussen Equipment > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Matt, Sorry I don''t have a lot of details on this as I have never used it, but I read this information somewhere while starting my learning curve with Xen. If I remember correctly, they would create the snapshot then run the VM off it, then just destroy it when the the DomU shut down. As for the scripting they didn''t give any code just a general scenario. Sorry I can''t be of more help. Shane On Thu, Feb 9, 2012 at 12:51 PM, Matthew Hook <matthew.hook@otoy.com> wrote:> I''d rather not use an LVM master but use vhd COW disks. > > However, you''ve said "destroy it when done work". how do I detect the > shutdown? > Or better still, is there a way to run a script before a domain is created? > > It looks a bit hacky but I may be able to add something into one of the > scripts in /etc/xen. > Are those scripts related to the deprecated xm? I''d prefer to use what > will be current, so that would not suit. > > Matt > > > > On 8 February 2012 19:45, Shane Johnson <sdj@rasmussenequipment.com>wrote: > >> Would using LVM master then using the snap shot and then just destroying >> it when done work? >> >> Shane >> >> >> On Wed, Feb 8, 2012 at 7:38 PM, Matthew Hook <matthew.hook@otoy.com>wrote: >> >>> How do I create a Virtual Machine disk that when started the user can do >>> whatever they like however, >>> when the domain ends (for any reason) the state of the disk is >>> automatically reverted to it''s original state. >>> >>> I think this could be as easy as creating a copy on write VHD of the >>> disk I want to use as the "clean state". >>> Then before starting the domain, delete the VHD and re-create it, then >>> create the domain. >>> >>> It''s trivial to script this, but if the user was to "restart" then I >>> want it reverted to. So how do I detect a reboot etc? >>> >>> _______________________________________________ >>> Xen-users mailing list >>> Xen-users@lists.xensource.com >>> http://lists.xensource.com/xen-users >>> >> >> >> >> -- >> Shane D. Johnson >> IT Administrator >> Rasmussen Equipment >> >> >> >-- Shane D. Johnson IT Administrator Rasmussen Equipment _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi,> How do I create a Virtual Machine disk that when started the user can > do whatever they like however, > when the domain ends (for any reason) the state of the disk is > automatically reverted to it''s original state. > > I think this could be as easy as creating a copy on write VHD of the > disk I want to use as the "clean state". > Then before starting the domain, delete the VHD and re-create it, then > create the domain. > > It''s trivial to script this, but if the user was to "restart" then I > want it reverted to. So how do I detect a reboot etc?I haven''t a real clue, but I wonder whether you can do something with btrfs and snapshots. Mark