Proxmox VE - How to build an Ubuntu 22.04 Template (Updated Method)

แชร์
ฝัง

ความคิดเห็น • 184

  • @FilipeNeto616
    @FilipeNeto616 ปีที่แล้ว +56

    According to "the internet" you can install the qemu-agent running a command directly on the image previous the the qm importdisk command. Which is this "virt-customize -a ubuntu-22.04-minimal-cloudimg-amd64.qcow2 --install qemu-guest-agent". I tried myself and it worked fine. This way the template already have the qemu-agent and you don't need to install it in every new deployed VM.

    • @chromerims
      @chromerims ปีที่แล้ว +1

      Fantastic tip 👍

    • @overmastermisterio
      @overmastermisterio 8 หลายเดือนก่อน

      i watched the whole video expecting Jay to mention that , but he did it manually still, the comment gave me enough insurance to try it myself tho , thanks!

    • @Uhlatek
      @Uhlatek 8 หลายเดือนก่อน +9

      For future note, I had to install tools for accessing and modifying virtual machine disk images with "apt-get install libguestfs-tools"

    • @danbrown586
      @danbrown586 6 หลายเดือนก่อน +3

      Note that this will result in a /etc/machine-id file being generated on that disk image. If it isn't removed, every machine you create by cloning it is going to get the same IP via DHCP, which will cause problems on your network.

    • @overmastermisterio
      @overmastermisterio 6 หลายเดือนก่อน +1

      @@danbrown586 how would I create an image with a custom set of tools installed without the issues of machines having same ID

  • @aramsmith4162
    @aramsmith4162 6 หลายเดือนก่อน +4

    Thanks Jay!!
    As a Linux noob (I am a Windows Server guy) and new to Proxmox, the way you teach, the tranquility you radiate, its awesome and helps me a lot. many many thanks!

    • @DeliberateGeek
      @DeliberateGeek 4 หลายเดือนก่อน

      Absolutely agree. I've been in tech for over 35 years. Did hardware and Windows admin for quite a while and then moved over to cloud and software development. I'm now diving into Home Lab stuff and Proxmox, so it's finally time to drive my skills up in the Linux space. I love Jay's content.

  • @ThonkerGuns
    @ThonkerGuns ปีที่แล้ว +10

    Hello Jay! It's rare to find someone who explains things in a simple way and also describe the 'why'. It helps engrave the learning process when you do something a certain way, there's a reason for it. Great job!

  • @djstraussp
    @djstraussp 2 ปีที่แล้ว +26

    Great and easy steps. Now Imagine an automated process for creating and provisioning this clone with Ansible or similar. This will be an awesome tutorial.
    Nice work Jay.

  • @scockman
    @scockman 2 ปีที่แล้ว +11

    As always another awesome video, thanks Jay!!! I am in the process of moving back to Proxmox from XCP-ng/Xen-Orchestra, so I am re-watching this entire series again. I have found that Proxmox is easier to get around in. In the step where you import the disk into the template, I have found that if you are using NFS it will import it as RAW file instead of QCOW2. If a person wants to stick with QCOW2 then just add the switch "--format qcow2" at the end of the command.

    • @sudocheese
      @sudocheese ปีที่แล้ว

      Thank you, I added the "--format qcow2" flag at the end of the import disk command, worked perfectly.

  • @oddyseus1963
    @oddyseus1963 2 หลายเดือนก่อน

    Discovered LLtv just a few days ago and I really love and enjoyed every video I watched so far. In fact the Proxmox series is the reason I ordered a miniPC to play with.
    Great job Jay!!!!

  • @aqueous67
    @aqueous67 2 ปีที่แล้ว +2

    I did and liked your whole proxmox course when you would release each module/video in parts. I followed along all the way to adding another node for clustering, but I couldn't get it to work. I also screwed up SSD trying. No problem. I reinstalled proxmox again today and did this module. It's the starting point for your Kubernetes cluster install on proxmox video!

  • @ScottMooreConsultingLLC
    @ScottMooreConsultingLLC ปีที่แล้ว

    Your videos are always so clear. Step-by-step. Very helpful. Very much appreciate the videos you produce on TH-cam!

  • @ZostaćAdminem
    @ZostaćAdminem หลายเดือนก่อน

    much easier than your first video about templates. Thanks :D

  • @terbeest
    @terbeest ปีที่แล้ว +5

    QCOW2 format provides more advanced features than IMG, such as copy-on-write, snapshots, compression, and encryption. The format is more flexible and can grow dynamically, whereas a plain ".img" file that must be preallocated to its maximum size. Further, the qcow2 format provides better performance, as it avoids the overhead of updating an entire ".img" file whenever a small change is made to a virtual disk.

  • @silentnight4618
    @silentnight4618 ปีที่แล้ว +3

    the reason why you have to add a Cloudinit Drive CD-ROM to vm is because the custom cloud-init config will be "burned" to this CD-ROM, so when the attached vm is being started, the cloud-init inside of it can detect the corresponding filesystem (with fs label `cidata` and fs type `iso9660`) the CD-ROM provides, you can observe the `mount and umount of /dev/sr0 (which is cloud-init drive CD-ROM)` behaviour within /var/log/cloud-init.log, hopefully this helps!

  • @tarasvytrykush6295
    @tarasvytrykush6295 ปีที่แล้ว +1

    This is literally the best guidance and so well delivered. Definitely like and subscribe!

  • @JohnMatthew1
    @JohnMatthew1 ปีที่แล้ว

    WOW! Thank you, other sites make this process seem so complicated, but your video got me going in minutes, Thank you!!!!

  • @yasaralzakout7691
    @yasaralzakout7691 10 หลายเดือนก่อน

    Great work, Jay. you can't make it easier than this. Thanks for the excellent work.

  • @leadwhite1249
    @leadwhite1249 ปีที่แล้ว

    Thanks Jay! I was able to apply these same instructions to setting up a template for Rocky 9 using the generic-cloud/openstack images. worked on the 1st try.

  • @JeffMijares
    @JeffMijares 2 ปีที่แล้ว

    this is cleaner than the 20.04 tutorial. Thank you so much

  • @andrebalsa203
    @andrebalsa203 ปีที่แล้ว

    Great video, and exactly what I needed to generate an efficient Ubuntu template for my ProxMox VMs. Thanks a bunch !

  • @jesperbeltman
    @jesperbeltman ปีที่แล้ว +2

    For those that want to use machine q35 use the following command to change the cloudinit from ide2 to scsi
    qm set {VMID} --scsi1 local-lvm:cloudinit

    • @OriginalResponsibleUser
      @OriginalResponsibleUser 6 หลายเดือนก่อน +1

      Thanks, this is exactly what I needed! Mine wasn't running any of the cloudinit scripts or setting the user.

  • @JustinHoMi
    @JustinHoMi 7 หลายเดือนก่อน +1

    The major thing missing from this is how to customize the Ubuntu image prior to converting it to a template. That’s the reason many people would use a template to begin with.

  • @AppleGreenmusic
    @AppleGreenmusic 2 ปีที่แล้ว +1

    I haven't dabbled with Linux in a while so it's been a long time since I've checked out the channel, however I really wanted to say that beard looks great on you.

  • @mikequinn8780
    @mikequinn8780 2 ปีที่แล้ว +3

    You can convert a template back to a regular vm. It's in the vm config file. Template=1 or template=0 IIRC.

    • @hotstovejer
      @hotstovejer 2 ปีที่แล้ว

      That would be handy to make changes to said template. I would love to be able to add my own packages and still use cloudinit... Now I need to try that. :)

  • @ajanardhanan
    @ajanardhanan 2 ปีที่แล้ว +4

    To all the folks you suffer SSH not available once they spin up the VMs from the template. Please run the following command in the proxmox console of all the VMs you created from the template. This will solve your SSH problem. sudo dpkg-reconfigure openssh-server

    • @GreggInternationalCollege
      @GreggInternationalCollege 2 ปีที่แล้ว

      THANK YOU!

    • @ZeeKay80
      @ZeeKay80 ปีที่แล้ว

      I ran this command in the VM I created from the template and still had the issue

  • @xDSticker
    @xDSticker ปีที่แล้ว

    Your are great and explain everything in detail. I like your work!

  • @AntonStolov
    @AntonStolov ปีที่แล้ว +5

    I would like to add a little to one of the posts here in the comments, a few necessary first steps with the system image:
    1. virt-customize -a yaimage.img --install qemu-guest-agent
    2. virt-customize -a yaimage.img --run-command "sudo echo > /etc/machine-id; sudo ln -sf /etc/machine-id /var/lib/dbus/machine-id"
    ...and what I do also:
    3. virt-customize -a yaimage.img --root-password password:yourpass - set root password
    4. virt-customize -a yaimage.img --timezone "Europe/Kiev" - set ya time zone
    5. virt-customize -a yaimage.img --install - install some packages, for example qemu-guest-agent
    6. virt-edit yaimage.img /etc/cloud/cloud.cfg - system setup, for example enable root
    7. virt-edit yaimage.img /etc/ssh/sshd_config - ssh setup, for example enable password authentication and etc...
    Wsup!

    • @Ecker00
      @Ecker00 10 หลายเดือนก่อน +1

      This is the kind of details missing here, thank you. Seems you can do quite a lot with the virt command!

    • @AntonStolov
      @AntonStolov 10 หลายเดือนก่อน +1

      ​@@Ecker00 yeah sure, u can prepare image for any case and with any inside. Word up!

  • @weidongxu1377
    @weidongxu1377 ปีที่แล้ว

    great video, accurate instructions and work like a charm, thanks Jay

  • @pauldowling2160
    @pauldowling2160 2 ปีที่แล้ว

    Thanks very much. So easy to follow with great explanations at each step. Fabulous work.

  • @AndreCataldi
    @AndreCataldi ปีที่แล้ว +4

    You don't have to rename the image from .img to .qcow2 if you pass the parameter --format qcow2 to the qm importdisk command!

  • @ritchie1950
    @ritchie1950 2 ปีที่แล้ว +6

    Am i the only one that struggles with cloud-init in Proxmox? I got it to work with OpenSuse Leap 15 sp3 but no luck with Ubuntu 20.04 or 22.04, (i use Proxmox 6.4.8). Any suggestions?

  • @michaelwaterman3553
    @michaelwaterman3553 2 ปีที่แล้ว +1

    Learned something today, thanks a million Jay!

  • @doop9713
    @doop9713 8 หลายเดือนก่อน

    Thank you so much, these videos are tremendously helpful!

  • @przemysawpakua9619
    @przemysawpakua9619 ปีที่แล้ว +7

    Hello Jay,
    first i want to thank You for great tutorial.
    But always when i setup template and using cloud-init from Proxmox (without configuring SSH public key option) i have problem to login to VM (created from template) via ssh - Permission denied (publickey) . Can you give me some advise how to do it?
    Many thanks.

    • @cchimozmin
      @cchimozmin ปีที่แล้ว +1

      I'm having exactly the same problem. Did you manage to fix it? :)

    • @kaliyuga3422
      @kaliyuga3422 10 หลายเดือนก่อน +1

      youtube.com/@LearnLinuxTV I'm having this problem also...can you help?

    • @lionking10222
      @lionking10222 8 หลายเดือนก่อน

      Same problem here... Someone knows how to fix it or can explain? Would really appreciate!

    • @cristian-danielbarbis5161
      @cristian-danielbarbis5161 6 หลายเดือนก่อน

      same problem

  • @sda2911
    @sda2911 2 ปีที่แล้ว +1

    Love the guide, except for several "...now BEFORE you click on this" (as I'm clicking on it...)

  • @DeliberateGeek
    @DeliberateGeek 4 หลายเดือนก่อน

    Hey Jay. I love this video. The idea of just grabbing a live image rather than having to do an install each time I want a new image type is very appealing. I have one question though.
    Having gone through some of your previous videos, I've created a custom cloud-int cloud.cfg file for a few use cases. Is there a relatively simple way to use the specific file I've created without having to spin up the new template, replace the existing file, and then clean it up before turning into a template?

  • @filmonseare4597
    @filmonseare4597 ปีที่แล้ว +1

    Great video Jay! Thanks :) i am trying to create Ubuntu 22.04 Template but i don't understand when you add the ssh key to it . i mean where you get the ssh key ? Thanks

  • @justaramdomkid7404
    @justaramdomkid7404 2 ปีที่แล้ว

    Bro ur so good at making tutorials

  • @RicardoWagner
    @RicardoWagner ปีที่แล้ว +1

    Hi Jay, I just noticed that the minimal image that you are working with in your tutorial is the same as the one used for the Container image. Cheers

  • @chrisumali9841
    @chrisumali9841 ปีที่แล้ว

    Thanks for the demo and info, have a great day

  • @michaelcooper5490
    @michaelcooper5490 3 หลายเดือนก่อน

    Hello Jay, Thanks for the video and your work. The question I have is does the template take those resources from the host and reserve them making them part of the used resources on host? I am sure the answer is yes, but I had to ask. Thanks again.

  • @AlexB-op7kb
    @AlexB-op7kb 11 หลายเดือนก่อน

    Set up with network storage by adjusting the command like 'qm importdisk 900 ubuntu-22.04.qcow2 nfsstorage' - the disk showed up as a '.raw' format but still worked flawlessly.

  • @danr2513
    @danr2513 ปีที่แล้ว

    Great video Jay! Thanks again!

  • @vasilemoraru89
    @vasilemoraru89 ปีที่แล้ว

    I appreciate your youtube videos, and the way you explain.
    Looking at the video I found that you have more Bridges for different purposes.
    On the internet it is not explained clearly how to route traffic between these bridges to have the machines encapsulated under one bridge. There are some examples with NAT.
    Also is possible to do with VLANS instead of bridges but also is not clear.
    If you have time, it will be nice to cover this theme, because there is very little info on the net.
    Thank you very much.

  • @telecomcraft
    @telecomcraft 2 ปีที่แล้ว +2

    I got up to the point of logging in, but authentication keeps failing on the credentials I installed in CloudInit. I'm seeing “Failed to start Execute cloud user/final scripts.” and wondering if that's the issue?

  • @pablouesc
    @pablouesc 9 หลายเดือนก่อน

    Wow. This was amazing. Jay, when you create these templates, every New vm from The same template will have different Host Keys (ssh) and Mac Address, or they will be idênticas to the template?

  • @aaronpaul5588
    @aaronpaul5588 ปีที่แล้ว +4

    Hello Jay, Really love your videos. Just wanted to know how to install 'qemu-guest-agent' (or any other package) in the template itself so we don't have to install it in each VM cloned from that template?

    • @ashishsinghdev
      @ashishsinghdev ปีที่แล้ว

      sudo apt install libguestfs-tools
      sudo virt-customize -a image-name.qcow2 --install qemu-guest-agent

  • @LucS0042
    @LucS0042 ปีที่แล้ว +4

    Was there a way to queue up the apt commands as part of the template / cloud-init phase to not have to run them every time you clone?

  • @Michael201078
    @Michael201078 2 ปีที่แล้ว

    Very good explanation! Right the thing I need. Many thanks.

  • @bibelstudiet7580
    @bibelstudiet7580 ปีที่แล้ว

    Thank you very much, again. Very useful.

  • @gineraso
    @gineraso 8 หลายเดือนก่อน

    Great video as usual. Only question is what is the advantage over the traditional downloading the iso, building a VM, install what I need, seal it and create a template? Are you just demonstrating a new way of creating a template or a better way? After following your procedures I was missing many packages (vi, vim) that I would need to install manually whenever using this template.

    • @jasoncrawford1489
      @jasoncrawford1489 หลายเดือนก่อน

      I believe you'll find that the cloud-init image is an actual bootable Ubuntu disk image so most of the slow installation process is skipped. (Ex. no probing the hardware. no disk formating. no downloads. no installs. almost no config.) The "cloud-init" portion of what is in that bootable image will clean up a few things upon first boot. You can watch other videos about what cloud init is and how it works on first-boot and not on second boot.

  • @fabianoslack4269
    @fabianoslack4269 ปีที่แล้ว

    Nice video! Covered the basics. Now going to more advanced question: How to create customized template? Lets say I want to have a template with the qemu-guest-agent already installed instead of me going to the server and installing it manually, then how to proceed?

  • @mathieuleclerc4136
    @mathieuleclerc4136 ปีที่แล้ว

    I wish I could put more than one like on this video ;)

  • @THEMithrandir09
    @THEMithrandir09 ปีที่แล้ว +2

    I've tried to follow this guide but have ran into 2 caveats: Cloud init just wasn't executed for VMs of type q35. Switching it in the template worked and cloud-init seemed to work, at least I got cloud-init related output in the console after starting up a fresh clone. But when I want to login it doesn't accept the user and password combination set in cloud-init. Any hints?

  • @ostinatarg
    @ostinatarg 10 หลายเดือนก่อน

    Very good, excelent tutorial, recomended

  • @ahmedyo2
    @ahmedyo2 11 หลายเดือนก่อน

    Perfect explanation.
    Can I install qemu agent on template itself ?
    Can I regenerate cloud image on new template based machine to have different user name
    Can templates also be backed up to PBS .

  • @Gabe_K
    @Gabe_K ปีที่แล้ว

    11:30 or just read the manual
    12:22 no need, you can 'qm set 900 --scsi0 local-lvm:0,import-from=/root/ubuntu-22.04-minimal-cloudimg-amd64.img' and resize via GUI later.

  • @AlehLitasau
    @AlehLitasau ปีที่แล้ว +1

    Thanks for a great tutorial! Just a comment: I've replaced image with [/jammy/current/jammy-server-cloudimg-amd64.img] and default console works fine, no need to add serial.

  • @trissylegs
    @trissylegs ปีที่แล้ว

    13:00 qemu can use qcow2 or raw filesystem images. With Raw there's now way for qemu to determine it's actually format because there's not file header say "This is disk image" it just has to guess. (A raw file image could be completely blank). If you pass raw direclty to qemu it'll give a warning say you should use the format=raw option to avoid issues.
    With the file extension qemu assumes it's a qcow2 image. It could guess based on filestrcture if it's qcow2 file anyway, it's very unlinkly it could be a raw image with data that looks like qcow2 anwyay.

    • @trissylegs
      @trissylegs ปีที่แล้ว +1

      Now that i've checked you can import without renaming the file like this (replacing VMID with your vm id and STORAGE with your image storage)
      qm disk import VMID ubuntu-22.04-minimal-cloudimg-amd64.img STORAGE --format qcow2

  • @MuhammadIqbal-gu2ql
    @MuhammadIqbal-gu2ql 2 ปีที่แล้ว +2

    Hi, by using this method is it possible to directly install the qemu-agent + add my own script? and if can, which step should i install and add my script before creating the template?

  • @huubyasterday3776
    @huubyasterday3776 ปีที่แล้ว +2

    Tnx, fyi with command qm importdisk I added -format qcow2 leaving extension to img seems to work

  • @BigFourHead
    @BigFourHead 2 ปีที่แล้ว

    Great video and helped me a lot. Question can i use the same method to build a Ubuntu desktop template, would i just use another image say "Cloud image for 64-bit computers (USB image)"

  • @AndreasLenze
    @AndreasLenze ปีที่แล้ว

    Brilliant, thank you!

  • @escanorsama7922
    @escanorsama7922 5 หลายเดือนก่อน

    Hello, hope you're doing well. I want to try building an Ubuntu template with version 24.04. Are the steps the same, or are there any changes I should be aware of?
    Thanks for your video!

  • @Ecker00
    @Ecker00 10 หลายเดือนก่อน +1

    Seems that downside with this approach that installing custom things won't be part of the template? Such as the Qemu agent, and any other default packages you want setup in the template. Any way to solve that with this method, or follow the old video?

  • @speedyg5
    @speedyg5 2 ปีที่แล้ว +4

    why wouldn't you install the qemu-guest-agent as part of the template?

    • @daviddunkelheit9952
      @daviddunkelheit9952 ปีที่แล้ว

      Probably to prevent replication of the ID or secret

  • @saibaneko
    @saibaneko ปีที่แล้ว

    Great video! Thnx a lot!

  • @gintarasp2
    @gintarasp2 2 ปีที่แล้ว +1

    Today i have told my coleague to take a look at cloud init if you are going for templates, what a coinsidence. I have not noticed, was the secure boot option enabled?

  • @cchimozmin
    @cchimozmin ปีที่แล้ว +2

    Is there another step if I don't have an ssh public key? If i try to log on from powershell I get permission denied (public key). Any help would be greatly appreciated. :)

  • @DrMerciless
    @DrMerciless 7 หลายเดือนก่อน

    very important step before you clone your template it to remove the Machine-IDs.

  • @MrWhereIsYourGodNow
    @MrWhereIsYourGodNow 2 ปีที่แล้ว +3

    But there is already an LXC template available in proxmox with Ubuntu 22.04. Why not use that?

    • @mhavock
      @mhavock 2 ปีที่แล้ว +1

      IKR 😀, I was about to ask why he did it this way.

    • @djstraussp
      @djstraussp 2 ปีที่แล้ว

      Learning from scratch... This is the way !!

    • @mhavock
      @mhavock 2 ปีที่แล้ว

      @examen1996 Yes, but if he is going to install Ubuntu as server it is more efficient to use LXC. If he was using it for things other than terminal apps them it would make sense to install to a VM. Maybe you can tell us an example of why using and Ubuntu server in a VM is better?

    • @hotstovejer
      @hotstovejer 2 ปีที่แล้ว

      @@mhavock I've run into several dependencies issues when trying to run certain things in a container. For example, I have rport running just fine in a LXC container, but I couldn't get netbox running right. Same way with the Fedora container. I tried to do freeipa in it, didn't work.

  • @Ajhidri
    @Ajhidri ปีที่แล้ว

    thanks Jay !

  • @srdjanmarjanovic
    @srdjanmarjanovic 2 ปีที่แล้ว +3

    Could qemu-guest-agent somehow be installed on the template so it gets automatically installed on every VM ?

    • @ritchie1950
      @ritchie1950 2 ปีที่แล้ว +1

      You could just start the machine and install the preferred software and then do a second template.

    • @MrPDC-jr5yl
      @MrPDC-jr5yl 2 ปีที่แล้ว +6

      yep: virt-customize -a ubuntu-22.04.img --install qemu-guest-agent

  • @Skullfurious
    @Skullfurious 5 หลายเดือนก่อน

    Hello, when I create the clone'd machine it shows up as "Ubuntu" on my network. Why is that? The hostname and hosts file both read "gameserver" so I don't understand why my router can't assign it a normal name like when I create a regular VM straight through Proxmox with an ubuntu ISO.

  • @caseyknolla8419
    @caseyknolla8419 2 ปีที่แล้ว +2

    Unfortunately this isn't working for me on Proxmox 7.2-11. The console isn't working on VM startup even though I executed the qm set command as shown (I only see "starting serial terminal on interface serial0). One of the CPU cores maxes out on the VM generated from the template, but it's inaccessible and never gets an IP, making it useless.

    • @BH-rw9co
      @BH-rw9co 2 ปีที่แล้ว

      I had the same issue. I just went into the UI and changed the interface back to default and it worked for me.

    • @caseyknolla8419
      @caseyknolla8419 2 ปีที่แล้ว

      I discovered that this was due to upgrading to Proxmox 7 without rebooting afterwards. Once I rebooted the server, this tutorial worked as described!

  • @TheFaltajan
    @TheFaltajan 3 หลายเดือนก่อน +1

    unfortunately not working for me. Unable to login to VM. no ssh, no user/passwd

  • @jus4027
    @jus4027 2 ปีที่แล้ว

    cracking good tutorial Jay

  • @hamidouz31
    @hamidouz31 2 ปีที่แล้ว

    You are the best

  • @joeortega9930
    @joeortega9930 2 ปีที่แล้ว +1

    I didn't use an SSH key, but when I try to putty in to the VM I get an error: Permission denied (publickey). Any ideas?

    • @rraymakers
      @rraymakers 2 ปีที่แล้ว

      I had the same issue. Setting one solved it.

  • @voiceoftreason1760
    @voiceoftreason1760 9 หลายเดือนก่อน +1

    why do you make the template BIOS instead of UEFI?

  • @THEMithrandir09
    @THEMithrandir09 ปีที่แล้ว

    How to actually boot into the image and customize it/how to customize the steps cloud-init is doing a bit more? E.g. the default ssh-host-keys and sshd_config is geared towards compatability over security, but if I don't need to be backward compatible, how where could one define it so it generates stronger keys and sets my desired sshd_config? Or is that something that we'll have to keep using ansible for?

  • @Xavier_BE
    @Xavier_BE 8 หลายเดือนก่อน

    Hi, thanks for the video; at first, i tought a vm template would look like a DockerFile, so i can setup some stuff already, like "all my vms have python, nano, or whatever"; is something like that possible ?

  • @alfrye68
    @alfrye68 ปีที่แล้ว

    Hello Jay! Great video. When I clone the template and boot the VM I get the Grub rescue prompt everytime

  • @sudocheese
    @sudocheese ปีที่แล้ว +1

    I found this useful, so I'm leaving a vapid comment to appease our algorithmic overlords.

  • @bclso
    @bclso 2 ปีที่แล้ว +7

    I followed the steps to create a VM, but cannot SSH into it. Have tried cloud-init clean and dpkg-reconfigure openssl-server, but in vain. Is there any help here?

    • @Wallf0
      @Wallf0 2 ปีที่แล้ว +1

      Did you find a solution for this? Thank you!

    • @MrPDC-jr5yl
      @MrPDC-jr5yl 2 ปีที่แล้ว +3

      Same problem. Had to: edit the /etc/ssh/sshd_config file and change the following entries. Then later can configure properly ie to allow just key auth instead user
      #PermitRootLogin prohibit-password
      #PasswordAuthentication yes
      The above entries should be as shown below:
      PermitRootLogin yes
      PasswordAuthentication yes

    • @landonsaunders3860
      @landonsaunders3860 ปีที่แล้ว +1

      @@MrPDC-jr5yl THANKS SOOOOO MUCH!!!

    • @ZeeKay80
      @ZeeKay80 ปีที่แล้ว +1

      @@MrPDC-jr5yl there is a file under /etc/ssh/sshd_config.d/ directory that overrides this. You have to set PasswordAuthentication yes in there.

  • @khanhthedag7269
    @khanhthedag7269 10 หลายเดือนก่อน

    thank very match.
    i have a question, about ssh-key. where is this ssh key? i don't put in the box. than i want to connect from (laptop 1), permission denied (publickey). i must put ssh-key inside the box, right? must i have ssh-keygen for each pc?
    please help, how do the best way.

  • @cd-stephen
    @cd-stephen ปีที่แล้ว

    i have kvm running raw and cloudinit installs the qemu agent as part of update to cloudimage. - can proxmox not do that

  • @estemestem-z6d
    @estemestem-z6d ปีที่แล้ว

    Hi,
    thanks for this tutorial, I have one issue please if you could help,
    I have followed the same instruction but when I typed ip a to see the @ip, I dont see it, (I have choosed DHCP in cloud-init as you did), do you know please what could be the problem ?

    • @LearnLinuxTV
      @LearnLinuxTV  ปีที่แล้ว

      What do you see instead? I'm not sure I'm following.

    • @ashishsinghdev
      @ashishsinghdev ปีที่แล้ว

      Looks like a network issue when leasing IP from DHCP server,

  • @am7-p
    @am7-p ปีที่แล้ว

    The cloud-init images are very minimal. Is there any way to use full featured Ubuntu server for this?

  • @aHondaAccord
    @aHondaAccord ปีที่แล้ว +1

    What are ssh public key used for? (referencing @7:03)

    • @LearnLinuxTV
      @LearnLinuxTV  ปีที่แล้ว

      I have an ssh key video that’s dedicated to that topic.

  • @hendranatasaputra2826
    @hendranatasaputra2826 2 ปีที่แล้ว

    without qemu guess agent i think we also able to shutdown ? hemm..what is actually the purpose?
    can u give tutorial to enlarge entire disk automatically?

  • @Kumalski97
    @Kumalski97 2 หลายเดือนก่อน

    Okay, I did everything like that and I can't connect via ssh to VM created by cloud init (permission denied (publickey). What can I do to fix this?

    • @Kumalski97
      @Kumalski97 2 หลายเดือนก่อน

      OK! I AM IDIOT GUYS
      I need to specify where is my private key on my machine and then everything works beautifully :)

  • @MrDenisJoshua
    @MrDenisJoshua ปีที่แล้ว

    Can you install qemu directly in the template ?
    Thanks for the video

    • @scerons
      @scerons ปีที่แล้ว

      See @FilipeNeto616 comment

  • @MrEric377
    @MrEric377 8 หลายเดือนก่อน

    Hello, a quick question to the community. I created a VM using the ubuntu.23.10.minimalist and I can't mount a cifs share. After a lot of research and no solutions I think it is the minimalist build that is the issue. I have installed cifs-utils and a bunch of other packages to no avail. I will most likely install the full server version in the next day or two, but want to know if anyone else had this issue? The actual error I get after I run the mount command and put in my password is:
    mount error: cifs filesystem not supported by the system
    mount error(19): No such device

  • @fabiosuriano5433
    @fabiosuriano5433 5 หลายเดือนก่อน

    Is it possible to create a template for Debian with LVM included?

  • @GayBoucheryGonzague
    @GayBoucheryGonzague 2 ปีที่แล้ว +1

    I have a few problems with that method
    1. SSH will not work, unless you reboot the VM after the 1st boot
    2. All ProxMox (7.2-3) commands related to the VM = Stop, Reboot, Shutdown are not working. You will need to type all these in the VM itself to have it to work, which is... a pain

    • @fanuchman
      @fanuchman ปีที่แล้ว +3

      After downloading the image at 10:26 :
      (solves for 2.) virt-customize -a ubuntu-22.04-minimal-cloudimg-amd64.img --install qemu-guest-agent
      (solves for 1.) virt-customize -a ubuntu-22.04-minimal-cloudimg-amd64.img --run-command "sudo echo > /etc/machine-id; sudo ln -sf /etc/machine-id /var/lib/dbus/machine-id"
      Then rename the image to qcow2 etc

    • @BillCClinton
      @BillCClinton ปีที่แล้ว

      @@fanuchman Thanks for this. I already have it setup as per the video steps. Do I need to blow that away and start from scratch and add your two commands to the image or can I do this with my image already modified and renamed as per the steps in the video with my template created?

    • @BillCClinton
      @BillCClinton ปีที่แล้ว +1

      @@fanuchman The virt-customize package is not installed in proxmox. The package cannot be found either. Can you share how to get it installed?

    • @ComMcNeil
      @ComMcNeil ปีที่แล้ว

      @@BillCClinton It is the "libguestfs-tools" package, so "apt install libguestfs-tools"

    • @BillCClinton
      @BillCClinton ปีที่แล้ว

      @@ComMcNeil It will not install inside proxmox. It is not compatible. It can be installed in a VM but not via the proxmox terminal.

  • @bobkoss280
    @bobkoss280 ปีที่แล้ว

    Is this for all Linux distros or just for Ubuntu?

  • @datanuke
    @datanuke ปีที่แล้ว

    Anyone else having troubles running docker swarm on VMs created this way? More specifically: trouble accessing services (stacks) deploy on docker swarm?
    Problem seems specifically for docker swarm: I can publish services using "docker compose" without a problem, but when deploying the same configuration in docker swarm mode, the service isn't accessible (logs show that it is running correctly).
    Deploying those very same services on a VM installed in the 'classic' way works without any problems.
    Have been scratching my head for 2 days on this problem now, starting to go bald here :(

  • @TheBoyNamedR
    @TheBoyNamedR 10 หลายเดือนก่อน

    Linux n00bie. I've tried this 3 times and I always end up with vms that get stuck on "starting serial terminal on interface ". This doesn't happen all the time, the first time it was because of my network settings, but now it's just intermittent and I can't figure out why. Any pointers on where to look?

    • @TheBoyNamedR
      @TheBoyNamedR 10 หลายเดือนก่อน

      Sometimes I can just press enter and I'm good, other times no response.

  • @stevegailey770
    @stevegailey770 ปีที่แล้ว

    Thanks for this - very helpful - though my problem is that the machine-id of every clone of the image is the same --> cloud-init does not seem to reset this, so I get the same machine with the same dhcp ip address every time.

    • @Ecker00
      @Ecker00 10 หลายเดือนก่อน

      Found any solution to this?

    • @stevegailey770
      @stevegailey770 10 หลายเดือนก่อน +2

      @@Ecker00 Yes, it ended up being simple, you just have to make sure you do not login at any stage. That seems to set it. You have to do all of the work creating the image and setting it up before first use.

    • @Ecker00
      @Ecker00 10 หลายเดือนก่อน +1

      @@stevegailey770 alright so delete the machine id, shutdown, convert to template, clone, clone, clone and then it will be regenerated on first boot/login.

    • @stevegailey770
      @stevegailey770 10 หลายเดือนก่อน

      @@Ecker00 virt-customize, virt-filesystems and qemu-img are your friends... Managed to find the commands I regularly use getting the image ready for first use...

  • @volodyaevv7120
    @volodyaevv7120 2 ปีที่แล้ว +1

    Why you did not integrate (install) QEMU agent into your template?

    • @kolyacpp
      @kolyacpp 2 ปีที่แล้ว +1

      Для этого перед созданием шаблона нужно запустить виртуалку, а тогда сразу запустится cloud init для настройки, и больше не получится сделать такую настройку под каждую клонированную виртуалку с помощью cloud init диска.
      Если нужно много всего поставить, то можно вручную поставить систему, а потом подготовить её для конвертации в шаблон. На этом канале есть урок. Но мне больше понравился этот способ, потому что получается меньше ненужного говна в шаблоне.
      Единственное, с чем пока не разобрался - это как в самом шаблоне разрешить ssh аутентификацию по паролю, а не по ключу.
      После каждого клонирования лень редактировать sshd_config

    • @MrPDC-jr5yl
      @MrPDC-jr5yl 2 ปีที่แล้ว

      @@kolyacpp Не обязательно, можно через команду: qemu-img resize ubuntu-20.04.img 32G сразу увеличить и потом: virt-customize -a ubuntu-20.04.img --install qemu-guest-agent. Работает на ура

    • @kolyacpp
      @kolyacpp 2 ปีที่แล้ว

      @@MrPDC-jr5yl Круто! Я погуглил, у этой штуки есть ещё --run-command. По идее можно запустить команду, которая отредактирует PasswordAuthentication в sshd_confing. Но если openssh ставится с помощью cloud-init, то этого файла там ещё не будет. Как костыль можно добавить это в греп) и потом туда костыль, чтобы почистить греп, когда замена удастся)

  • @ahmednishaal9432
    @ahmednishaal9432 10 หลายเดือนก่อน

    "it is what it is" bruhhh i had been wondering for a while why my command wouldnt execute even thought i was doing the same as the tutorial i was looking at the time lol

  • @nandurx
    @nandurx 2 ปีที่แล้ว

    Can we do something similar for debian,