- def _GenerateKVMBlockDevicesOptions(self, instance, kvm_disks,
+ def _GenerateKVMBlockDevicesOptions(self, instance, up_hvp, kvm_disks,
kvmhelp, devlist):
"""Generate KVM options regarding instance's block devices.
@type instance: L{objects.Instance}
@param instance: the instance object
kvmhelp, devlist):
"""Generate KVM options regarding instance's block devices.
@type instance: L{objects.Instance}
@param instance: the instance object
@type kvm_disks: list of tuples
@param kvm_disks: list of tuples [(disk, link_name)..]
@type kvmhelp: string
@type kvm_disks: list of tuples
@param kvm_disks: list of tuples [(disk, link_name)..]
@type kvmhelp: string
if disk_type == constants.HT_DISK_PARAVIRTUAL:
if_val = ",if=%s" % self._VIRTIO
try:
if disk_type == constants.HT_DISK_PARAVIRTUAL:
if_val = ",if=%s" % self._VIRTIO
try:
if instance.disk_template in constants.DTS_EXT_MIRROR:
if disk_cache != "none":
# TODO: make this a hard error, instead of a silent overwrite
if instance.disk_template in constants.DTS_EXT_MIRROR:
if disk_cache != "none":
# TODO: make this a hard error, instead of a silent overwrite
devlist = self._GetKVMOutput(kvm_path, self._KVMOPT_DEVICELIST)
bdev_opts = self._GenerateKVMBlockDevicesOptions(instance,
devlist = self._GetKVMOutput(kvm_path, self._KVMOPT_DEVICELIST)
bdev_opts = self._GenerateKVMBlockDevicesOptions(instance,