Sheepdog setup with Corosync on two guest hypervisors ===================================================== ----------------------------------------------------------------------- # On both the hosts $ dnf install corosync $ dnf install sheepdog # On both the hosts $ cat << EOF > /etc/corosync/corosync.conf compatibility: whitetank totem { version: 2 secauth: off threads: 0 interface { ringnumber: 0 bindnetaddr: -YOUR IP HERE- mcastaddr: 226.94.1.1 mcastport: 5405 } } logging { fileline: off to_stderr: no to_logfile: yes to_syslog: yes logfile: /var/log/cluster/corosync.log debug: off timestamp: on logger_subsys { subsys: AMF debug: off } } amf { mode: disabled } EOF ----------------------------------------------------------------------- # On both hosts start the 'sheepdog' and 'corosync' services $ systemctl start sheepdog corosync ----------------------------------------------------------------------- # And ensure they're in running state: $ systemctl status sheepdog corosync | grep Active Active: active (running) since Tue 2017-03-28 05:39:43 EDT; 9s ago Active: active (running) since Tue 2017-03-28 05:39:41 EDT; 11s ago ----------------------------------------------------------------------- # Enumerate the nodes: $ dog node list Id Host:Port V-Nodes Zone 0 192.168.122.84:7000 4 1417324736 1 192.168.122.169:7000 252 2843388096 ----------------------------------------------------------------------- $ dog cluster format --copies=2 using backend plain store ----------------------------------------------------------------------- $ dog cluster info Cluster status: running, auto-recovery enabled Cluster created at Tue Mar 28 09:46:53 2017 Epoch Time Version [Host:Port:V-Nodes,,,] 2017-03-28 11:11:00 3 [192.168.122.84:7000:4, 192.168.122.169:7000:252] 2017-03-28 09:52:37 2 [192.168.122.169:7000:128] 2017-03-28 09:46:53 1 [192.168.122.84:7000:4, 192.168.122.169:7000:252] ----------------------------------------------------------------------- $ dog vdi create Alice 5G $ dog vdi list Name Id Size Used Shared Creation time VDI id Copies Tag Block Size Shift Alice 0 5.0 GB 0.0 MB 0.0 MB 2017-03-28 09:49 15d167 2 22 ----------------------------------------------------------------------- # Boot with QEMU $ qemu-system-x86_64 sheepdog:Alice -display none -nodefconfig -nodefaults WARNING: Image format was not specified for 'json:{"tag": "", "driver": "sheepdog", "vdi": "Alice"}' and probing guessed raw. Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted. Specify the 'raw' format explicitly to remove the restrictions. ----------------------------------------------------------------------- # Download CirrOS image $ wget http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img $ mv cirros-0.3.5-x86_64-disk.img cirros-0.3.5-x86_64-disk.qcow2 ----------------------------------------------------------------------- # Disregard this for now (Paolo Bonzini is aware of this bug, and is # taking a look at it) $ qemu-img convert -t directsync ./cirros-0.3.5-x86_64-disk.qcow2 sheepdog:cirros0.3.5vm Segmentation fault (core dumped) ----------------------------------------------------------------------- # Enumerate the images in Sheepdog. (Weird: despite a seg-fault, you still see # the image $ dog vdi list Name Id Size Used Shared Creation time VDI id Copies Tag Block Size Shift Alice 0 5.0 GB 0.0 MB 0.0 MB 2017-03-28 09:49 15d167 2 22 cirros0.3.5vm 0 39 MB 12 MB 0.0 MB 2017-03-28 12:21 ee4c40 2 22 -----------------------------------------------------------------------