mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
bootloader_args is named bootargs in xen-xm
According to <xen-3.4.3/tools/python/xen/xm/create.py:158>
gopts.var('bootargs', val='NAME',
fn=set_value, default=None,
use="Arguments to pass to boot loader")
the "bootloader_args" parameter needs to be translated into "bootargs"
when using "virsh domxml-to-native xen-xm".
The reverse direction (domxml-from-native) is already okay.
This patch fixes domxml-to-native and adds two test files to catch this
problem.
Signed-off-by: Philipp Hahn <hahn@univention.de>
This commit is contained in:
@@ -2346,7 +2346,7 @@ virConfPtr xenXMDomainConfigFormat(virConnectPtr conn,
|
|||||||
xenXMConfigSetString(conf, "bootloader", def->os.bootloader) < 0)
|
xenXMConfigSetString(conf, "bootloader", def->os.bootloader) < 0)
|
||||||
goto no_memory;
|
goto no_memory;
|
||||||
if (def->os.bootloaderArgs &&
|
if (def->os.bootloaderArgs &&
|
||||||
xenXMConfigSetString(conf, "bootloader_args", def->os.bootloaderArgs) < 0)
|
xenXMConfigSetString(conf, "bootargs", def->os.bootloaderArgs) < 0)
|
||||||
goto no_memory;
|
goto no_memory;
|
||||||
if (def->os.kernel &&
|
if (def->os.kernel &&
|
||||||
xenXMConfigSetString(conf, "kernel", def->os.kernel) < 0)
|
xenXMConfigSetString(conf, "kernel", def->os.kernel) < 0)
|
||||||
|
|||||||
11
tests/xmconfigdata/sexpr2xml-pv-bootloader.cfg
Normal file
11
tests/xmconfigdata/sexpr2xml-pv-bootloader.cfg
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
name = "pvtest"
|
||||||
|
uuid = "596a5d21-71f4-8fb2-e068-e2386a5c413e"
|
||||||
|
maxmem = 420
|
||||||
|
memory = 420
|
||||||
|
vcpus = 2
|
||||||
|
bootloader = "/usr/bin/pypxeboot"
|
||||||
|
bootargs = "mac=AA:00:86:e2:35:72"
|
||||||
|
on_poweroff = "destroy"
|
||||||
|
on_reboot = "destroy"
|
||||||
|
on_crash = "destroy"
|
||||||
|
disk = [ "file:/root/some.img,xvda,w" ]
|
||||||
26
tests/xmconfigdata/sexpr2xml-pv-bootloader.xml
Normal file
26
tests/xmconfigdata/sexpr2xml-pv-bootloader.xml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<domain type='xen' id='6'>
|
||||||
|
<name>pvtest</name>
|
||||||
|
<uuid>596a5d21-71f4-8fb2-e068-e2386a5c413e</uuid>
|
||||||
|
<memory>430080</memory>
|
||||||
|
<currentMemory>430080</currentMemory>
|
||||||
|
<vcpu>2</vcpu>
|
||||||
|
<bootloader>/usr/bin/pypxeboot</bootloader>
|
||||||
|
<bootloader_args>mac=AA:00:86:e2:35:72</bootloader_args>
|
||||||
|
<os>
|
||||||
|
<type>linux</type>
|
||||||
|
</os>
|
||||||
|
<clock offset='utc'/>
|
||||||
|
<on_poweroff>destroy</on_poweroff>
|
||||||
|
<on_reboot>destroy</on_reboot>
|
||||||
|
<on_crash>destroy</on_crash>
|
||||||
|
<devices>
|
||||||
|
<disk type='file' device='disk'>
|
||||||
|
<driver name='file'/>
|
||||||
|
<source file='/root/some.img'/>
|
||||||
|
<target dev='xvda' bus='xen'/>
|
||||||
|
</disk>
|
||||||
|
<console type='pty'>
|
||||||
|
<target type='xen' port='0'/>
|
||||||
|
</console>
|
||||||
|
</devices>
|
||||||
|
</domain>
|
||||||
Reference in New Issue
Block a user