Created
March 28, 2018 17:20
-
-
Save bnjdg/a59db4c04efd6a23fbc84550c931bf5c to your computer and use it in GitHub Desktop.
create lxd ct with static ip
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create the network config | |
vi network-config.yml | |
version: 1 | |
config: | |
- type: physical | |
name: eth0 | |
subnets: | |
- type: static | |
ipv4: true | |
address: 10.10.10.10 | |
netmask: 255.255.255.0 | |
gateway: 10.10.10.1 | |
control: auto | |
- type: nameserver | |
address: 8.8.8.8 | |
Launch the container with the static network config | |
lxc launch ubuntu:16.04 test3 --config=user.network-config="$(cat network-config.yml)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment