" are not supported by KVM")
# TODO: handle FD_LOOP and FD_BLKTAP (?)
if boot_disk:
+ kvm_cmd.extend(['-boot', 'c'])
boot_val = ',boot=on'
boot_disk = False
else:
iso_image = instance.hvparams[constants.HV_CDROM_IMAGE_PATH]
if iso_image:
- options = ',format=raw,if=virtio,media=cdrom'
+ options = ',format=raw,media=cdrom'
if boot_cdrom:
+ kvm_cmd.extend(['-boot', 'd'])
options = '%s,boot=on' % options
+ else:
+ options = '%s,if=virtio' % options
drive_val = 'file=%s%s' % (iso_image, options)
kvm_cmd.extend(['-drive', drive_val])
except EnvironmentError, err:
raise errors.HypervisorError("Failed to list node info: %s" % err)
result['cpu_total'] = cpu_total
+ # FIXME: export correct data here
+ result['cpu_nodes'] = 1
+ result['cpu_sockets'] = 1
return result
if boot_order not in ('cdrom', 'disk'):
raise errors.HypervisorError("The boot order must be 'cdrom' or 'disk'")
+ if boot_order == 'cdrom' and not iso_path:
+ raise errors.HypervisorError("Cannot boot from cdrom without an ISO path")
+
def ValidateParameters(self, hvparams):
"""Check the given parameters for validity.
if iso_path and not os.path.isfile(iso_path):
raise errors.HypervisorError("Instance cdrom image '%s' not found or"
" not a file" % iso_path)
-
-