16.07.2009

Script for up xen domain with cipher disk

#!/bin/bash
losetup /dev/loop0 /path/to/file #create new loop device
cryptsetup -c aes -y create file /dev/loop0 #mount cipher loop device, usual in /dev/mapper/file
/etc/xen/scripts/network-bridge start bridge=devicebridged netdev=device #create bridge for domain
xm create file #up domain