LXD 프로파일 사용법
- LXD 프로파일은 컨테이너나 가상 머신을 생성할 때 적용할 수 있는 설정 모음
- 디바이스, 리소스 제한, 환경 변수 등을 미리 정의해 여러 컨테이너에 일관되게 적용
기본 명령어
프로파일 목록 확인
lxc profile list
특정 프로파일 정보 확인
lxc profile show <프로파일명>
새 프로파일 생성
lxc profile create <프로파일명>
프로파일 편집
lxc profile edit <프로파일명>
프로파일 삭제
lxc profile delete <프로파일명>
프로파일 설정 예시
디바이스 추가 (디스크 마운트)
lxc profile device add <프로파일명> <디바이스명> disk source=<호스트경로> path=<컨테이너내경로>
CPU 제한 설정
lxc profile set <프로파일명> limits.cpu=2
메모리 제한 설정
lxc profile set <프로파일명> limits.memory=2GB
컨테이너에 프로파일 적용
컨테이너 생성 시 프로파일 적용
lxc launch <이미지> <컨테이너명> --profile <프로파일명>
기존 컨테이너에 프로파일 적용
lxc profile assign <컨테이너명> <프로파일명>
여러 프로파일 적용
lxc profile assign <컨테이너명> <프로파일1>,<프로파일2>
댓글 없음:
댓글 쓰기