Hi All, Domain 0 System: Fedora 6, fc6xen. kernel 2.6.18, because 2.6.20 seems not good. Guest system: Fedora 6 and Window 2000 server. I was trying to backup the guest system I created. The guest system is running(windows 2000 server, full-virtual). I copy the image like: cp win2k win2k.bak When it is copied, I change win2k.bak to win2k, and try to start the system using this file, and it stops when starting the windows system. Does that mean we can''t copy the image when the system is running, it seems the system will write the image file every minuters. In this case, what ''s the best way to backup the guest images. We don''t want to shut down the server everytime when we do the backup, right? Anyone please give me some ideas?? Thanks a lot! x _______________________________________________ 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 Xin Chen > Sent: 31 May 2007 13:01 > To: xen-users > Subject: [Xen-users] copy the running image, not working > > Hi All, > > Domain 0 System: Fedora 6, fc6xen. kernel 2.6.18, because > 2.6.20 seems > not good. > Guest system: Fedora 6 and Window 2000 server. > > I was trying to backup the guest system I created. > The guest system is running(windows 2000 server, > full-virtual). I copy > the image like: cp win2k win2k.bak > When it is copied, I change win2k.bak to win2k, and try to start the > system using this file, and it stops when starting the windows system. > Does that mean we can''t copy the image when the system is running, it > seems the system will write the image file every minuters.Yes, there''s no guarantee that the filesystem on the disk-image is "correct" at any time except when you''ve told the OS "you need to save everything to disk now" - which is usually what happens during a "poweroff" or "shutdown" situation, and at no other times. There are filesystems that are more resiliant than others, but assuming that you don''t actually want to change the filesystem (which is unlikely, as Windows don''t offer much in the way of choice here), you''ll have to make sure you either shut down the server, or use the method described below.> > In this case, what ''s the best way to backup the guest > images. We don''t > want to shut down the server everytime when we do the backup, right?The most user friendly way to back things up, in my opinion, is to take a snapshot of the guest as it runs and the disk-image with it. So you do something like: # xm save dom-win2k somefile # cp winsk.img win2k.img.bak # cp somefile somefile.bak # xm restore somefile This will "shut down" the guest for a few seconds (as long as it takes to copy the domain content and the files). You need to save these files together, as the "savefile.bak" will contain a backup of the unsaved disk-content, and since you''re not actually using the "shutdown" of the domain itself, you''ll need that to recover the disk content later on. Note that the save/restore feature of HVM (fully virtualized) domains is new to Xen version 3.1, so you will have to update your hypervisor and tools before you can use this feature. -- mats> > Anyone please give me some ideas?? > > Thanks a lot! > > x > > _______________________________________________ > 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
great! I can write a script like : # xm save dom-win2k somefile # cp winsk.img win2k.img.bak # cp somefile somefile.bak # xm restore somefile to run the backup every night. Thanks a lot ! Mat. cheers, chen Petersson, Mats wrote:> > > > >>-----Original Message----- >>From: xen-users-bounces@lists.xensource.com >>[mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Xin Chen >>Sent: 31 May 2007 13:01 >>To: xen-users >>Subject: [Xen-users] copy the running image, not working >> >>Hi All, >> >>Domain 0 System: Fedora 6, fc6xen. kernel 2.6.18, because >>2.6.20 seems >>not good. >>Guest system: Fedora 6 and Window 2000 server. >> >>I was trying to backup the guest system I created. >>The guest system is running(windows 2000 server, >>full-virtual). I copy >>the image like: cp win2k win2k.bak >>When it is copied, I change win2k.bak to win2k, and try to start the >>system using this file, and it stops when starting the windows system. >>Does that mean we can''t copy the image when the system is running, it >>seems the system will write the image file every minuters. >> >> > >Yes, there''s no guarantee that the filesystem on the disk-image is >"correct" at any time except when you''ve told the OS "you need to save >everything to disk now" - which is usually what happens during a >"poweroff" or "shutdown" situation, and at no other times. > >There are filesystems that are more resiliant than others, but assuming >that you don''t actually want to change the filesystem (which is >unlikely, as Windows don''t offer much in the way of choice here), you''ll >have to make sure you either shut down the server, or use the method >described below. > > >>In this case, what ''s the best way to backup the guest >>images. We don''t >>want to shut down the server everytime when we do the backup, right? >> >> > >The most user friendly way to back things up, in my opinion, is to take >a snapshot of the guest as it runs and the disk-image with it. So you do >something like: > ># xm save dom-win2k somefile ># cp winsk.img win2k.img.bak ># cp somefile somefile.bak ># xm restore somefile > >This will "shut down" the guest for a few seconds (as long as it takes >to copy the domain content and the files). > >You need to save these files together, as the "savefile.bak" will >contain a backup of the unsaved disk-content, and since you''re not >actually using the "shutdown" of the domain itself, you''ll need that to >recover the disk content later on. > >Note that the save/restore feature of HVM (fully virtualized) domains is >new to Xen version 3.1, so you will have to update your hypervisor and >tools before you can use this feature. > >-- >mats > > >>Anyone please give me some ideas?? >> >>Thanks a lot! >> >>x >> >>_______________________________________________ >>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