- for blk_prefix in ('sd','hd'):
- for blk_num in map ( \
- lambda x: chr(x), range(ord('a'),ord('z')+1)):
- devicename="%s%c" % (blk_prefix, blk_num)
- valid_blk_names[devicename]=None
+ # also check for vd (virtio devices used with kvm)
+ for blk_prefix in ('sd', 'hd', 'vd'):
+ for blk_num in string.ascii_lowercase:
+ devicename = "{}{}".format(blk_prefix, blk_num)
+ valid_blk_names[devicename] = None