[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Change VM.HVM_boot to VM.HVM_boot_policy and VM.HVM_boot_params.
# HG changeset patch # User Ewan Mellor <ewan@xxxxxxxxxxxxx> # Date 1170330931 0 # Node ID f73e71aa0a9036e759f5fecadf5fbe4a511fda80 # Parent 0a4cbad6752c4740b2b823581e3a61aa9ad53a64 Change VM.HVM_boot to VM.HVM_boot_policy and VM.HVM_boot_params. Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx> --- docs/xen-api/xenapi-datamodel.tex | 190 +++++++++++++++++++++++++++--- tools/libxen/include/xen_vm.h | 61 +++++++-- tools/libxen/src/xen_vm.c | 103 +++++++++++++--- tools/libxen/test/test_bindings.c | 11 + tools/python/xen/xend/XendAPI.py | 44 +++++- tools/python/xen/xend/XendConfig.py | 16 +- tools/python/xen/xend/XendDomainInfo.py | 5 tools/python/xen/xm/messages/en/xen-xm.po | 5 8 files changed, 369 insertions(+), 66 deletions(-) diff -r 0a4cbad6752c -r f73e71aa0a90 docs/xen-api/xenapi-datamodel.tex --- a/docs/xen-api/xenapi-datamodel.tex Thu Feb 01 14:15:37 2007 +0000 +++ b/docs/xen-api/xenapi-datamodel.tex Thu Feb 01 11:55:31 2007 +0000 @@ -1026,9 +1026,9 @@ virtual machine (or 'guest'). virtual machine (or 'guest'). VM booting is controlled by setting one of the two mutually exclusive -groups: "PV", and "HVM". If HVM.boot is the empty string, then paravirtual -domain building and booting will be used; otherwise the VM will be loaded -as an HVM domain, and booted using an emulated BIOS. +groups: "PV", and "HVM". If HVM.boot\_policy is the empty string, then +paravirtual domain building and booting will be used; otherwise the VM will +be loaded as an HVM domain, and booted using an emulated BIOS. When paravirtual booting is in use, the PV/bootloader field indicates the bootloader to use. It may be "pygrub", in which case the platform's @@ -1053,7 +1053,10 @@ PV/bootloader and PV/kernel are empty, t PV/bootloader and PV/kernel are empty, then the behaviour is as if PV/bootloader was specified as "pygrub". -When using HVM booting, HVM/boot specifies the order of the boot devices.}} \\ +When using HVM booting, HVM/boot\_policy and HVM/boot\_params specify the +boot handling. Only one policy is currently defined: "BIOS order". In +this case, HVM/boot\_params should contain one key-value pair "order" = "N" +where N is the string that will be passed to QEMU.}} \\ \hline Quals & Field & Type & Description \\ \hline @@ -1089,7 +1092,8 @@ Quals & Field & Type & Description \\ $\mathit{RW}$ & {\tt PV/ramdisk} & string & path to the initrd \\ $\mathit{RW}$ & {\tt PV/args} & string & kernel command-line arguments \\ $\mathit{RW}$ & {\tt PV/bootloader\_args} & string & miscellaneous arguments for the bootloader \\ -$\mathit{RW}$ & {\tt HVM/boot} & string & device boot order \\ +$\mathit{RW}$ & {\tt HVM/boot\_policy} & string & HVM boot policy \\ +$\mathit{RW}$ & {\tt HVM/boot\_params} & (string $\rightarrow$ string) Map & HVM boot params \\ $\mathit{RW}$ & {\tt platform/std\_VGA} & bool & emulate standard VGA instead of cirrus logic \\ $\mathit{RW}$ & {\tt platform/serial} & string & redirect serial port to pty \\ $\mathit{RW}$ & {\tt platform/localtime} & bool & set RTC to local time \\ @@ -3297,13 +3301,13 @@ void \vspace{0.3cm} \vspace{0.3cm} \vspace{0.3cm} -\subsubsection{RPC name:~get\_HVM\_boot} - -{\bf Overview:} -Get the HVM/boot field of the given VM. - - \noindent {\bf Signature:} -\begin{verbatim} string get_HVM_boot (session_id s, VM ref self)\end{verbatim} +\subsubsection{RPC name:~get\_HVM\_boot\_policy} + +{\bf Overview:} +Get the HVM/boot\_policy field of the given VM. + + \noindent {\bf Signature:} +\begin{verbatim} string get_HVM_boot_policy (session_id s, VM ref self)\end{verbatim} \noindent{\bf Arguments:} @@ -3329,13 +3333,13 @@ value of the field \vspace{0.3cm} \vspace{0.3cm} \vspace{0.3cm} -\subsubsection{RPC name:~set\_HVM\_boot} - -{\bf Overview:} -Set the HVM/boot field of the given VM. - - \noindent {\bf Signature:} -\begin{verbatim} void set_HVM_boot (session_id s, VM ref self, string value)\end{verbatim} +\subsubsection{RPC name:~set\_HVM\_boot\_policy} + +{\bf Overview:} +Set the HVM/boot\_policy field of the given VM. + + \noindent {\bf Signature:} +\begin{verbatim} void set_HVM_boot_policy (session_id s, VM ref self, string value)\end{verbatim} \noindent{\bf Arguments:} @@ -3348,6 +3352,143 @@ Set the HVM/boot field of the given VM. {\tt VM ref } & self & reference to the object \\ \hline {\tt string } & value & New value to set \\ \hline + +\end{tabular} + +\vspace{0.3cm} + + \noindent {\bf Return Type:} +{\tt +void +} + + + +\vspace{0.3cm} +\vspace{0.3cm} +\vspace{0.3cm} +\subsubsection{RPC name:~get\_HVM\_boot\_params} + +{\bf Overview:} +Get the HVM/boot\_params field of the given VM. + + \noindent {\bf Signature:} +\begin{verbatim} ((string -> string) Map) get_HVM_boot_params (session_id s, VM ref self)\end{verbatim} + + +\noindent{\bf Arguments:} + + +\vspace{0.3cm} +\begin{tabular}{|c|c|p{7cm}|} + \hline +{\bf type} & {\bf name} & {\bf description} \\ \hline +{\tt VM ref } & self & reference to the object \\ \hline + +\end{tabular} + +\vspace{0.3cm} + + \noindent {\bf Return Type:} +{\tt +(string $\rightarrow$ string) Map +} + + +value of the field +\vspace{0.3cm} +\vspace{0.3cm} +\vspace{0.3cm} +\subsubsection{RPC name:~set\_HVM\_boot\_params} + +{\bf Overview:} +Set the HVM/boot\_params field of the given VM. + + \noindent {\bf Signature:} +\begin{verbatim} void set_HVM_boot_params (session_id s, VM ref self, (string -> string) Map value)\end{verbatim} + + +\noindent{\bf Arguments:} + + +\vspace{0.3cm} +\begin{tabular}{|c|c|p{7cm}|} + \hline +{\bf type} & {\bf name} & {\bf description} \\ \hline +{\tt VM ref } & self & reference to the object \\ \hline + +{\tt (string $\rightarrow$ string) Map } & value & New value to set \\ \hline + +\end{tabular} + +\vspace{0.3cm} + + \noindent {\bf Return Type:} +{\tt +void +} + + + +\vspace{0.3cm} +\vspace{0.3cm} +\vspace{0.3cm} +\subsubsection{RPC name:~add\_to\_HVM\_boot\_params} + +{\bf Overview:} +Add the given key-value pair to the HVM/boot\_params field of the given VM. + + \noindent {\bf Signature:} +\begin{verbatim} void add_to_HVM_boot_params (session_id s, VM ref self, string key, string value)\end{verbatim} + + +\noindent{\bf Arguments:} + + +\vspace{0.3cm} +\begin{tabular}{|c|c|p{7cm}|} + \hline +{\bf type} & {\bf name} & {\bf description} \\ \hline +{\tt VM ref } & self & reference to the object \\ \hline + +{\tt string } & key & Key to add \\ \hline + +{\tt string } & value & Value to add \\ \hline + +\end{tabular} + +\vspace{0.3cm} + + \noindent {\bf Return Type:} +{\tt +void +} + + + +\vspace{0.3cm} +\vspace{0.3cm} +\vspace{0.3cm} +\subsubsection{RPC name:~remove\_from\_HVM\_boot\_params} + +{\bf Overview:} +Remove the given key and its corresponding value from the HVM/boot\_params +field of the given VM. If the key is not in that Map, then do nothing. + + \noindent {\bf Signature:} +\begin{verbatim} void remove_from_HVM_boot_params (session_id s, VM ref self, string key)\end{verbatim} + + +\noindent{\bf Arguments:} + + +\vspace{0.3cm} +\begin{tabular}{|c|c|p{7cm}|} + \hline +{\bf type} & {\bf name} & {\bf description} \\ \hline +{\tt VM ref } & self & reference to the object \\ \hline + +{\tt string } & key & Key to remove \\ \hline \end{tabular} @@ -11758,6 +11899,17 @@ The handle parameter echoes the bad valu \begin{verbatim}TASK_HANDLE_INVALID(handle)\end{verbatim} \begin{center}\rule{10em}{0.1pt}\end{center} +\subsubsection{VALUE\_NOT\_SUPPORTED} + +You attempted to set a value that is not supported by this implementation. +The fully-qualified field name and the value that you tried to set are +returned. Also returned is a developer-only diagnostic reason. + +\vspace{0.3cm} +{\bf Signature:} +\begin{verbatim}VALUE_NOT_SUPPORTED(field, value, reason)\end{verbatim} +\begin{center}\rule{10em}{0.1pt}\end{center} + \subsubsection{VBD\_HANDLE\_INVALID} You gave an invalid VBD handle. The VBD may have recently been deleted. diff -r 0a4cbad6752c -r f73e71aa0a90 tools/libxen/include/xen_vm.h --- a/tools/libxen/include/xen_vm.h Thu Feb 01 14:15:37 2007 +0000 +++ b/tools/libxen/include/xen_vm.h Thu Feb 01 11:55:31 2007 +0000 @@ -42,9 +42,9 @@ * A virtual machine (or 'guest'). * * VM booting is controlled by setting one of the two mutually exclusive - * groups: "PV", and "HVM". If HVM.boot is the empty string, then paravirtual - * domain building and booting will be used; otherwise the VM will be loaded - * as an HVM domain, and booted using an emulated BIOS. + * groups: "PV", and "HVM". If HVM.boot_policy is the empty string, then + * paravirtual domain building and booting will be used; otherwise the VM will + * be loaded as an HVM domain, and booted using an emulated BIOS. * * When paravirtual booting is in use, the PV/bootloader field indicates the * bootloader to use. It may be "pygrub", in which case the platform's @@ -69,7 +69,10 @@ * PV/bootloader and PV/kernel are empty, then the behaviour is as if * PV/bootloader was specified as "pygrub". * - * When using HVM booting, HVM/boot specifies the order of the boot devices. + * When using HVM booting, HVM/boot_policy and HVM/boot_params specify the + * boot handling. Only one policy is currently defined: "BIOS order". In + * this case, HVM/boot_params should contain one key-value pair "order" = "N" + * where N is the string that will be passed to QEMU.. */ @@ -136,7 +139,8 @@ typedef struct xen_vm_record char *pv_ramdisk; char *pv_args; char *pv_bootloader_args; - char *hvm_boot; + char *hvm_boot_policy; + xen_string_string_map *hvm_boot_params; bool platform_std_vga; char *platform_serial; bool platform_localtime; @@ -490,10 +494,17 @@ xen_vm_get_pv_bootloader_args(xen_sessio /** - * Get the HVM/boot field of the given VM. - */ -extern bool -xen_vm_get_hvm_boot(xen_session *session, char **result, xen_vm vm); + * Get the HVM/boot_policy field of the given VM. + */ +extern bool +xen_vm_get_hvm_boot_policy(xen_session *session, char **result, xen_vm vm); + + +/** + * Get the HVM/boot_params field of the given VM. + */ +extern bool +xen_vm_get_hvm_boot_params(xen_session *session, xen_string_string_map **result, xen_vm vm); /** @@ -731,10 +742,34 @@ xen_vm_set_pv_bootloader_args(xen_sessio /** - * Set the HVM/boot field of the given VM. - */ -extern bool -xen_vm_set_hvm_boot(xen_session *session, xen_vm vm, char *boot); + * Set the HVM/boot_policy field of the given VM. + */ +extern bool +xen_vm_set_hvm_boot_policy(xen_session *session, xen_vm vm, char *boot_policy); + + +/** + * Set the HVM/boot_params field of the given VM. + */ +extern bool +xen_vm_set_hvm_boot_params(xen_session *session, xen_vm vm, xen_string_string_map *boot_params); + + +/** + * Add the given key-value pair to the HVM/boot_params field of the + * given VM. + */ +extern bool +xen_vm_add_to_hvm_boot_params(xen_session *session, xen_vm vm, char *key, char *value); + + +/** + * Remove the given key and its corresponding value from the + * HVM/boot_params field of the given VM. If the key is not in that Map, then + * do nothing. + */ +extern bool +xen_vm_remove_from_hvm_boot_params(xen_session *session, xen_vm vm, char *key); /** diff -r 0a4cbad6752c -r f73e71aa0a90 tools/libxen/src/xen_vm.c --- a/tools/libxen/src/xen_vm.c Thu Feb 01 14:15:37 2007 +0000 +++ b/tools/libxen/src/xen_vm.c Thu Feb 01 11:55:31 2007 +0000 @@ -145,9 +145,12 @@ static const struct_member xen_vm_record { .key = "PV_bootloader_args", .type = &abstract_type_string, .offset = offsetof(xen_vm_record, pv_bootloader_args) }, - { .key = "HVM_boot", + { .key = "HVM_boot_policy", .type = &abstract_type_string, - .offset = offsetof(xen_vm_record, hvm_boot) }, + .offset = offsetof(xen_vm_record, hvm_boot_policy) }, + { .key = "HVM_boot_params", + .type = &abstract_type_string_string_map, + .offset = offsetof(xen_vm_record, hvm_boot_params) }, { .key = "platform_std_VGA", .type = &abstract_type_bool, .offset = offsetof(xen_vm_record, platform_std_vga) }, @@ -216,7 +219,8 @@ xen_vm_record_free(xen_vm_record *record free(record->pv_ramdisk); free(record->pv_args); free(record->pv_bootloader_args); - free(record->hvm_boot); + free(record->hvm_boot_policy); + xen_string_string_map_free(record->hvm_boot_params); free(record->platform_serial); free(record->pci_bus); xen_string_string_map_free(record->tools_version); @@ -824,7 +828,7 @@ xen_vm_get_pv_bootloader_args(xen_sessio bool -xen_vm_get_hvm_boot(xen_session *session, char **result, xen_vm vm) +xen_vm_get_hvm_boot_policy(xen_session *session, char **result, xen_vm vm) { abstract_value param_values[] = { @@ -835,7 +839,24 @@ xen_vm_get_hvm_boot(xen_session *session abstract_type result_type = abstract_type_string; *result = NULL; - XEN_CALL_("VM.get_HVM_boot"); + XEN_CALL_("VM.get_HVM_boot_policy"); + return session->ok; +} + + +bool +xen_vm_get_hvm_boot_params(xen_session *session, xen_string_string_map **result, xen_vm vm) +{ + abstract_value param_values[] = + { + { .type = &abstract_type_string, + .u.string_val = vm } + }; + + abstract_type result_type = abstract_type_string_string_map; + + *result = NULL; + XEN_CALL_("VM.get_HVM_boot_params"); return session->ok; } @@ -1376,17 +1397,67 @@ xen_vm_set_pv_bootloader_args(xen_sessio bool -xen_vm_set_hvm_boot(xen_session *session, xen_vm vm, char *boot) -{ - abstract_value param_values[] = - { - { .type = &abstract_type_string, - .u.string_val = vm }, - { .type = &abstract_type_string, - .u.string_val = boot } - }; - - xen_call_(session, "VM.set_HVM_boot", param_values, 2, NULL, NULL); +xen_vm_set_hvm_boot_policy(xen_session *session, xen_vm vm, char *boot_policy) +{ + abstract_value param_values[] = + { + { .type = &abstract_type_string, + .u.string_val = vm }, + { .type = &abstract_type_string, + .u.string_val = boot_policy } + }; + + xen_call_(session, "VM.set_HVM_boot_policy", param_values, 2, NULL, NULL); + return session->ok; +} + + +bool +xen_vm_set_hvm_boot_params(xen_session *session, xen_vm vm, xen_string_string_map *boot_params) +{ + abstract_value param_values[] = + { + { .type = &abstract_type_string, + .u.string_val = vm }, + { .type = &abstract_type_string_string_map, + .u.set_val = (arbitrary_set *)boot_params } + }; + + xen_call_(session, "VM.set_HVM_boot_params", param_values, 2, NULL, NULL); + return session->ok; +} + + +bool +xen_vm_add_to_hvm_boot_params(xen_session *session, xen_vm vm, char *key, char *value) +{ + abstract_value param_values[] = + { + { .type = &abstract_type_string, + .u.string_val = vm }, + { .type = &abstract_type_string, + .u.string_val = key }, + { .type = &abstract_type_string, + .u.string_val = value } + }; + + xen_call_(session, "VM.add_to_HVM_boot_params", param_values, 3, NULL, NULL); + return session->ok; +} + + +bool +xen_vm_remove_from_hvm_boot_params(xen_session *session, xen_vm vm, char *key) +{ + abstract_value param_values[] = + { + { .type = &abstract_type_string, + .u.string_val = vm }, + { .type = &abstract_type_string, + .u.string_val = key } + }; + + xen_call_(session, "VM.remove_from_HVM_boot_params", param_values, 2, NULL, NULL); return session->ok; } diff -r 0a4cbad6752c -r f73e71aa0a90 tools/libxen/test/test_bindings.c --- a/tools/libxen/test/test_bindings.c Thu Feb 01 14:15:37 2007 +0000 +++ b/tools/libxen/test/test_bindings.c Thu Feb 01 11:55:31 2007 +0000 @@ -278,6 +278,8 @@ static xen_vm create_new_vm(xen_session static xen_vm create_new_vm(xen_session *session) { xen_string_string_map *vcpus_params = xen_string_string_map_alloc(1); + vcpus_params->contents[0].key = strdup("weight"); + vcpus_params->contents[0].val = strdup("300"); xen_vm_record vm_record = { .name_label = "NewVM", @@ -294,9 +296,10 @@ static xen_vm create_new_vm(xen_session .actions_after_shutdown = XEN_ON_NORMAL_EXIT_DESTROY, .actions_after_reboot = XEN_ON_NORMAL_EXIT_RESTART, .actions_after_crash = XEN_ON_CRASH_BEHAVIOUR_PRESERVE, - .hvm_boot = "", - //.pv_bootloader = "pygrub", - .pv_kernel = "/boot/vmlinuz-2.6.18-xenU", + .hvm_boot_policy = NULL, + .hvm_boot_params = NULL, + .pv_bootloader = "pygrub", + .pv_kernel = "/boot/vmlinuz-2.6.16.33-xen", .pv_ramdisk = "", .pv_args = "root=/dev/sda1 ro", .pv_bootloader_args = "" @@ -305,6 +308,8 @@ static xen_vm create_new_vm(xen_session xen_vm vm; xen_vm_create(session, &vm, &vm_record); + + xen_string_string_map_free(vcpus_params); if (!session->ok) { diff -r 0a4cbad6752c -r f73e71aa0a90 tools/python/xen/xend/XendAPI.py --- a/tools/python/xen/xend/XendAPI.py Thu Feb 01 14:15:37 2007 +0000 +++ b/tools/python/xen/xend/XendAPI.py Thu Feb 01 11:55:31 2007 +0000 @@ -974,7 +974,8 @@ class XendAPI(object): 'PV_ramdisk', 'PV_args', 'PV_bootloader_args', - 'HVM_boot', + 'HVM_boot_policy', + 'HVM_boot_params', 'platform_std_VGA', 'platform_serial', 'platform_localtime', @@ -1020,7 +1021,8 @@ class XendAPI(object): 'PV_ramdisk', 'PV_args', 'PV_bootloader_args', - 'HVM_boot', + 'HVM_boot_policy', + 'HVM_boot_params', 'platform_std_VGA', 'platform_serial', 'platform_localtime', @@ -1158,8 +1160,11 @@ class XendAPI(object): def VM_get_PV_bootloader_args(self, session, vm_ref): return self.VM_get('PV_bootloader_args', session, vm_ref) - def VM_get_HVM_boot(self, session, vm_ref): - return self.VM_get('HVM_boot', session, vm_ref) + def VM_get_HVM_boot_policy(self, session, vm_ref): + return self.VM_get('HVM_boot_policy', session, vm_ref) + + def VM_get_HVM_boot_params(self, session, vm_ref): + return self.VM_get('HVM_boot_params', session, vm_ref) def VM_get_platform_std_VGA(self, session, vm_ref): dom = XendDomain.instance().get_vm_by_uuid(vm_ref) @@ -1246,8 +1251,30 @@ class XendAPI(object): return xen_api_error(['VM_ON_CRASH_BEHAVIOUR_INVALID', vm_ref]) return self.VM_set('actions_after_crash', session, vm_ref, action) - def VM_set_HVM_boot(self, session, vm_ref, value): - return self.VM_set('HVM_boot', session, vm_ref, value) + def VM_set_HVM_boot_policy(self, session, vm_ref, value): + if value != "" and value != "BIOS order": + return xen_api_error( + ['VALUE_NOT_SUPPORTED', 'VM.HVM_boot_policy', value, + 'Xend supports only the "BIOS order" boot policy.']) + else: + return self.VM_set('HVM_boot_policy', session, vm_ref, value) + + def VM_set_HVM_boot_params(self, session, vm_ref, value): + return self.VM_set('HVM_boot_params', session, vm_ref, value) + + def VM_add_to_HVM_boot_params(self, session, vm_ref, key, value): + dom = XendDomain.instance().get_vm_by_uuid(vm_ref) + if 'HVM_boot_params' not in dom.info: + dom.info['HVM_boot_params'] = {} + dom.info['HVM_boot_params'][key] = value + return xen_api_success_void() + + def VM_remove_from_HVM_boot_params(self, session, vm_ref, key): + dom = XendDomain.instance().get_vm_by_uuid(vm_ref) + if 'HVM_boot_params' in dom.info \ + and key in dom.info['HVM_boot_params']: + del dom.info['HVM_boot_params'][key] + return xen_api_success_void() def VM_set_PV_bootloader(self, session, vm_ref, value): return self.VM_set('PV_bootloader', session, vm_ref, value) @@ -1354,7 +1381,8 @@ class XendAPI(object): 'PV_ramdisk': xeninfo.info.get('PV_ramdisk'), 'PV_args': xeninfo.info.get('PV_args'), 'PV_bootloader_args': xeninfo.info.get('PV_bootloader_args'), - 'HVM_boot': xeninfo.info.get('HVM_boot'), + 'HVM_boot_policy': xeninfo.info.get('HVM_boot_policy'), + 'HVM_boot_params': xeninfo.info.get('HVM_boot_params'), 'platform_std_VGA': xeninfo.get_platform_std_vga(), 'platform_serial': xeninfo.get_platform_serial(), 'platform_localtime': xeninfo.get_platform_localtime(), @@ -1622,7 +1650,7 @@ class XendAPI(object): xendom = XendDomain.instance() return xen_api_success(xendom.get_dev_property_by_uuid('vif', vif_ref, 'io_write_kbs')) - + def VIF_get_all(self, session): xendom = XendDomain.instance() vifs = [d.get_vifs() for d in XendDomain.instance().list('all')] diff -r 0a4cbad6752c -r f73e71aa0a90 tools/python/xen/xend/XendConfig.py --- a/tools/python/xen/xend/XendConfig.py Thu Feb 01 14:15:37 2007 +0000 +++ b/tools/python/xen/xend/XendConfig.py Thu Feb 01 11:55:31 2007 +0000 @@ -28,7 +28,7 @@ from xen.xend.XendConstants import DOM_S from xen.xend.XendConstants import DOM_STATE_HALTED log = logging.getLogger("xend.XendConfig") -log.setLevel(logging.WARN) +log.setLevel(logging.DEBUG) """ @@ -164,7 +164,8 @@ XENAPI_CFG_TYPES = { 'PV_ramdisk': str, 'PV_args': str, 'PV_bootloader_args': str, - 'HVM_boot': str, + 'HVM_boot_policy': str, + 'HVM_boot_params': dict, 'platform_std_vga': bool0, 'platform_serial': str, 'platform_localtime': bool0, @@ -361,7 +362,8 @@ class XendConfig(dict): 'PV_ramdisk': '', 'PV_args': '', 'PV_bootloader_args': '', - 'HVM_boot': '', + 'HVM_boot_policy': '', + 'HVM_boot_params': {}, 'memory_static_min': 0, 'memory_dynamic_min': 0, 'shadow_memory': 0, @@ -495,6 +497,12 @@ class XendConfig(dict): except (TypeError, ValueError), e: log.warn("Unable to parse key %s: %s: %s" % (key, str(val), e)) + + # Compatibility hack -- can go soon. + boot_order = sxp.child_value(sxp_cfg, 'HVM_boot') + if boot_order: + cfg['HVM_boot_policy'] = 'BIOS order' + cfg['HVM_boot_params'] = { 'order' : boot_order } # Parsing the device SXP's. In most cases, the SXP looks # like this: @@ -768,7 +776,7 @@ class XendConfig(dict): if 'image' in xapi_dict: self['image'].update(xapi_dict['image']) else: - hvm = self['HVM_boot'] != '' + hvm = self['HVM_boot_policy'] != '' self['image']['type'] = hvm and 'hvm' or 'linux' if hvm: self['image']['hvm'] = {'devices': {}} diff -r 0a4cbad6752c -r f73e71aa0a90 tools/python/xen/xend/XendDomainInfo.py --- a/tools/python/xen/xend/XendDomainInfo.py Thu Feb 01 14:15:37 2007 +0000 +++ b/tools/python/xen/xend/XendDomainInfo.py Thu Feb 01 11:55:31 2007 +0000 @@ -1648,14 +1648,15 @@ class XendDomainInfo: kernel = self.info['PV_kernel'] ramdisk = self.info['PV_ramdisk'] args = self.info['PV_args'] - boot = self.info['HVM_boot'] + boot = self.info['HVM_boot_policy'] if boot: # HVM booting. self.info['image']['type'] = 'hvm' if not 'devices' in self.info['image']: self.info['image']['devices'] = {} - self.info['image']['devices']['boot'] = boot + self.info['image']['devices']['boot'] = \ + self.info['HVM_boot_params'].get('order', 'dc') elif not blexec and kernel: # Boot from dom0. Nothing left to do -- the kernel and ramdisk # will be picked up by image.py. diff -r 0a4cbad6752c -r f73e71aa0a90 tools/python/xen/xm/messages/en/xen-xm.po --- a/tools/python/xen/xm/messages/en/xen-xm.po Thu Feb 01 14:15:37 2007 +0000 +++ b/tools/python/xen/xm/messages/en/xen-xm.po Thu Feb 01 11:55:31 2007 +0000 @@ -19,7 +19,7 @@ msgid "" msgid "" msgstr "" "Project-Id-Version: Xen-xm 3.0\n" -"PO-Revision-Date: 2007-01-30 17:15+0000\n" +"PO-Revision-Date: 2007-01-31 12:34+0000\n" "Last-Translator: Ewan Mellor <ewan@xxxxxxxxxxxxx>\n" "Language-Team: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>\n" "MIME-Version: 1.0\n" @@ -40,6 +40,9 @@ msgstr "The method %(1)s takes %(2)s arg msgid "SESSION_AUTHENTICATION_FAILED" msgstr "Permission denied." + +msgid "VALUE_NOT_SUPPORTED" +msgstr "Value \"%(2)s\" for %(1)s is not supported by this server. The server said \"%(3)s\"." msgid "HOST_CPU_HANDLE_INVALID" msgstr "The host_cpu handle %(1)s is invalid." _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |