-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lxc-create fails to create a -B loop container #845
Comments
Hi,
could you show exactly the command you used, and the output it gave?
|
root@ubuntu5:/home/ubuntu5# MIRROR=http://10.8.91.175/Soft_Linux/Repos/ubuntu/trusty lxc-create -t ubuntu -n fail -B loop I defined my mirror address because I dont't use the internet defined mirror in the ubuntu template |
I found a fix. It just need to put a "-F" into the execlp. # git diff diff --git a/src/lxc/bdev/bdev.c b/src/lxc/bdev/bdev.c index 090b685..955ab1b 100644 --- a/src/lxc/bdev/bdev.c +++ b/src/lxc/bdev/bdev.c @@ -721,7 +721,7 @@ int do_mkfs(const char *path, const char *fstype) // us about whether to proceed. if (null_stdfds() < 0) exit(1); - execlp("mkfs", "mkfs", "-t", fstype, path, (char *)NULL); + execlp("mkfs", "mkfs", "-F", "-t", fstype, path, (char *)NULL); exit(1); } |
I wish to commit the changes, may i know how to help on this please? |
On Thu, Mar 24, 2016 at 09:18:37PM -0700, englebert wrote:
This is not an mkfs option. it is an mkfs.ext option. For instance mkfs.-t xfs -F xxx fails. So you'll need to tweak the patch to only do this for
|
On Thu, Mar 24, 2016 at 09:35:53PM -0700, englebert wrote:
Make the change in your github.com/englebert/lxc tree (make the change |
Thanks Hallyn. |
Hello I tried to create a loop container and I typed "lxc-create -n name -t ubuntu -B loop" it fails to create the container but I tried to start a loop container I created using lxc on debian jessie and it works perfect, so the problem is just to create loop containers in ubuntu 14.04, any ideas? Thank you
The text was updated successfully, but these errors were encountered: