Hi tomp,
thanks for your help.
Sorry but what’s the different between my command and your example? My instance is called webserver.
lxc config edit webserver < webserver.yaml
lxc config edit <instance> < config.yaml
My procedure is …
lxc config show webserver > config.yaml
- edit config.yaml
lxc config edit webserver < config.yaml
- Error
Error: Failed to remove device "127.0.0.1:80": Device remove validation failed for "127.0.0.1:80": Name must not start with a number
org. config.yaml
architecture: x86_64
config:
image.architecture: amd64
image.description: ubuntu 20.04 LTS amd64 (release) (20201117)
image.label: release
image.os: ubuntu
image.release: focal
image.serial: "20201117"
image.type: squashfs
image.version: "20.04"
volatile.base_image: c141ba91f766aab428b64f0e2f64b11e583093c2f4e52b4f6c8baa32021d413d
volatile.eth0.hwaddr: 00:16:3e:09:ee:e2
volatile.idmap.base: "0"
volatile.idmap.current: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
volatile.idmap.next: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
volatile.last_state.idmap: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
volatile.last_state.power: RUNNING
volatile.uuid: 12b6fd29-7155-4bd6-aaeb-0b24dd96ceae
devices:
127.0.0.1:80:
connect: tcp:10.50.137.55:80
listen: tcp:127.0.0.1:80
type: proxy
127.0.0.1:443:
connect: tcp:10.50.137.55:443
listen: tcp:127.0.0.1:443
type: proxy
ephemeral: false
profiles:
- default
stateful: false
description: ""
type or paste code here
my new config.yaml
architecture: x86_64
config:
image.architecture: amd64
image.description: ubuntu 20.04 LTS amd64 (release) (20201117)
image.label: release
image.os: ubuntu
image.release: focal
image.serial: "20201117"
image.type: squashfs
image.version: "20.04"
volatile.base_image: c141ba91f766aab428b64f0e2f64b11e583093c2f4e52b4f6c8baa32021d413d
volatile.eth0.hwaddr: 00:16:3e:09:ee:e2
volatile.idmap.base: "0"
volatile.idmap.current: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
volatile.idmap.next: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
volatile.last_state.idmap: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
volatile.last_state.power: RUNNING
volatile.uuid: 12b6fd29-7155-4bd6-aaeb-0b24dd96ceae
devices:
webserverport80:
connect: tcp:10.50.137.55:80
listen: tcp:127.0.0.1:80
type: proxy
webserverport443:
connect: tcp:10.50.137.55:443
listen: tcp:127.0.0.1:443
type: proxy
ephemeral: false
profiles:
- default
stateful: false
description: ""