Difference between revisions of "Lxc launch"

From UVOO Tech Wiki
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
lxc launch images:debian/11 bullseye-vm --vm
 
lxc launch images:debian/11 bullseye-vm --vm
 +
 +
```
 +
lxc init ubuntu:22.04 --vm -c limits.cpu=6 -c limits.memory=12GB docker
 +
lxc config device override docker root size=100GB
 +
lxc start docker
 +
```
  
  
 
lxc launch images:debian/11 docker-server --vm -c limits.cpu=4 -c limits.memory=12GiB -d root,size=50GiB
 
lxc launch images:debian/11 docker-server --vm -c limits.cpu=4 -c limits.memory=12GiB -d root,size=50GiB
 +
  
  
Line 16: Line 23:
 
lxc config device override ${VM} root size=${DISK}
 
lxc config device override ${VM} root size=${DISK}
 
lxc start ${VM}
 
lxc start ${VM}
 +
```
 +
 +
# Centos7
 +
```
 +
lxc launch images:centos/7/amd64 centos7
 
```
 
```

Latest revision as of 15:43, 23 June 2023

lxc launch images:debian/11 bullseye-vm --vm

lxc init ubuntu:22.04 --vm -c limits.cpu=6 -c limits.memory=12GB docker
lxc config device override docker root size=100GB
lxc start docker

lxc launch images:debian/11 docker-server --vm -c limits.cpu=4 -c limits.memory=12GiB -d root,size=50GiB

s. Assumptions: 1) One zfs pool called ‘default’ that lives on the hard drive at /var/lib/lxd/disks/default.img. 2) Running as root. 3) Growing pool ‘default’ from 25GB to 45GB. Stop all running containers. #truncate -s +20G /var/lib/lxd/disks/default.img #zpool set autoexpand=on default #zpool status -vg default 4a. Note th…
lxc init images:ubuntu/focal ${VM} -p default -p vm --vm
lxc config set ${VM} limits.cpu ${CPU}
lxc config set ${VM} limits.memory ${MEM}
lxc config device override ${VM} root size=${DISK}
lxc start ${VM}

Centos7

lxc launch images:centos/7/amd64 centos7