This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def init(id, cfg): | |
return True | |
def deinit(id): | |
return True | |
def inform_super(id, qstate, superqstate, qdata): | |
return True | |
domains = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget http://download2.mikrotik.com/routeros/6.40.5/chr-6.40.5.img.zip -O chr.img.zip && \ | |
gunzip -c chr.img.zip > chr.img && \ | |
apt-get update && \ | |
apt install -y qemu-utils pv && \ | |
qemu-img convert chr.img -O qcow2 chr.qcow2 && \ | |
qemu-img resize chr.qcow2 `fdisk /dev/vda -l | head -n 1 | cut -d',' -f 2 | cut -d' ' -f 2` && \ | |
modprobe nbd && \ | |
qemu-nbd -c /dev/nbd0 chr.qcow2 && \ | |
echo "Give some time for qemu-nbd to be ready" && \ | |
sleep 2 && \ |