Changes between Version 9 and Version 10 of TutorialSetupLXC


Ignore:
Timestamp:
Jul 11, 2019, 8:41:26 AM (5 years ago)
Author:
admin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TutorialSetupLXC

    v9 v10  
    5454LXC should be built in by default. (You need to run these commands as sudo )
    5555
    56 * `lxc version`
     56* `sudo lxc version`
    5757
    5858
    59591. Initiate LXC (single host)
    6060
    61 * `lxd init`
     61* `sudo lxd init`
     62
    6263{{{
    6364Would you like to use LXD clustering? (yes/no) [default=no]:
    6465Do you want to configure a new storage pool? (yes/no) [default=yes]:
    6566Name of the new storage pool [default=default]:
    66 Name of the storage backend to use (btrfs, ceph, dir, lvm, zfs) [default=zfs]: dir
     67Name of the storage backend to use (btrfs, dir, lvm) [default=btrfs]: dir
    6768Would you like to connect to a MAAS server? (yes/no) [default=no]:
    68 Would you like to create a new local network bridge? (yes/no) [default=yes]:
    69 What should the new bridge be called? [default=lxdbr0]:
    70 What IPv4 address should be used? (CIDR subnet notation, “auto” or “none”) [default=auto]:
    71 What IPv6 address should be used? (CIDR subnet notation, “auto” or “none”) [default=auto]:
    72 Would you like LXD to be available over the network? (yes/no) [default=no]: yes
     69Would you like to create a new local network bridge? (yes/no) [default=yes]: no
     70Would you like to configure LXD to use an existing bridge or host interface? (yes/no) [default=no]: no
     71Would you like LXD to be available over the network? (yes/no) [default=no]:
    7372Would you like stale cached images to be updated automatically? (yes/no) [default=yes]
    7473Would you like a YAML "lxd init" preseed to be printed? (yes/no) [default=no]:
    7574}}}
     75
     76
    7677
    7778
     
    105106* Check IP address of the host machine: `ifconfig`
    106107
     108{{{#!comment
    107109
    108110* Enter  `sudo lxc network edit lxdbr0`
    109111  and edit,
    110 {{{
     112
    111113  ipv4.address: 192.248.xx.yy/24
    112114  ipv4.nat: "false"
     115
     116}}}
     117
     118* Modify the default container profile to add bridged network: `lxc profile edit default`
     119
     120{{{
     121
     122config: {}
     123description: Default LXD profile
     124devices:
     125  eth0:
     126    nictype: bridged
     127    parent: lxdbr0
     128    type: nic
     129  root:
     130    path: /
     131    pool: default
     132    type: disk
     133name: default
     134used_by: []
    113135}}}
    114136
     
    117139
    118140
    119 * `lxc remote list`
     141* `sudo lxc remote list`
    120142
    121143
     
    123145
    124146
    125 * `lxc image list`
     147* `sudo lxc image list`
    126148
    127149
     
    129151
    130152
    131 * `lxc image list images:`
    132 
    133 
    134 * `lxc image list images:ubuntu`
     153* `sudo lxc image list images:`
     154
     155
     156* `sudo lxc image list images:ubuntu`
    135157
    136158
     
    139161
    140162
    141 * `lxc launch ubuntu:18.04 test-ct`
    142 
    143 * `lxc list`
     163* `sudo lxc launch ubuntu:18.04 test-ct`
     164
     165* `sudo lxc list`
    144166
    145167
    146168   Delete a container
    147169
    148 * `lxc stop test-ct`
    149 
    150 * `lxc delete --force test-ct`
     170* `sudo lxc stop test-ct`
     171
     172* `sudo lxc delete --force test-ct`
    151173
    1521746. Create Three Production LXCs for your institute