From 862b0775989d41ddb50346719b28fda969bd6570 Mon Sep 17 00:00:00 2001 From: Nitesh Konkar Date: Mon, 12 Aug 2019 19:15:32 +0530 Subject: [PATCH] image_builder: create /etc/resolv.conf Since the image rootfs is readonly, we create an empty /etc/resolv.conf which the agent would later bind-remount as read-write. Fixes: #345 Signed-off-by: Nitesh Konkar --- image-builder/image_builder.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/image-builder/image_builder.sh b/image-builder/image_builder.sh index 7d7178dc6..d7878c0cf 100755 --- a/image-builder/image_builder.sh +++ b/image-builder/image_builder.sh @@ -391,6 +391,9 @@ create_rootfs_image() { info "Creating empty machine-id to allow systemd to bind-mount it" touch "${mount_dir}/etc/machine-id" + info "Creating empty resolv.conf to allow kata-agent to bind-mount it" + touch "${mount_dir}/etc/resolv.conf" + info "Unmounting root partition" umount "${mount_dir}" OK "Root partition unmounted"