lxd-webgui icon indicating copy to clipboard operation
lxd-webgui copied to clipboard

LXD-WEBGUI network access - cmd question

Open bmullan opened this issue 8 years ago • 3 comments

On my Ubuntu 16.04 system the following command is not accepted:

$ **sudo lxc config set core.https_allowed_origin ***

It responds with list of lxc config example statements and the error msg that the above command has: error: wrong number of subcommand arguments

                    = = = = = = = = = = = =

$ sudo lxc config set core.https_allowed_origin [sudo] password for bmullan:

lxc config device add [:] [key=value...] Add a device to a container. lxc config device get [:] Get a device property. lxc config device set [:] Set a device property. lxc config device unset [:] Unset a device property. lxc config device list [:] List devices for container. lxc config device show [:] Show full device details for container. lxc config device remove [:] Remove device from container.

lxc config get [:][container] Get container or server configuration key. lxc config set [:][container] Set container or server configuration key. lxc config unset [:][container] Unset container or server configuration key. lxc config show [:][container] [--expanded] Show container or server configuration. lxc config edit [:][container] Edit container or server configuration in external editor. Edit configuration, either by launching external editor or reading STDIN. Example: lxc config edit # launch editor cat config.yaml | lxc config edit # read from config.yaml

lxc config trust list [:] List all trusted certs. lxc config trust add [:] <certfile.crt> Add certfile.crt to trusted hosts. lxc config trust remove [:] [hostname|fingerprint] Remove the cert from trusted hosts.

Examples: To mount host's /share/c1 onto /opt in the container: lxc config device add [:]container1 disk source=/share/c1 path=opt

To set an lxc config value: lxc config set [:] raw.lxc 'lxc.aa_allow_incomplete = 1'

To listen on IPv4 and IPv6 port 8443 (you can omit the 8443 its the default): lxc config set core.https_address [::]:8443

To set the server trust password: lxc config set core.trust_password blah

error: wrong number of subcommand arguments

bmullan avatar Feb 16 '17 13:02 bmullan

Ah, probably because shell expands the star *.

Have you tried adding quotes:

lxc config set core.https_allowed_origin "*"

dobin avatar Feb 17 '17 10:02 dobin

That was it... re adding quotes.

You might want to change the command in the README..

thanks brian

On Fri, Feb 17, 2017 at 5:22 AM, Dobin Rutishauser <[email protected]

wrote:

Ah, probably because shell expands the star *.

Have you tried adding quotes:

lxc config set core.https_allowed_origin "*"

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dobin/lxd-webgui/issues/38#issuecomment-280612716, or mute the thread https://github.com/notifications/unsubscribe-auth/ABmtp9W6TC_ug5sUw3m9Bx6FFeeEjUixks5rdXT3gaJpZM4MDBFu .

bmullan avatar Feb 17 '17 12:02 bmullan

will update README.

dobin avatar Feb 17 '17 13:02 dobin