Make sure to delete the CloudInit drive from each VM you clone, once you've tested it works
@sinisterpisces
2 ай бұрын
This is an amazing tutorial. I really appreciate your teaching style: by starting from zero but still explaining some of the more advanced options and when to (not) use them, you always leave me with a real sense that I understand *why* something works and that I'm not just pushing buttons and clicking things to make the mysterious black box spit out a result that I want. :) I really liked the advice to start with a master Linux template and base the Debian template off that one. I've not seen another guide do that, and it's been tickling the back of my mind uncomfortably for a week or so of researching this. Having one parent template that everything else springs from really helps me keep this ordered in my head, even before the benefits to actual deployment. I did have a few questions. My local storage is ZFS-based (an NVME mirror), and my eventual NAS-based storage will be ZFS-based as well (via TrueNAS/NFS). I'm starting out with local storage and planning to migrate to shared storage/the NAS later. This confuses me a bit, as it seems like I need to deal with RAW disks now (local storage), but will need to use qcow2 later (shared storage)? Is it possible to convert raw disks to qcow2 disks? Do I even need to do that? I've yet to find any guides to migrating VMs from local to shared storage with ZFS-based storage.
@TechTutorialsDavidMcKone
2 ай бұрын
Thanks for the feedback and good to know the video was helpful As for the drives, I've found Proxmox VE lets you change the format during a migration of the drive And it's better to use qcow2 than raw because then you can snapshot the VM, but you can only use raw when a physical drive is using LVM formatting If a drive is raw now, you can change that when you migrate it to a ZFS storage for instance, you'll probably find it will even chose qcow2 by default To migrate a drive, go into the hardware section of the VM, select the drive and in the top menu is a drop down menu called Disk Action Click on that and select Move Storage Then select the target storage and format choice I always tick the option at the bottom to delete the source drive whenever I migrate a drive, because otherwise it just wastes disk space Basically it copies the original file to the new target so that option is just an extra step to remove the original source file
@r2d23kk
4 ай бұрын
I like how you explore all the useful options in each video :)
@TechTutorialsDavidMcKone
4 ай бұрын
Thanks for the feedback, always appreciated
@Aruneh
9 ай бұрын
Great video, much easier to follow than all the young and hip youtubers.
@TechTutorialsDavidMcKone
9 ай бұрын
Glad to know you find the video helpful and liked the style Appreciate the feedback
@vitusyu9583
4 ай бұрын
Thanks for your content! I have just setup my new Proxmox, and I am just spinning up a few nodes to run k8s. I’ve got some more knowledge of how Proxmox works after watching your demo.
@TechTutorialsDavidMcKone
4 ай бұрын
Thanks for the feedback And good to know the video was helpful
@BillyDickson
9 ай бұрын
Thanks Dave, much appreciated, something for me to play about with during the festive period. 👍
@TechTutorialsDavidMcKone
9 ай бұрын
Good to know you like the video I think coupling this with Ansible is going to save a lot of time
@khaalidi
9 ай бұрын
The content is incredibly informative, and I appreciate the effort you put into explaining everything so clearly. Thanks for creating such valuable and enjoyable content - keep up the great work! 👏👍
@TechTutorialsDavidMcKone
9 ай бұрын
Thanks for the feedback and good to know you found the video useful
@joezaino4674
4 ай бұрын
Well, I was there and I saw what you did and I found it very useful.
@TechTutorialsDavidMcKone
4 ай бұрын
That's good to know
@michaelcooper5490
9 ай бұрын
You nailed it again David, Great job. I am becoming a huge fan,
@TechTutorialsDavidMcKone
9 ай бұрын
Good to know the videos are helpful I've plenty more in the pipeline so hopefully you'll find a benefit in them
@thisiswaytoocomplicated
9 ай бұрын
To me cloud-init only makes sense with actual cloud-providers. Because that is the lowest common denominator and the best you can get in that area. Proxmox you run yourself so you are not limited by this constraints. You have full control and access. No need to limit yourself. So personally I prefer ansible for automation (or you can use puppet or chef, etc.). You can manage Proxmox itself with it. You can manage and configure virtual machines with it in all aspects and it is just much more versatile. Need a postgres server? - add the role and fill in a few variables. It will take care of installing postgres, setting up databases, schemas, roles, users, etc. Need postfix? - add the role, set a few variables, run it, done. Need a kubernetes cluster with all of its components fully configured? - add suitable roles, run it, also done. If you want to do infrastructure as code - don't only do it half-way.
@TechTutorialsDavidMcKone
8 ай бұрын
In this video we're only talking about an OS template for future VMs and not about one for an entire application So as I mentioned for instance, Ansible could be used to take over the VM once it was up and running The main appeal of using a cloud-init image for creating templates like this is that it saves so much time compared to a fresh installation of an OS There's no time wasted during the setup process having to answer questions or wait a long while for the installation to then be carried out And although there are some interesting tools out there that can help with that, this to me is so much quicker and simpler to deploy That's because the OS is slimmed down and pre-installed, so PVE only needs a few extra details to hand over to a new VM when it first boots up
@thisiswaytoocomplicated
8 ай бұрын
@@TechTutorialsDavidMcKone I understand - still I don't like the extra complexity involved with it. Just more black-magic layers. Most straight forward way to me still is unattended install. That simply answers all installation questions for you. Once you have a template (you can download it for example from Debian) and set it up once then you are done. Lightning fast installation. And if you want you still can tweak things - like disk partitioning, choice of file systems, packages to install and so on. Much more versatile and still very fast. You should try it. Not as chiqué maybe as using something with "cloud" in its name, but works like a charm.
@jleonardolemos
2 ай бұрын
Big class!!! I keep asking how much do we should deliver in a pre baked image and how much should we do on the VM creation. For exemple if i have all my VMs observed by Zabbix should i deliver zabbix agent inside the template or should i install in a automated way when the VM is created??
@TechTutorialsDavidMcKone
2 ай бұрын
Templates are very useful but now I'm steering towards automating as much as possible; less to backup, quicker to recover, quicker to modify, etc Another benefit of automation though is it's easier to scale because you just deploy the same change And as long as you test a change in a lab, you should get the same result in production
@vasquezmi
4 ай бұрын
@Tech Tutorials - Excellent walk-through I appreciate you sharing your expertise. At ~ 30:05 you went into a file that I assume you created to show recent leases in your network. Is that process something you have shared in your videos? Thanks in advance on any direction with that.
@TechTutorialsDavidMcKone
4 ай бұрын
I'm running Kea as a DHCP server If you're interested in setting that up I have a video for it kzitem.info/news/bejne/p32tlmp5jH6arY4
@vasquezmi
4 ай бұрын
@@TechTutorialsDavidMcKone Thank you so much for the quick reply. I saw it the other day but like all of us got caught up in things. Now that the smoke has cleared I am going to review. I hope you have an excellent week.
@zyghom
9 ай бұрын
I went the path of installing Debian, customizing it (that is much more than IP or so: some scripts, some extra programs etc.) and only then converting it to template and then cloning to have new VM. That included also mounting shared disks etc. Yes, hostname is the same but setting new hostname is ... 1 command and 1 file edited, right? ;-)
@TechTutorialsDavidMcKone
9 ай бұрын
Yeah "golden" images have been created for a long long time I've been doing that myself ever since the likes of Ghost was released... Wow, just looked at the Wiki. That was a long time ago ;) Anyway, as you say though, once it's built the hostname and hosts file need editing. Which is very little given the time saving But my grand plan now is infrastructure as code Apart from the initial PVE install and basic network setup, I want to see just how far I can push Ansible to build everything from the ground up and maintain it going forward
@ncarrasco2006
5 ай бұрын
Do you know what is the difference between debian-12-generic-amd64-20240211-1654.qcow2 and debian-12-genericcloud-amd64-20240211-1654.qcow2 ?
@TechTutorialsDavidMcKone
5 ай бұрын
It seems generic-cloud is more for virtual environments as it's missing drivers for physical hardware cloud.debian.org/images/cloud/
@ncarrasco2006
5 ай бұрын
I notice that if for example I create a VM with 2GB of ram installing debian from debian-12.5.0-amd64-netinst.iso without cloud init , when I start for proxmox it is using 1.4GB of ram. But if later I boot one time with cloud-init one time , the memory usage is less than 400 MB . I wonder why the memory usage is reduced ? Does cloud init installs something ?
@TechTutorialsDavidMcKone
5 ай бұрын
The netinst.iso file is the version for typical installation onto a hard drive and is independent of cloud-init Cloud-init is a cloud ready version of the Linux distro which is a pre-built drive i.e. you boot off that and it just needs some extra details to complete the installation So with Proxmox VE you add a cloud-init IDE drive with those instructions The cloud-init version also has less software installed, so is much lighter, but you can always add what you want/need
@ncarrasco2006
5 ай бұрын
Hi, but it can be really so much the difference ? Maybe I am measuring differently or there is a service that reports the memory usage different ? @@TechTutorialsDavidMcKone
@TechTutorialsDavidMcKone
5 ай бұрын
@@ncarrasco2006 Have you checked usage from the Debian side or the Proxmox side? Even with the guest agent installed, I still think it's best to check what Debian says it's using But the cloud-init images are a lite version
@ncarrasco2006
5 ай бұрын
Thanks right now I am experimenting using solely virt-install (without proxmox) @@TechTutorialsDavidMcKone
@ncarrasco2006
5 ай бұрын
yes, I will check. I have issues using cloud-init with the debian images @@TechTutorialsDavidMcKone
@fabiosuriano5433
2 ай бұрын
Is it possible to create a template for Debian with LVM included?
@TechTutorialsDavidMcKone
2 ай бұрын
Not something I've really looked into but you could create your own template So you start with a cloud-init image, and create a VM from that You then configure that as your golden template and use that to create other VMs Creating your own cloud-init image though looks to be more complicated
@AdrianuX1985
9 ай бұрын
+1
@TechTutorialsDavidMcKone
9 ай бұрын
Thanks
@JamesTremblay
3 ай бұрын
Holly 🐄, you blather on like we are children....
@TechTutorialsDavidMcKone
3 ай бұрын
Any interesting perspective but bear in mind there is a large audience out there, with different backgrounds, different levels of understanding and each with their own take on the type of content they want Now, not many videos go into the details that I look for Folks are told to just to do this, do that without any explanation as to why That's the type of video I would be interested in, hence why I make videos this way
@traxeonic3600
6 ай бұрын
Really enjoyed this video. It helped jump start my templating journey with proxmox. I did come across another helpful bit of content while trying to see if I could get a leg up on the image itself. The following commands allow you to inject some packages that are helpful, particularly the agent. the last command helps you to avoid the resize step in the video. ``` sudo apt install libguestfs-tools -y mv debian-12-generic-amd64.qcow2 debian-12-generic-amd64-mod.qcow2 virt-customize -a debian-12-generic-amd64-mod.qcow2 --install qemu-guest-agent,ncat,net-tools,bash-completion qemu-img resize debian-12-generic-amd64-mod.qcow2 32G ``` After making these changes, I particularly like that when the VM fires up from the clone, you can see the IP in Proxmox without hunting in DHCP to find it.
@TechTutorialsDavidMcKone
6 ай бұрын
Thanks for sharing and good to know the video was useful I found using cloud-init made things a whole lot easier Initially I would use it to build the template and then hand it over to Ansible But now I've got Ansible building the entire VM from a cloud-init image Part of that work involves injecting commands like you've mentioned as part of the cloud-init install as there's quite a few things it can do beyond what the GUI allows
@traxeonic3600
6 ай бұрын
There is a lot of people who advocate for using Terraform for infrastructure management and then use Ansible for configuration control, but I do see the appeal to reducing complexity and working from a single tool as well. Thanks again.@@TechTutorialsDavidMcKone
Пікірлер: 48