Ganeti Commands

Compile without DRDB barriers

./configure --localstatedir=/var --sysconfdir=/etc --enable-syslog=yes --disable-drbd-barriers

Ganeti is hard coded to DRDB protocol C (synchronous replication), see here for details. Change to protocol A (asynchronous) at your own risk, but for performance benefits.

Creat a test cluster

gnt-cluster init --enabled-hypervisors=kvm --master-netdev=eth0 --nic-parameters link=br0 --no-lvm-storage --no-etc-hosts --no-ssh-init --no-drbd-storage testcluster

Create a diskless, non-replicating, instance that boots a live CD, on a single node

gnt-instance add -t diskless -n node1 -o raw-image+default -B minmem=0.5GB,maxmem=0.5GB,memory=0.5GB,vcpus=1 --net 0:link=br0 -H kvm:boot_order=cdrom,cdrom_image_path=/media/ntfs/Data/mint13xfcex86.iso,cdrom_disk_type=ide,vnc_bind_address=0.0.0.0 testguest1.local.net

Create a local non-replicating instance for testing

gnt-instance add -t file -n bensley-debian -o raw-image+default --disk 0:size=40GB --no-wait-for-sync -B minmem=0.5GB,maxmem=2GB,memory=1GB,vcpus=4 -H kvm:boot_order=cdrom,cdrom_image_path=/media/AA502592502565F3/Data/win2k8.iso,cdrom2_image_path=/media/AA502592502565F3/Data/virtio-win-0.1.30-resigned.iso,cdrom_disk_type=ide,disk_cache=none,vnc_bind_address=0.0.0.0,kernel_path='' --no-ip-check --no-name-check win2k8guest
gnt-instance modify -H boot_order=disk,cdrom2_image_path='',cdrom_image_path='/media/AA502592502565F3/Data/virtio-win-0.1.30-resigned.iso,' instance1

Convert an instance to a replicating DRBD instance

gnt-instance shutdown $instance 
gnt-instance modify -t drbd -n $second_node $instance 
gnt-instance start $instance 

# Covert to DRBD instance without waiting for replication as above, risky and high I/O during initial sync
gnt-instance modify -t drbd -n $second_node --no-wait-for-sync $instance

Modify boot source

gnt-instance modify -H  boot_order=cdrom,cdrom_image_path=/media/AA502592502565F3/Data/win2k8.iso,cdrom2_image_path=/media/AA502592502565F3/Data/virtio-win-0.1.30-resigned.iso win2k8guest

gnt-instance modify -H boot_order=disk,cdrom_image_path=/media/AA502592502565F3/Data/virtio-win-0.1.30-resigned.iso,cdrom2_image_path='' win2k8guest

Previous page: Host Tuning and Testing
Next page: Issues and Patches