Revision 2b846304 lib/hypervisor/hv_kvm.py
b/lib/hypervisor/hv_kvm.py | ||
---|---|---|
551 | 551 |
kvm_cmd.extend(["-no-reboot"]) |
552 | 552 |
|
553 | 553 |
hvp = instance.hvparams |
554 |
boot_disk = hvp[constants.HV_BOOT_ORDER] == constants.HT_BO_DISK |
|
555 |
boot_cdrom = hvp[constants.HV_BOOT_ORDER] == constants.HT_BO_CDROM |
|
556 |
boot_floppy = hvp[constants.HV_BOOT_ORDER] == constants.HT_BO_FLOPPY |
|
557 |
boot_network = hvp[constants.HV_BOOT_ORDER] == constants.HT_BO_NETWORK |
|
554 |
kernel_path = hvp[constants.HV_KERNEL_PATH] |
|
555 |
if kernel_path: |
|
556 |
boot_disk = boot_cdrom = boot_floppy = boot_network = False |
|
557 |
else: |
|
558 |
boot_disk = hvp[constants.HV_BOOT_ORDER] == constants.HT_BO_DISK |
|
559 |
boot_cdrom = hvp[constants.HV_BOOT_ORDER] == constants.HT_BO_CDROM |
|
560 |
boot_floppy = hvp[constants.HV_BOOT_ORDER] == constants.HT_BO_FLOPPY |
|
561 |
boot_network = hvp[constants.HV_BOOT_ORDER] == constants.HT_BO_NETWORK |
|
558 | 562 |
|
559 | 563 |
self.ValidateParameters(hvp) |
560 | 564 |
|
... | ... | |
645 | 649 |
drive_val = "file=%s%s" % (floppy_image, options) |
646 | 650 |
kvm_cmd.extend(["-drive", drive_val]) |
647 | 651 |
|
648 |
kernel_path = hvp[constants.HV_KERNEL_PATH] |
|
649 | 652 |
if kernel_path: |
650 | 653 |
kvm_cmd.extend(["-kernel", kernel_path]) |
651 | 654 |
initrd_path = hvp[constants.HV_INITRD_PATH] |
Also available in: Unified diff