Proxmox Virtual Environment Complete Course Part 8 - Creating Container Templates

preview_player
Показать описание
Welcome back to LearnLinuxTV's full course on Proxmox Virtual Environment! In class #8, we look at the process of converting a container into a template, that can then be used as a basis for launching additional containers.

# Other episodes:
Class 08 - Setting up Container Templates: This video
Class 10 - Backups and Snapshots: Coming soon!
Class 11 - Integrated Firewall: Coming soon

*⏰ TIME CODES*:
00:00 - Intro
02:16 - General info on converting a container to a template
03:00 - Installing updates inside the container
03:44 - Running a few commands to clean the container before converting
05:42 - Purging /etc/machine-id
06:32 - Converting the container to a template
07:11 - Cloning the template into a VM
09:07 - Resetting the OpenSSH host keys within the container

# About Me
🐦 Follow me on Twitter!

*📘 FAQ*

#Proxmox #Docker #Containers
Рекомендации по теме
Комментарии
Автор

@8:37 as was said in the comments of the VM video:
"Craftsman Shops Woodworking:

Hi Jay great tutorial congrats on your next season in life. Just so everyone knows they may have to run sudo dpkg-reconfigure openssh-server first in the Proxmox VNC terminal. This will rebuild the SSH keys. Thanks again keep up the good work."

This was required before I could SSH into the cloned containers.

Others have stated to avoid needing this command to instead run "cloud-init clean" as the last operation on the VM or CT that is to be converted into a template. By doing so, when that VM or CT is booted after being cloned, Cloud-Init will see it as a first boot and rebuild the SSH keys. It's 2022 and it doesn't look Jay has addressed this any where in comments or description.

ermmoore
Автор

Thanks! I've been watching your whole Proxmox VE course and really appreciate the content and presentation. A new server should be arriving next week for me start setting my first Proxmox instance.

Wayne_Robinson
Автор

The IP address conflicts associated with not clearing the machine-id file in prior template tutorials took forever to figure out.... until I found your post from a while back with the same issue. Glad you can fix the issues from within the template. Great video!

ryanbell
Автор

best proxmox tutorial so far ! great work buddy

glensonrosos
Автор

Thank you for you course..it's great.. just to let you know that with proxmox version 8 it is not necessary to truncate the machine-id as you describe.I have give it a try and each CT i have create from the CT template has obtain a unique machine id automatically.

cristoforopontikas
Автор

Thank you, Jay; you are a great professor. I really appreciate your content.

cgarafulic
Автор

Thank you so much for sharing your knowledge. Quick info just in case somebody experience the same problem as i did after cloning container.
ssh(d).service issue on cloned containers was solved using "ssh-keygen -A" & "systemctl restart ssh.service" in my case. Thank you very much.

dinopavlov
Автор

I think you have some of the best Linux videos.

fernwood
Автор

Thank you for getting me into Arch linux a few years back, I've learned a lot from your channel.

bryanporth
Автор

Would have been nice to also have a section on hosting a docker container and even creating a network cluster of docker containers and volumes using docker-compose

stephenyork
Автор

if you getting "kex_exchange_identification: read: Connection reset", try "sudo dpkg-reconfigure openssh-server" in server console.

Tonaszkraj
Автор

This is an awesome series! Makes YouTube's existence worthwhile! Appreciate all you do, Jay.

solidUntilLiquidBeforeGas
Автор

This Proxmox series is very interesting ! 😃
At the begining, before convert to template, you make "apt update etc" and clean and autoremove. This can reduce the size of the template.

Why not doing a "logrotate" to compress or remove logs ?
Logs are not usefull in a template, and sometime take a lot of place 🤔
Thanks

DidierMisson
Автор

Why did you reset the host keys a second time, after the new clones were started?

ch
Автор

Hello! This has been a fantastic series and helped me get started on Prixmox 7. I have an Ubuntu 20.04 container running, with Home Assistant running as a docker container. An issue I've run into is passing a USB device to home assistant. I've tried to follow a couple guides on forums but so far no luck. I was thinking and hoping maybe this could be a topic for a future video.
I do realize running HA in a VM is also possible and is actually what I'm doing now, however I've found I actually like HA in a container better.

techdad
Автор

6:15 how come and you didnt check here for the symbolic link points to the machine id as in the VM guide

ierosgr
Автор

Do containers have a GUI like VMs have? Or is just terminal control? Thanks

Icht
Автор

I've noticed with starting from a template for both containers and virtual machines. i have to manually restart ssh hostkeys after cloning, but it seems you haven't had to do that in your tutorials. do you know why that is?

joshuaachorn
Автор

How come that you had to remove the SSH host keys right after starting the container? You deleted them in the template, right?

jackmclane
Автор

You removed the SSH host keys from the template, so when starting up each new cloned container wouldn't the startup process generate new host keys when the ssh daemon is first started?
UPDATE: I just went into my laptops /etc/ssh directory, rm ssh_host_*, ls -l (no host keys), systemctl restart sshd and all the host key files were automatically recreated without needing to dpkg-reconfigure sshd.

MarkConstable