[lxc-users] LXD newbie question

Stéphane Graber stgraber at ubuntu.com
Fri May 29 20:49:20 UTC 2015


On Fri, May 29, 2015 at 04:40:46PM -0400, Wajih Ahmed wrote:
> On Ubutu 15.04 i did the following as par the instructions from
> linuxcontainers.org
> 
> apt-get update
> apt-get install lxd
> 
> When i try to import an image
> 
> lxd-images import lxc ubuntu trusty amd64 --alias ubuntu
> 
> I get the following message
> 
> LXD isn't running!
> 
> So i think the instructions need to be updated to state that the
> daemon has to be manually
> started like the old times.
> 
> But after starting the daemon i am now getting the following error
> 
> Downloading the image:
> https://images.linuxcontainers.org/images/ubuntu/trusty/amd64/default/20150523_03:49/lxd.tar.xz
> Validating the GPG signature of
> /tmp/tmp04sp57ye/ubuntu-trusty-amd64-default-20150523_03:49.tar.xz.asc
> Traceback (most recent call last):
>   File "/usr/bin/lxd-images", line 410, in <module>
>     args.func(parser, args)
>   File "/usr/bin/lxd-images", line 361, in import_lxc
>     if fingerprint in lxd.images_list():
>   File "/usr/bin/lxd-images", line 99, in images_list
>     status, data = self.rest_call("/1.0/images")
>   File "/usr/bin/lxd-images", line 70, in rest_call
>     self.lxd.request(method, path, data)
>   File "/usr/lib/python3.4/http/client.py", line 1088, in request
>     self._send_request(method, url, body, headers)
>   File "/usr/lib/python3.4/http/client.py", line 1126, in _send_request
>     self.endheaders(body)
>   File "/usr/lib/python3.4/http/client.py", line 1084, in endheaders
>     self._send_output(message_body)
>   File "/usr/lib/python3.4/http/client.py", line 922, in _send_output
>     self.send(msg)
>   File "/usr/lib/python3.4/http/client.py", line 857, in send
>     self.connect()
>   File "/usr/bin/lxd-images", line 55, in connect
>     sock.connect(self.path)
> PermissionError: [Errno 13] Permission denied
> 
> And eventhough i below to the lxd group (and i did newgrp) i had to
> repeat the above command with sudo and then
> the permission error went away.
> 
> Can the page be updated with this info also please.  Let me know if
> did something wrong.
> 
> Regards,

The instructions are fine, what needs fixing is the package in Ubuntu
15.04 so that it actually starts the daemon automatically as it should
(that's been fixed since, just not backported to 15.04).

As for lxd-images, are you running it from the same shell your ran newgrp from?

To clarify how newgrp works, it will spawn a new shell inside the shell
it's called from which will be in the group you passed it, all your
other shells still lack the group membership. The only way to fix group
membership for all shells is to logout and login again.


-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20150529/8890feb0/attachment.sig>


More information about the lxc-users mailing list