2

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?

Jonathan Hawkes
  • 201
  • 2
  • 9

2 Answers2

1

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.

IanNorton
  • 121
  • 2
0

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.

pQd
  • 29,981
  • 6
  • 66
  • 109