using vm-snapshot to clone a domU

CAUTION: with the following the system is up so you risk file loss, data loss, etc. — use at your own risk.

Ideally you would shutdown your domU and use vm-export rather than vm-snapshot.

make a snapshot

 xe vm-snapshot vm=name new-name-label=name-foo

this returns a uuid

  xe vm-export vm=UUID filename=|bzip2 > file.xva.bz2

move the file about

scp file.xva.bz2

import the snapshot

 cat file.xva.bz2 |ssh "bunzip2|/opt/xensource/bin/xe vm-import filename=/dev/stdin"

then recreate the clone from the snapshot template under openxenmanager or other management tool.

Leave a Reply

Your email address will not be published. Required fields are marked *