mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-18 10:35:20 +00:00
LXC from native: map lxc.arch to /domain/os/type@arch
This commit is contained in:
parent
5b8bfb0276
commit
0f13a525d2
@ -797,6 +797,15 @@ lxcParseConfigString(const char *config)
|
||||
if (VIR_STRDUP(vmdef->os.type, "exe") < 0)
|
||||
goto error;
|
||||
|
||||
if ((value = virConfGetValue(properties, "lxc.arch")) && value->str) {
|
||||
virArch arch = virArchFromString(value->str);
|
||||
if (arch == VIR_ARCH_NONE && STREQ(value->str, "x86"))
|
||||
arch = VIR_ARCH_I686;
|
||||
else if (arch == VIR_ARCH_NONE && STREQ(value->str, "amd64"))
|
||||
arch = VIR_ARCH_X86_64;
|
||||
vmdef->os.arch = arch;
|
||||
}
|
||||
|
||||
if (VIR_STRDUP(vmdef->os.init, "/sbin/init") < 0)
|
||||
goto error;
|
||||
|
||||
|
@ -14,6 +14,7 @@ lxc.mount.entry = tmpfs run tmpfs size=8m,mode=0755,nodev,nosuid 0 0
|
||||
lxc.mount.entry = /etc/resolv.conf etc/resolv.conf none bind,ro 0 0
|
||||
lxc.rootfs = /var/lib/lxc/migrate_test/rootfs
|
||||
lxc.utsname = migrate_test
|
||||
lxc.arch = x86
|
||||
lxc.autodev=1
|
||||
lxc.tty = 2
|
||||
lxc.pts = 1024
|
||||
|
@ -5,7 +5,7 @@
|
||||
<currentMemory unit='KiB'>0</currentMemory>
|
||||
<vcpu placement='static' current='0'>1</vcpu>
|
||||
<os>
|
||||
<type>exe</type>
|
||||
<type arch='i686'>exe</type>
|
||||
<init>/sbin/init</init>
|
||||
</os>
|
||||
<clock offset='utc'/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user