1. modprobe zram
2. echo $((3*1024*1024*1024)) > /sys/block/zram0/disksize
3. mkfs.ext4 -O dir_nlink,extent,extra_isize,flex_bg,^has_journal,uninit_bg -m0 -b 4096 -L "zram0" /dev/zram0
4. mount -o barrier=0,commit=240,noatime,nodev,nosuid /dev/zram0 /mnt/zram
5. cp system.img /mnt/zram
6. libvirt xml:
- 42 <disk type='file' device='disk'>
- 43 <driver name='qemu' type='qcow2' cache='writethrough'/>
- 44 <source file='/home/vm/winxp/snapshot.qcow2'/>
- 45 <target dev='vda' bus='virtio'/>
- 46 </disk>
阅读(942) | 评论(0) | 转发(0) |