Commit 7adf7814 authored by René Nussbaumer's avatar René Nussbaumer
Browse files

Make root_path an optional hypervisor parameter



This will allow us an easy migration to pv-grub, because a set root_path
confused pv-grub.
Signed-off-by: default avatarRené Nussbaumer <rn@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 0a68e0ff
......@@ -636,7 +636,7 @@ HVS_PARAMETER_TYPES = {
HV_KERNEL_PATH: VTYPE_STRING,
HV_KERNEL_ARGS: VTYPE_STRING,
HV_INITRD_PATH: VTYPE_STRING,
HV_ROOT_PATH: VTYPE_STRING,
HV_ROOT_PATH: VTYPE_MAYBE_STRING,
HV_SERIAL_CONSOLE: VTYPE_BOOL,
HV_USB_MOUSE: VTYPE_STRING,
HV_DEVICE_MODEL: VTYPE_STRING,
......
......@@ -459,7 +459,7 @@ class XenPvmHypervisor(XenHypervisor):
constants.HV_BOOTLOADER_ARGS: hv_base.NO_CHECK,
constants.HV_KERNEL_PATH: hv_base.REQ_FILE_CHECK,
constants.HV_INITRD_PATH: hv_base.OPT_FILE_CHECK,
constants.HV_ROOT_PATH: hv_base.REQUIRED_CHECK,
constants.HV_ROOT_PATH: hv_base.NO_CHECK,
constants.HV_KERNEL_ARGS: hv_base.NO_CHECK,
constants.HV_MIGRATION_PORT: hv_base.NET_PORT_CHECK,
constants.HV_MIGRATION_MODE: hv_base.MIGRATION_MODE_CHECK,
......@@ -521,7 +521,8 @@ class XenPvmHypervisor(XenHypervisor):
config.write("vif = [%s]\n" % ",".join(vif_data))
config.write("disk = [%s]\n" % ",".join(disk_data))
config.write("root = '%s'\n" % hvp[constants.HV_ROOT_PATH])
if hvp[constants.HV_ROOT_PATH]:
config.write("root = '%s'\n" % hvp[constants.HV_ROOT_PATH])
config.write("on_poweroff = 'destroy'\n")
config.write("on_reboot = 'restart'\n")
config.write("on_crash = 'restart'\n")
......
......@@ -334,6 +334,10 @@ root\_path
needed for Xen PVM, while for KVM it is only used if the
``kernel_path`` option is also specified.
Please note, that if this setting is an empty string and the
hypervisor is Xen it will not be written to the Xen configuration
file
serial\_console
Valid for the KVM hypervisor.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment