Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

If I use xm save domain dumpfile, this pretty much accomplishes what I want to do. However, this does cause some downtime, and I really don't want to close network connections or take the machine out of memory. What I'd really like is to simply xm pause domain and then dump the memory and then unpause.

Is this possible?

If not, how do you figure that Slicehost implements their live snapshotting?

share|improve this question

2 Answers 2

Simply doing "xm save DOMAIN" will dump the running state of the domain, not the accompanying disk state. That running state will include unsaved disk caches and buffers. Loading backup up that saved image on anything other than an un-touched disk/volume will be a recipie for failure and data corruption.

I've needed to do similar to what you suggest but have been unable to avoid short periods of downtime, but these are always shorter than the equivalent time for a real machine.

I would make use of LVM and snapshots ( make your domain have a Logical volume as a disk )

 $ xm save DOMAIN DOMAIN.SAV
 $ snapshot the domains' Logical volume
 $ xm restore
 $ backup the lvm snapshot using dd
 $ delete the snapshot

You might want to have a look and see how I did this in the Dupe source code.

share|improve this answer

i can already see lvm tag in your question - why not putting vms on lvm volume and using snapshot? sure - it's not 100% secure method, but it is as secure as pulling power cord out of your server and mirroring hard drives.

lvm snapshot comes with performance penalty - as long as snapshot is present [ that is during the time you transport it to another machine, since after that you'll probably destroy it ] io operations on original volume used by xen are significantly slower.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.