# HG changeset patch # User igor@manas.xt.vpn # Date 1219049314 -10800 # Node ID 189e42c31b6920b463e5d147431a02f034a1be32 # Parent 5e499179b5edaccb50ced05dad910c43877c3c96 hvm disk parameter fixed diff -r 5e499179b5ed -r 189e42c31b69 xen-drbd-start.py --- a/xen-drbd-start.py Thu Aug 14 22:04:16 2008 +0300 +++ b/xen-drbd-start.py Mon Aug 18 11:48:34 2008 +0300 @@ -32,13 +32,23 @@ vcpus=vcpus_table[domain] disk=[] -i=0 -for disk_description in disk_table[domain]: - i+=1 - if disk_description.find(":") == -1: - disk.append('phy:/dev/drbd/%s,hda%s,w' % (domain,i) ) - else: - disk.append('phy:/dev/drbd/%s,hda%s,w' % ((disk_description.split(':'))[1],i) ) +if domain_types[N] == 'hvm': + letters='abcdefghijklmnopqrstuvwxyz' + i=0 + for disk_description in disk_table[domain]: + i+=1 + if disk_description.find(":") == -1: + disk.append('phy:/dev/drbd/%s,hd%s,w' % (domain,letters[i-1]) ) + else: + disk.append('phy:/dev/drbd/%s,hd%s,w' % ((disk_description.split(':'))[1],letters[i-1]) ) +else: + i=0 + for disk_description in disk_table[domain]: + i+=1 + if disk_description.find(":") == -1: + disk.append('phy:/dev/drbd/%s,hda%s,w' % (domain,i) ) + else: + disk.append('phy:/dev/drbd/%s,hda%s,w' % ((disk_description.split(':'))[1],i) ) vif=[] vbridges = vbridges_table[domain]