Dear all, I think that very urgent feature is possibility to make a snapshot with a tool builded in xen, like vmware! Many thanks, Enrico _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Enrico Valsecchi schrieb:> Dear all, > > I think that very urgent feature is > possibility to make a snapshot with a tool > builded in xen, like vmware! >Do you know "xm save"? Overmind # xm save Error: ''xm save'' requires between 2 and 3 arguments. Usage: xm save [-c] <Domain> <CheckpointFile> Save a domain state to restore later. -c, --checkpoint Leave domain running after creating snapshot Overmind # Stefan Kuhne _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> Do you know "xm save"? > > Overmind # xm save > Error: ''xm save'' requires between 2 and 3 arguments. > > Usage: xm save [-c] <Domain> <CheckpointFile> > > Save a domain state to restore later. > -c, --checkpoint Leave domain running after creatingYes, I know xm save command.... ....but: I have make a snapshot with xm save -c, then I have delete some file in a system (complete remove /boot directory) O.K., I''m shutdown domain and restore. Result are that domain start, but does not are file deleted from me! My little and stupid question are: What do you do with this snapshot??????? Bye, Enrico _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
If you want snapshots of the filesystem, use LVM. "xm save" takes snapshot of the domain''s state (memory and such). One secnario where xm save is useful: You need to reboot the Dom0, but want to restore DomUs back to how they were after reboot (really useful when your router is in DomU. Reboot is normally fast enough to get the router back up before the connections timeout). -Eljas Alakulppi On Sun, 05 Jul 2009 17:35:54 +0300, Enrico Valsecchi <admin@hostyle.it> wrote:>> Do you know "xm save"? >> >> Overmind # xm save >> Error: ''xm save'' requires between 2 and 3 arguments. >> >> Usage: xm save [-c] <Domain> <CheckpointFile> >> >> Save a domain state to restore later. >> -c, --checkpoint Leave domain running after creating > > Yes, > I know xm save command.... > ....but: > > I have make a snapshot with xm save -c, then I have delete some file in a > system > (complete remove /boot directory) > O.K., I''m shutdown domain and restore. > > Result are that domain start, but does not are file deleted from me! > > My little and stupid question are: > > What do you do with this snapshot??????? > > Bye, > > Enrico > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Eljas, if you have a very large filesystem (some TB) and use a clustered filesystem (ex: lustre), for performance reason isn''t a good solution work with LVM.... ....and, if you want save only one virtual machine, you can''t use a LVM snapshot technology! I think that xen must have a tools that allow create a consistent snapshot, because are a unique possibility to have this features in any environment. O.K., I mean that this are required only in a enterprise environment but, if XEN want are a very powerfull vmware alternative, I think that some tools are indispensable! Bye, Enrico> If you want snapshots of the filesystem, use LVM. "xm save" takes > snapshot of the domain''s state (memory and such). > > One secnario where xm save is useful: You need to reboot the Dom0, but > want to restore DomUs back to how they were after reboot (really > useful when your router is in DomU. Reboot is normally fast enough to > get the router back up before the connections timeout). > > -Eljas Alakulppi > > On Sun, 05 Jul 2009 17:35:54 +0300, Enrico Valsecchi > <admin@hostyle.it> wrote: > >>> Do you know "xm save"? >>> >>> Overmind # xm save >>> Error: ''xm save'' requires between 2 and 3 arguments. >>> >>> Usage: xm save [-c] <Domain> <CheckpointFile> >>> >>> Save a domain state to restore later. >>> -c, --checkpoint Leave domain running after creating >> >> Yes, >> I know xm save command.... >> ....but: >> >> I have make a snapshot with xm save -c, then I have delete some file >> in a >> system >> (complete remove /boot directory) >> O.K., I''m shutdown domain and restore. >> >> Result are that domain start, but does not are file deleted from me! >> >> My little and stupid question are: >> >> What do you do with this snapshot??????? >> >> Bye, >> >> Enrico >> >> _______________________________________________ >> Xen-users mailing list >> Xen-users@lists.xensource.com >> http://lists.xensource.com/xen-users > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Enrico Valsecchi wrote:>I think that xen must have a tools that allow create a consistent >snapshot, because >are a unique possibility to have this features in any environment.As I understand it, you want to be able to take a snapshot of a running guest - and then modify it''s file system by deleting files etc. Without VERY tight integration between hypervisor/tools/guest OS then this isn''t going to happen. Even a snapshot of the volume (eg LVM snapshot) isn''t going to help you from outside of the guest. The reason ? Your guest has mounted filesystems. Unless you are prepared to run clustered filesystems then you cannot modify the filesystem from outside of the guest without corrupting the filesystem. Whatever you read (or modify) from outside of the guest cannot take into account what the guest may have cached. To get around this would require tools that could "look inside" the guest - both it''s internal memory structures and it''s disks to work out what it''s view of the filesystem is, and then be able to update both the disk and any in memory structures relating to it. The level of integration required to cope with the OS, the filesystem in use, etc is such that I very much doubt if anyone will put in the work required. I think there are three practical ways to modify the guest filesystem : 1) Do the mods from within the guest. 2) Shutdown the guest and mount it''s filesystem elsewhere (eg in Dom0) 3) Use a clustered filesystem that you can mount on two systems. -- Simon Hobson Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed author Gladys Hobson. Novels - poetry - short stories - ideal as Christmas stocking fillers. Some available as e-books. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Enrico, Why can''t you save only one VM with LVM snapshots? Sounds like you have an odd implementation, rather that there being a problem with LVM. We export two LVs per domU - 1 ''data'' and 1 ''swap''. I can easily snapshot the ''data'' LV of any single domU without a performance problem. LVM snapshots are exactly what you''re looking for. However, for real backups, I always recommend that you start with an ''inside'' approach, and treat the domU like any other server. In my experience, buying solely into the ''snapshot as a backup'' idea is a one way ticket to lost data. Best Regards Nathan Eisenberg Sr. Systems Administrator Atlas Networks, LLC support@atlasnetworks.us http://support.atlasnetworks.us/portal -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Enrico Valsecchi Sent: Monday, July 06, 2009 7:38 AM To: Eljas Alakulppi Cc: xen-users@lists.xensource.com Subject: Re: [Xen-users] Xen 4.0 feature request Eljas, if you have a very large filesystem (some TB) and use a clustered filesystem (ex: lustre), for performance reason isn''t a good solution work with LVM.... ....and, if you want save only one virtual machine, you can''t use a LVM snapshot technology! I think that xen must have a tools that allow create a consistent snapshot, because are a unique possibility to have this features in any environment. O.K., I mean that this are required only in a enterprise environment but, if XEN want are a very powerfull vmware alternative, I think that some tools are indispensable! Bye, Enrico> If you want snapshots of the filesystem, use LVM. "xm save" takes > snapshot of the domain''s state (memory and such). > > One secnario where xm save is useful: You need to reboot the Dom0, but > want to restore DomUs back to how they were after reboot (really > useful when your router is in DomU. Reboot is normally fast enough to > get the router back up before the connections timeout). > > -Eljas Alakulppi > > On Sun, 05 Jul 2009 17:35:54 +0300, Enrico Valsecchi > <admin@hostyle.it> wrote: > >>> Do you know "xm save"? >>> >>> Overmind # xm save >>> Error: ''xm save'' requires between 2 and 3 arguments. >>> >>> Usage: xm save [-c] <Domain> <CheckpointFile> >>> >>> Save a domain state to restore later. >>> -c, --checkpoint Leave domain running after creating >> >> Yes, >> I know xm save command.... >> ....but: >> >> I have make a snapshot with xm save -c, then I have delete some file >> in a >> system >> (complete remove /boot directory) >> O.K., I''m shutdown domain and restore. >> >> Result are that domain start, but does not are file deleted from me! >> >> My little and stupid question are: >> >> What do you do with this snapshot??????? >> >> Bye, >> >> Enrico >> >> _______________________________________________ >> Xen-users mailing list >> Xen-users@lists.xensource.com >> http://lists.xensource.com/xen-users > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Nathan Eisenberg wrote:>Why can''t you save only one VM with LVM snapshots? Sounds like you >have an odd implementation, rather that there being a problem with >LVM. We export two LVs per domU - 1 ''data'' and 1 ''swap''. I can >easily snapshot the ''data'' LV of any single domU without a >performance problem.How do you deal with the fact that you are snapshotting a dirty state ? Unless you are using LVM inside the DomU (in which case Xen is irrelevant), then when you make a snapshot, it will NOT include any dirty blocks in the guests cache. Unless you collaborate with the guest, get it to stop updating the filesystem, and flush it''s cache - then you are pretty well guaranteed dirty (and probably corrupt) data. -- Simon Hobson Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed author Gladys Hobson. Novels - poetry - short stories - ideal as Christmas stocking fillers. Some available as e-books. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
>> Why can''t you save only one VM with LVM snapshots? Sounds like you >> have an odd implementation, rather that there being a problem with >> LVM. We export two LVs per domU - 1 ''data'' and 1 ''swap''. I can >> easily snapshot the ''data'' LV of any single domU without a >> performance problem. > > How do you deal with the fact that you are snapshotting a dirty state > ? Unless you are using LVM inside the DomU (in which case Xen is > irrelevant), then when you make a snapshot, it will NOT include any > dirty blocks in the guests cache. > > Unless you collaborate with the guest, get it to stop updating the > filesystem, and flush it''s cache - then you are pretty well guaranteed > dirty (and probably corrupt) data. >Sorry, but I think that are more cleaned that if you want manage a XEN consistent snapshot, XEN must have this function! O.K., you CAN use other external tool to have a consistent snapshots. Very unique mode are use LVM, BUT, if you want have use a LVM snapshot, you MUST have dedicated LMV volume for ANY virtual machine.... ....good? You think really that, in a scenario with 30/50/100/150 active virtual machine, is possible use a dedicated LVM volume for any machine?????????? Enrico _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Enrico Valsecchi wrote:>>How do you deal with the fact that you are snapshotting a dirty >>state ? Unless you are using LVM inside the DomU (in which case Xen >>is irrelevant), then when you make a snapshot, it will NOT include >>any dirty blocks in the guests cache. >> >>Unless you collaborate with the guest, get it to stop updating the >>filesystem, and flush it''s cache - then you are pretty well >>guaranteed dirty (and probably corrupt) data. >> >Sorry, >but I think that are more cleaned that if you want manage a XEN >consistent snapshot, XEN must have this function! > >O.K., you CAN use other external tool to have a consistent snapshots. >Very unique mode are use LVM, BUT, if you want have use a LVM >snapshot, you MUST have dedicated LMV volume for ANY virtual >machine.... >....good?Following the threads in here, I think it''s fairly common to have one or more LVM volumes defined in Dom0 for each guest. For example, if I had a guest called "guest", then I''d probably have LVM volumes named guest-root, guest-var, and so on. The problem is, that unless you are looking from INSIDE the guest, then what is in the LVM volume is NOT what the guest things is in the volume (the only exception being when the guest has no dirty cached blocks in memory for that volume). To get round this means having tools that intimately connect with LVM, the guest OS, and it''s filing system. Given all the permutations possible, that just isn''t likely to happen. The best I could think of would be a combination of tools so that from the Dom0 you could signal for a guest to : stop all writes, write all dirty blocks out to disk, signal to the host that this is done, wait for a response, then resume. The admin program could then signal a guest to go into a ''clean'' state (and wait for it to reach that state), make an LVM snapshot of it''s volume, and then signal the guest to resume. Your LVM snapshot would then represent the guests view of the volume at that instant - but it still would not be clean in the way that an unmounted filesystem with no open files is clean. -- Simon Hobson Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed author Gladys Hobson. Novels - poetry - short stories - ideal as Christmas stocking fillers. Some available as e-books. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
>>O.K., you CAN use other external tool to have a consistent snapshots. >>Very unique mode are use LVM, BUT, if you want have use a LVM >>snapshot, you MUST have dedicated LMV volume for ANY virtual >>machine.... >>....good? > > Following the threads in here, I think it''s fairly common to have one > or more LVM volumes defined in Dom0 for each guest. For example, if I > had a guest called "guest", then I''d probably have LVM volumes named > guest-root, guest-var, and so on.Sorry, but if you have a clustered filesystem with some TB of available space and some tens/hundreds of configured DomU, is NOT probably (for manage complexity) that you have a dedicated LVM volume!> The problem is, that unless you are looking from INSIDE the guest, > then what is in the LVM volume is NOT what the guest things is in the > ...[CUT]...I does not can go into your words, but I think that shapshot problem are TOTALLY independent of used hardware/software/partition schema/filesystem! During my message in this thread, I have write that vmware have a very powerfull tool that allow to try a consistent snapshot.... ....I does not have idea that this tool work, but.... ...it work! And it''s make vmware very powerfull, with a really and simple backup possibility, regardless environment.... If it''s possible have same condition with XEN, I think that one of major reasons they do choose vmware would be less! Enrico _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On 07/07/09 16:38, Enrico Valsecchi wrote:> During my message in this thread, I have write that vmware > have a very powerfull tool that allow to try a consistent snapshot.... > ....I does not have idea that this tool work, but.... > ...it work! > And it''s make vmware very powerfull, with a really and simple backup > possibility, > regardless environment.... > >Xen''s snapshot method is no less good than vmware''s, it''s just different. For VMware workstation you can have a nice gui where you have a snapshot and you can see hierarchies of snapshots and it''s all really nice. For xen you have to do this "by hand" on the command line, but it''s no less flexible. You could write a fancy gui to keep track of your snapshots though. You could argue that a VMware snapshot is much more flexible because it doesn''t require a complete copy of the disk and the memory of the running guest to be stored. Well, if you use one of the numerous copy-on-write mechanisms (qcow, lvm, zfs, btrfs, reflink, probably others) you can do the same, but xen doesn''t need to implement that for you. And then you''ve got the problem of getting the guest into a consistent shape for the snapshot because that''s how you do backups. VMware seems to tout this quite a lot, but what''s not mentioned is that is requires cooperation from the guest and the applications running in it. This is no different from vmware. VMware has nice point and shoot (or point and click) mechanisms for taking snapshots and that makes it look really nice and powerful. When you get down to the nitty gritty, though, it doesn''t have anything that xen doesn''t. All that VMware has is the point and click UI ... jch _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> The admin program could then signal a guest to go into a > ''clean'' state (and wait for it to reach that state), make an LVM > snapshot of it''s volume, and then signal the guest to resume. Your > LVM snapshot would then represent the guests view of the volume at > that instant - but it still would not be clean in the way that an > unmounted filesystem with no open files is clean. >We have actually developed tools that do this for xen, dom-0 is able to obtain the guest''s cooperation via simple writes to xenstore, which the guest watches and acts upon. The problem is (and this holds true for VMWare too) is that some user space programs do their own buffering, relational database servers being a good example. So, the kernel being in a clean state is just 2/3 of the battle. Of course its possible to add guest side hooks that would handle telling DB servers to write everything in memory (and block until all transactions are closed) prior to telling dom-0 to ''go ahead'' .. but that just gets icky. There''s also the issue of files in mid transfer (ftp uploads, etc). In some cases, snapshots work very well .. in other cases not so well, no matter what virtualization technology is being used. I think it goes to show, if the UI is aesthetically pleasing, many people just don''t consider the underlying mechanisms .. why would they ? :) Cheers, --Tim _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
The fact of the matter is that without flushing the buffers and cache, the snapshot is essentially the same as what would result if you pulled the power plug (sans the messy ''memory death'' results that happen in the physical world in the nanoseconds after RAM loses power) -and while that''s hardly ideal, it''s good enough for many purposes - databases and filesystems are generally robust enough to handle uncommitted transactions. However, there are ways to get a better snapshot. All you need is a quick script that logs in to the domU, stops the database service, runs a sync, and then generates the snapshot and starts the database service again. Best Regards Nathan Eisenberg Sr. Systems Administrator Atlas Networks, LLC support@atlasnetworks.us http://support.atlasnetworks.us/portal -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Simon Hobson Sent: Monday, July 06, 2009 11:26 AM To: xen-users@lists.xensource.com Subject: RE: [Xen-users] Xen 4.0 feature request Nathan Eisenberg wrote:>Why can''t you save only one VM with LVM snapshots? Sounds like you >have an odd implementation, rather that there being a problem with >LVM. We export two LVs per domU - 1 ''data'' and 1 ''swap''. I can >easily snapshot the ''data'' LV of any single domU without a >performance problem.How do you deal with the fact that you are snapshotting a dirty state ? Unless you are using LVM inside the DomU (in which case Xen is irrelevant), then when you make a snapshot, it will NOT include any dirty blocks in the guests cache. Unless you collaborate with the guest, get it to stop updating the filesystem, and flush it''s cache - then you are pretty well guaranteed dirty (and probably corrupt) data. -- Simon Hobson Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed author Gladys Hobson. Novels - poetry - short stories - ideal as Christmas stocking fillers. Some available as e-books. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
More than thinking that it is possible, I do it every single day. It works, and it works well. :) There''s no reason not to have dedicated Logical Volumes for every domU. It makes dealing with the data backend a lot easier, as the volume management becomes incredibly logical and well labeled. Best Regards Nathan Eisenberg Sr. Systems Administrator Atlas Networks, LLC support@atlasnetworks.us http://support.atlasnetworks.us/portal -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Enrico Valsecchi Sent: Tuesday, July 07, 2009 6:48 AM To: Simon Hobson Cc: xen-users@lists.xensource.com Subject: Re: [Xen-users] Xen 4.0 feature request>> Why can''t you save only one VM with LVM snapshots? Sounds like you >> have an odd implementation, rather that there being a problem with >> LVM. We export two LVs per domU - 1 ''data'' and 1 ''swap''. I can >> easily snapshot the ''data'' LV of any single domU without a >> performance problem. > > How do you deal with the fact that you are snapshotting a dirty state > ? Unless you are using LVM inside the DomU (in which case Xen is > irrelevant), then when you make a snapshot, it will NOT include any > dirty blocks in the guests cache. > > Unless you collaborate with the guest, get it to stop updating the > filesystem, and flush it''s cache - then you are pretty well guaranteed > dirty (and probably corrupt) data. >Sorry, but I think that are more cleaned that if you want manage a XEN consistent snapshot, XEN must have this function! O.K., you CAN use other external tool to have a consistent snapshots. Very unique mode are use LVM, BUT, if you want have use a LVM snapshot, you MUST have dedicated LMV volume for ANY virtual machine.... ....good? You think really that, in a scenario with 30/50/100/150 active virtual machine, is possible use a dedicated LVM volume for any machine?????????? Enrico _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> -----Original Message----- > From: xen-users-bounces@lists.xensource.com [mailto:xen-users- > bounces@lists.xensource.com] On Behalf Of Nathan Eisenberg > Sent: Tuesday, July 07, 2009 1:31 PM > To: xen-users@lists.xensource.com > Subject: RE: [Xen-users] Xen 4.0 feature request > > More than thinking that it is possible, I do it every single day. Itworks, and it works> well. :) > > There''s no reason not to have dedicated Logical Volumes for everydomU. It makes> dealing with the data backend a lot easier, as the volume managementbecomes> incredibly logical and well labeled.Definitely. In fact one of our volume groups has 55 LV''s: # vgs VG #PV #LV #SN Attr VSize VFree t0core 1 55 0 wz--nc 4.08T 3.63T This is a clustered LVM too, shared among 4 dom0 hosts. You could accomplish the same creating as many LUNs on your SAN, but it tends to be more work and the volume labels are not as clear. The only advantage I see is that you won''t have to work around the limitations of a CLVM (e.g. single-host snapshots). (It''d be nice too if the Xen tools handled automatic LV activation/deactivation when bringing up a domU or migrating.) -Jeff _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Nathan Eisenberg wrote:> The fact of the matter is that without flushing the buffers and cache, the snapshot is essentially the same as what would result if you pulled the power plug (sans the messy ''memory death'' results that happen in the physical world in the nanoseconds after RAM loses power) -and while that''s hardly ideal, it''s good enough for many purposes - databases and filesystems are generally robust enough to handle uncommitted transactions. > > However, there are ways to get a better snapshot. All you need is a quick script that logs in to the domU, stops the database service, runs a sync, and then generates the snapshot and starts the database service again. > >Doesn''t a xm pause work it out? Thanks, Jan> Best Regards > Nathan Eisenberg > Sr. Systems Administrator > Atlas Networks, LLC > support@atlasnetworks.us > http://support.atlasnetworks.us/portal > > > -----Original Message----- > From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Simon Hobson > Sent: Monday, July 06, 2009 11:26 AM > To: xen-users@lists.xensource.com > Subject: RE: [Xen-users] Xen 4.0 feature request > > Nathan Eisenberg wrote: > > >> Why can''t you save only one VM with LVM snapshots? Sounds like you >> have an odd implementation, rather that there being a problem with >> LVM. We export two LVs per domU - 1 ''data'' and 1 ''swap''. I can >> easily snapshot the ''data'' LV of any single domU without a >> performance problem. >> > > How do you deal with the fact that you are snapshotting a dirty state > ? Unless you are using LVM inside the DomU (in which case Xen is > irrelevant), then when you make a snapshot, it will NOT include any > dirty blocks in the guests cache. > > Unless you collaborate with the guest, get it to stop updating the > filesystem, and flush it''s cache - then you are pretty well > guaranteed dirty (and probably corrupt) data. > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users