Revision 4ab75599

b/lib/constants.py
834 834
HV_USB_DEVICES = "usb_devices"
835 835
HV_VGA = "vga"
836 836
HV_KVM_EXTRA = "kvm_extra"
837
HV_KVM_MACHINE_VERSION = "machine_version"
837 838

  
838 839

  
839 840
HVS_PARAMETER_TYPES = {
......
901 902
  HV_USB_DEVICES: VTYPE_STRING,
902 903
  HV_VGA: VTYPE_STRING,
903 904
  HV_KVM_EXTRA: VTYPE_STRING,
905
  HV_KVM_MACHINE_VERSION: VTYPE_STRING,
904 906
  }
905 907

  
906 908
HVS_PARAMETERS = frozenset(HVS_PARAMETER_TYPES.keys())
......
1972 1974
    HV_USB_DEVICES: "",
1973 1975
    HV_VGA: "",
1974 1976
    HV_KVM_EXTRA: "",
1977
    HV_KVM_MACHINE_VERSION: "",
1975 1978
    },
1976 1979
  HT_FAKE: {},
1977 1980
  HT_CHROOT: {
b/lib/hypervisor/hv_kvm.py
539 539
    constants.HV_USB_DEVICES: hv_base.NO_CHECK,
540 540
    constants.HV_VGA: hv_base.NO_CHECK,
541 541
    constants.HV_KVM_EXTRA: hv_base.NO_CHECK,
542
    constants.HV_KVM_MACHINE_VERSION: hv_base.NO_CHECK,
542 543
    }
543 544

  
544 545
  _MIGRATION_STATUS_RE = re.compile("Migration\s+status:\s+(\w+)",
......
1025 1026
    pidfile = self._InstancePidFile(instance.name)
1026 1027
    kvm = constants.KVM_PATH
1027 1028
    kvm_cmd = [kvm]
1028
    kvm_cmd.extend(["-M", self._GetDefaultMachineVersion()])
1029 1029
    # used just by the vnc server, if enabled
1030 1030
    kvm_cmd.extend(["-name", instance.name])
1031 1031
    kvm_cmd.extend(["-m", instance.beparams[constants.BE_MAXMEM]])
......
1049 1049
        constants.INSTANCE_REBOOT_EXIT:
1050 1050
      kvm_cmd.extend(["-no-reboot"])
1051 1051

  
1052
    mversion = hvp[constants.HV_KVM_MACHINE_VERSION]
1053
    if not mversion:
1054
      mversion = self._GetDefaultMachineVersion()
1055
    kvm_cmd.extend(["-M", mversion])
1056

  
1052 1057
    kernel_path = hvp[constants.HV_KERNEL_PATH]
1053 1058
    if kernel_path:
1054 1059
      boot_disk = boot_cdrom = boot_floppy = boot_network = False
b/man/gnt-instance.rst
674 674
    Any other option to the KVM hypervisor, useful tweaking anything
675 675
    that Ganeti doesn't support.
676 676

  
677
machine\_version
678
    Valid for the KVM hypervisor.
679

  
680
    Use in case an instance must be booted with an exact type of
681
    machine version (due to e.g. outdated drivers). In case it's not set
682
    the default version supported by your version of kvm is used.
677 683

  
678 684
The ``-O (--os-parameters)`` option allows customisation of the OS
679 685
parameters. The actual parameter names and values depends on the OS

Also available in: Unified diff