Ubuntu Pastebin

Paste from Chad Smith at Mon, 6 Nov 2017 21:52:47 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
$ cat hostname.yaml 
#cloud-config
fqdn: xyz.domain.com
hostname: wxy


$ lxc init ubuntu-daily:xenial x12
$ lxc config set x12 user.user-data - < hostname.yaml
$ lxc start x12
csmith@uptown:~$ lxc exec x12 -- cat /etc/hosts
127.0.0.1 localhost

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
csmith@uptown:~$ lxc exec x12 -- hostname
wxy
csmith@uptown:~$ lxc exec x12 -- hostname --fqdn
wxy.lxd
csmith@uptown:~$ 
Download as text