Create VMs on Proxmox in Seconds!

Поділитися
Вставка
  • Опубліковано 25 вер 2024

КОМЕНТАРІ • 143

  • @MarkConstable
    @MarkConstable 2 роки тому +18

    Looking forward to a Packer + Terraform video. I'd also be interested to see how Packer (and Terraform) could work with LXD too. Proxmox is great but, as everyone knows, it requires a Debian base, whereas the snap version of LXD will run on just about any arch or distro and also provides both VM and CT instances with clustering features. It's just missing a standard web GUI like Proxmox.

  • @pouet4608
    @pouet4608 11 місяців тому +6

    Great video.
    Very pleasing to follow.
    Very clear:
    You ve put a framework by putting the most important principles first,
    Then putting details with why, what, steps and tools on those principles, and by linking logicaly the principles.
    Few have your redactional qualities.
    One way or another, you have to teach.

  • @mustafasinankoca6439
    @mustafasinankoca6439 2 роки тому +7

    I discovered you recently. In general, you are explaining such nice tricks to a person who does not know the subject :) Congratulations, I wish you continued success . Bravo

    • @christianlempa
      @christianlempa  2 роки тому

      Thank you so much! :) Makes me so happy to read this

  • @TheJoBlackos
    @TheJoBlackos Рік тому +2

    Hey, first of all, great video. You have packed up lots of info in this video. As a new packer user I had to deal with the plugin installation which was not a part of the video but I can understand that we cannot go over everything and we need to make hard choices in order to simplify the content. For those who had error messages about unknown source, you need to define the plugin to be used and then initialize packer in order to install that plugin :)

    • @insanity.k
      @insanity.k Рік тому

      what is the needed plugin to install?

    • @TheJoBlackos
      @TheJoBlackos Рік тому

      @@insanity.k As mentioned, you can either use the proxmox-iso option to create an image from iso, or maybe the better option, create an image from virtual machine you already have using the proxmox-clone

    • @insanity.k
      @insanity.k Рік тому +3

      @@TheJoBlackos Kinda new to Packer - I want to use the proxmox-iso plugin. But how do I use that? Where do I define using the proxmox-iso plugin and how to initialize packer in order to install the plugin? Thanks in advance!

  • @MikeCorvin-x4p
    @MikeCorvin-x4p 3 місяці тому +1

    vielen Dank für eure tollen Videos! I had a similar path to using Packer and CloudInit to create VMware Fusion VMs. One hard lesson learned was to not use one's existing vm directory for the output target directory - it gets cleared (its in the docs, i just missed it). Ask me how I know - I lost all of my existing vm images. Oh well, I needed to do some house cleaning anyway. The automation is cool, but the CloudInit hack of intercepting the installer and injecting keystrokes just seemed really kludgy to me, sensitive to getting delays right and other frailties, when I learned that's how it works. My spidey sense is that automated NixOS VM creation would be way more robust, but I'm a toddler noob at Nix right now so I'll look into that down the road.

  • @eshwar.s885
    @eshwar.s885 2 роки тому +5

    Hey for me the boot gets stuck at cloud-init running init-local in the console and the script is waiting for ssh to be accessible....would you happen to know any fix ?

    • @alexbergsland
      @alexbergsland Рік тому +1

      Ok, a bit late maybe, but check what is happening in the Proxmox console on the newly created VM. For me packer fails to unmount the ISO which means it will start the installer script again on reboot instead of booting the new server. This appears to be an unsolved bug.

    • @bsilva11
      @bsilva11 Рік тому +1

      I have the same problem, u remember how u resolve a issue?

  • @anjindevops
    @anjindevops Місяць тому

    Thanks for sharing your knowledge.
    Worked for me after some adjustments.
    Thanks for all.

  • @BrunoAlves-jn2tj
    @BrunoAlves-jn2tj 2 роки тому +1

    Man, you helped me a lot with some use cases for a task that I have. Thank you so much and keeping do it. Great video and very good explanation!!

  • @gardnerjp1
    @gardnerjp1 2 місяці тому

    I love your content Christian! Great tutorials! Thanks for all the hard work!

  • @KonstantinGontsov
    @KonstantinGontsov Рік тому

    Thanks! Use Proxmos around 10 years. Packer thats I need many years ago!!!

  • @scockman
    @scockman 2 роки тому +3

    Another AWESOME video! I got my two templates up and running after a few tries. One thing on the docker one is that also added docker-compose as well. Now with the release of Ubuntu 22.04 LTS, I thought that I could just clone the scripts - change names, etc. and it would work. To my sad surprise, it would appear that boot commands between 20.04 and 22.04 are different. Will have to try and dig in and find out what they are.

    • @christianlempa
      @christianlempa  2 роки тому +2

      Currently working on this, you should see an update on my GitHub Repo soon!

    • @m19v
      @m19v 5 місяців тому

      Hi@@christianlempa , facing similar issue. Autoinstall stuck on language selection with Ubuntu 22.04.4. Your boilerplate scripts refer to Ubuntu 22.04 which is can not be downloaded. Thanks!

  • @MrNoBSgiven
    @MrNoBSgiven 2 роки тому

    Christian. Excellet video again. Tomorrow, I will go and follow your next video in the series - Terraform with Proxmox VM creation (cloning). Thanks.

  • @itsr0m_Highlights
    @itsr0m_Highlights 2 роки тому

    SO COOL! interested in how this would interact with Terraform. Thank you for the video!

  • @eduvansilva
    @eduvansilva 2 роки тому +2

    Why don't use ubuntu cloud-image instead of ubuntu image?

    • @ikanpar1
      @ikanpar1 Рік тому +1

      I am thinking exactly the same thing. Ubuntu cloud image + cloud-init can be proxmox template in less than 10 lines of commands 😁

  • @nathanielmoore87
    @nathanielmoore87 2 роки тому +3

    I just watched @Techno Tim's video on this very topic. So cool to get 2 different perspectives on the same topic within literally days of each other. Thank you!! 😁

    • @christianlempa
      @christianlempa  2 роки тому +2

      Oh yeah I watching his video as well and was so glad that I did it slightly different 😁

  • @dreagnore
    @dreagnore 2 роки тому +2

    Are you using LVM? because I'm gettning this error " unsupported format 'qcow2' " apparently LVM doesn't support that if I set it to raw it does work but just wandering

    • @mandeepmails
      @mandeepmails Рік тому

      using "raw" instead of qcow2 would get you through. had same issue. done it today successfully

  • @nikitakunaev860
    @nikitakunaev860 Рік тому

    Thanks you 4 helpful video and tutorial! Also you have a perfect pronunciation, that awesome 4 me as foreign listener! :)

  • @chrissenanayake9891
    @chrissenanayake9891 Рік тому

    This is really great content!! I am just getting started with Proxmox and this is very helpful

  • @knightrider6478
    @knightrider6478 9 місяців тому

    Hello, I tried to build a template using your tutorial but i get an error: wasm connection closed by the server ( being proxmox ) I have latest version of Proxmox. Do you have an idea?
    Thank you !
    Regards

  • @joel-eq8tq
    @joel-eq8tq Рік тому +1

    Great tutorial. Very clear and easy to follow.

  • @LarsMartinJensvoll
    @LarsMartinJensvoll 3 місяці тому

    Great video. Have you tried running this lately, with 24.04? Been troubleshooting for hours, can't seem to get it to work. I get sent to choose language and keyboard layouts and stuff on the ubuntu installer, doesn't seem like my settings are being passed in...

  • @KowshikRaja-jr9rd
    @KowshikRaja-jr9rd 2 роки тому

    Can I use it in Virtual box or VMware the proxmox installation what u recommend and how to remove the pre-build tools in linux and making to install own tools

  • @florianrichter4180
    @florianrichter4180 2 роки тому

    Hey, I have the problem that the VM has no internet when it hangs in the boot CMD and therefore can't reach the webserver. the dhcp server works though.

  • @DwightElliott
    @DwightElliott Рік тому

    Mind sharing an example of the environ access file? Can only find for aws.

  • @holyproton8855
    @holyproton8855 Рік тому

    Thanks for your video!
    Does the SSH users need to exist in order to build the VM or will packer create that? I assume it needs to be created before had to use the private SSH key.
    Also how would I enable cloud-init on proxmox?

  • @m-electronics5977
    @m-electronics5977 2 роки тому

    But why I must create an install template which I use only one time and then the machine is there. then it's a template and I don't need to install it anymore

  • @lukaspechar
    @lukaspechar 9 місяців тому

    You sir, are a goldmine of information!!!

  • @eoeoeovideos
    @eoeoeovideos 11 місяців тому

    Hello, great video!! Any idea how to do IP Pools in Proxmox because it doesn't have this option!

  • @softwaredeveloper9130
    @softwaredeveloper9130 2 роки тому +2

    Hey, I just followed your example and it works (with ssh keys) however if I switch to password it fails. Did you try using password for ssh credential?

    • @MrNoBSgiven
      @MrNoBSgiven 2 роки тому

      FOUND IT! During the cloning of the image changing the user in "Cloud-Init" screen has some bug. When the user name is left empty (it will show 'Default'), cloud init will greater a new user 'ubuntu' in addition to the one specified by the packer template. The password which you change in Proxmox Cloud-Init will be assigned to .... wait for it ... to ubuntu account and not the one specified by the packer temple. This is VERY screwy indeed. I did not test if the packer defined user id in such situation will simply get no password. To late to test it tonight.

    • @artemtovkach
      @artemtovkach 11 місяців тому

      I have the same issue. How to fix that?

  • @murtadha96
    @murtadha96 7 місяців тому

    This was a great video btw! Many thanks for the high level explanation

  • @DamjanKumin
    @DamjanKumin 2 роки тому +1

    Fantastic! Excellent addition to youtube 👌⭐️

  • @chfmrf9605
    @chfmrf9605 Рік тому

    Very good video! Easy to follow and important details.

  • @2u263
    @2u263 11 місяців тому

    Christian Packer sounds great but it is important to know how to create vms containers & templates by hand to understand what is going on. Automation is good till it goes wrong .

  • @charleshopper4638
    @charleshopper4638 2 роки тому

    Quick question: When I want to create a quick vm on my proxmox system right now, all I do is clone the existing vm and run a bash script that modifies the mac, ip and hostname. I reboot the vm, and it works like a charm and only takes a few minutes. Simple and easy. Is this a bad workflow?

  • @stream2learn
    @stream2learn 2 роки тому

    Precisely what i was looking for.

  • @dikshitakalita1207
    @dikshitakalita1207 2 роки тому +1

    Hey TheDigitalLife! Your Videos are very thorough and to the point. I followerd your Traefik Video and it provided me very good concepts. Could you also make another Video on Ingress in k8s and how we could secure it both in ipv4 and ipv6 address?

    • @christianlempa
      @christianlempa  2 роки тому

      Thanks! Glad that you enjoy the videos :) I currently have no plans to do this, but maybe we will discuss ipv6 in a future video

  • @DrDingus
    @DrDingus 11 місяців тому

    Does this apply to LXC containers as well? I'm almost 100% lXC on Proxmox.

  • @chrisumali9841
    @chrisumali9841 2 роки тому

    Thanks for the demo and info, have a great day

  • @johndan4986
    @johndan4986 2 роки тому

    Thanks for the great video. Please i need some help on how i can passthrough my h710min hba pcie card to my truenas vm in proxmox. I have a dell r720xd server.

  • @declanmcardle
    @declanmcardle Рік тому

    @23:40 is there a lint function for the .yaml file?

  • @mariotubelecce
    @mariotubelecce 2 роки тому +5

    this is overcomplicated alternative for using a cloud init image and provision it with cloud init too?🤕

    • @christianlempa
      @christianlempa  2 роки тому +2

      Well, you can do this manually as well, but the point was to simply that process with packer

    • @AndreaGhensi
      @AndreaGhensi 2 роки тому +1

      @@christianlempa he was referring to ready made official cloud-init images, just like Techno Tim did a few days ago... those steps can be automated using ansible (download image, create proxmox vm, attach disk, create template). To customize the images, one could use libvirt tools beforehand

    • @Rickety3263
      @Rickety3263 Рік тому +2

      Yes. If you are the only contributor to your infrastructure and it lives only on proxmox, and you rarely update or version your software.
      No if you work on a team, use more than one environment, or need to manage patching in a highly regulated security environment

  • @pierretchekouteu5983
    @pierretchekouteu5983 2 роки тому

    Hello
    ubuntu install in PROXMOX via packer stuck at welcome screen
    how to bypass that ?
    any help will be appreciated
    thanks

    • @artemtovkach
      @artemtovkach 11 місяців тому

      My Packer build is stuck on the "Waiting for SSH to become available..." step, and I'm not able to log into vm. Did you solve the issue?

  • @jonasaeschlimann3742
    @jonasaeschlimann3742 Рік тому

    Is it also possible to automatically distribute VMs into pools?

  • @edwardvanhazendonk
    @edwardvanhazendonk 2 роки тому +1

    Nice, very clear instructions!

  • @Mr76Pontiac
    @Mr76Pontiac Рік тому

    Interesting process, but, this smells like it's a 1:1 build? I know this is a year old video, but I kinda stopped taking notes as soon as I saw a lot of inputs that are pretty static when it comes to new machine builds. Like, defining IP addresses? Assigning the VM an ID to ProxMox? What if I wanted to spin up several VMs for different purposes based on this template, this seems pretty "stuck" to how the template file is configured, and you'd have to go edit/copy the config files every time you want something different for the next VM, like the ID or static IP address, or whatever the case may be. This process just doesn't seem like it's going to save time compared to just running a base template, and copy/pasting a set of commands out.
    Am I missing something here?

    • @xultix
      @xultix Рік тому +2

      After you create the template, you can use something like terraform to automate building x amount of machines with different id's.

  • @nguyenatonio8248
    @nguyenatonio8248 2 роки тому

    interesting, will it work with LXC or only for QEMU instance? also is Packer able to resize/change resource after instance created?

  • @lakshminarasimmanv
    @lakshminarasimmanv 2 роки тому +8

    I use terraform to provision VMs.

    • @christianlempa
      @christianlempa  2 роки тому +5

      Oh yeah that's a great idea, maybe topic for a future video? 😀

  • @rauldeandrade
    @rauldeandrade Рік тому

    Hi Christian! Thank you so much. I learned so much from you and your videos look great.
    I followed the tutorial and everything worked as expected, but if I try to make more than one VM they share the same IP. I tried everything I could think of including one last
    provisioner "shell" {
    inline = [
    "sudo cloud-init clean",
    "sudo rm -f /etc/machine-id",
    "sudo rm -f /var/lib/dbus/machine-id"
    ]
    }
    But the IP keeps persisting. I've looked into other tutorials on cloudinit where this seems to be a consideration, but I don't know what to do in Packer

    • @JustinWallis
      @JustinWallis Рік тому +1

      Did you have a qemu-agent install fail, qcow2 unsupported format, failed to connect system bus Error?

    • @rauldeandrade
      @rauldeandrade Рік тому

      @@JustinWallis No errors unfortunately. That's why I'm having difficulty diagnosing the issue. Everything seems fine, but in the end I always get the same IP.

  • @ivlis32
    @ivlis32 2 роки тому

    Thank you for the video, it is very educational!

  • @Heaven73
    @Heaven73 2 місяці тому

    Der Automatisierungsaufwand und die Lernkuve sind größer als der manuelle Aufwand händisch ein Cloudinit Template zu erstellen. Das Ganze hat womöglich nur in einem großem Umfeld einen sinn wo unzählige Templates notwendig sind. von einer Baseimage aber kann man mit anderen Provisioning Tools womöglich einfacher angepasst werden.

    • @christianlempa
      @christianlempa  2 місяці тому +1

      Es geht ja nicht unbedingt um den persönlichen Nutzen, sondern vor allem um das Lernen und die Erfahrung, die man bei diesen Projekten sammelt. Das ist unbezahlbar :)

  • @hershyreisman
    @hershyreisman 2 роки тому +1

    How do you have that proxmox skin?

  • @stream2learn
    @stream2learn 2 роки тому

    Can you do a video on OPN sense firewall. As well as PFsense.

    • @christianlempa
      @christianlempa  2 роки тому

      Well, I probably won't because I'm not using it.

  • @marcelomartinrossi4036
    @marcelomartinrossi4036 2 роки тому

    Please I need a hand! I 'm using your git script but it Freeze in the middle of Ubuntu Installation, at mirror package selection, What can be the reason? Great video! Thanks in advance

    • @christianlempa
      @christianlempa  2 роки тому

      I've explained some of the problems in my troubleshooting section of the video, others I really don't know. You could share some logs and infos in our Discord, maybe somebody can help.

  • @hotrodhunk7389
    @hotrodhunk7389 Рік тому +1

    Can't you make a vm then make a template out of it?

  • @padraigconnolly2991
    @padraigconnolly2991 2 роки тому

    Hey! This was a great video, I ran the same install with your new 22.04 packer proxmox templates but the boot is hanging on "[ OK ] Finished Load AppArmor profiles managed internally by snapd", did you see anything like this?

    • @padraigconnolly2991
      @padraigconnolly2991 2 роки тому

      One last thing I noticed, the 22.04 template doesn't work with ssh passwords even if the autoinstall user-data and packer hcl file have the exact same entries. It worked once I used ssh keys instead. The following was the error if you're interested:
      Error waiting for SSH: Packer experienced an authentication error when trying to connect via SSH. This can happen if your username/password are wrong. You may want to double-check your credentials as part of your debugging process. original error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password], no supported methods remain

    • @christianlempa
      @christianlempa  2 роки тому

      Did you encode your ssh password? It needs to be base64 if I'm right

    • @padraigconnolly2991
      @padraigconnolly2991 2 роки тому

      @@christianlempa Ah thats probably it, it was in raw string format, do you know the reason for base64 requirement?

  • @IvanRosaT
    @IvanRosaT Рік тому

    what if I was trying to install an image of Ubuntu that includes the GUI such Gnome?

    • @christianlempa
      @christianlempa  Рік тому

      Would also work similar way, you can put anything in your templates

    • @IvanRosaT
      @IvanRosaT Рік тому

      @@christianlempa wouldn't the Mac address and IP would replicate Every time or will it change automatically?

  • @Spydaw
    @Spydaw 2 роки тому +1

    Yeah, awesome video, thanks for sharing ;)

    • @christianlempa
      @christianlempa  2 роки тому +2

      Thank you so much for your help! 🥰

    • @Spydaw
      @Spydaw 2 роки тому

      @@christianlempa You are most welcome, anytime.

  • @MehrdadGivehchi
    @MehrdadGivehchi 2 роки тому

    thanks for the video as it is very helpful...
    one question that maybe someone can help with:
    the packer automation fails when I try to use ssh password instead of public key authentication and I get the following error message:
    Packer experienced an authentication error when trying to connect via SSH
    I have googled on this issue but still unable to get past the ssh authentication. Any hint is greatly appreciated.

    • @artemtovkach
      @artemtovkach 11 місяців тому

      Hey, did you solve the issue?

  • @bjornarsimonsen7592
    @bjornarsimonsen7592 2 роки тому

    Wait, wouldn't it be faster to just spend the time to make a VM manually, keep it as a VM iinstead of converting to template and just clone it when you need another instance? By keeping it as a VM to maintain the ability to do updates and other changes. Why do a whole installation every time, even if automated, when you can just clone a "template" VM in seconds? And why cloud-init when packer seemingly is able to do all the same stuff?

    • @mrmotomoto
      @mrmotomoto 2 роки тому

      One example he provided was a vm with different user credentials

  • @tyr747148
    @tyr747148 5 місяців тому

    Amazing Video, as always 👏🏼

  • @rtacconi
    @rtacconi 4 місяці тому

    your config really does not work. I think the booting behaviour of Ubuntu has changed. I have been looking around and I cannot find a solution

  • @peterge98
    @peterge98 Рік тому

    Awesome, this worked for me!

    • @nihaltgr5945
      @nihaltgr5945 4 місяці тому

      how me i have prblm in boot wait

  • @atom6_
    @atom6_ 2 роки тому

    Call me weird, but I run proxmox only with LXC's, waste of resources to use VM's unless there is a specific kernel/os/migration requirement.

    • @christianlempa
      @christianlempa  2 роки тому

      Yeah why not? LXC seems like a great feature on Proxmox

  • @StanyCarteny
    @StanyCarteny 2 роки тому

    spettacolare!!!

  • @nbensa
    @nbensa 2 роки тому

    ooohhhh.... that dark theme for proxmox! How? Is it PVEDiscordDark? TIA!

    • @christianlempa
      @christianlempa  2 роки тому

      Yes! ;) Got it from GitHub

    • @DJRowlee1964
      @DJRowlee1964 2 роки тому

      @@christianlempa Just a totally off topic question :) What mixer are you using? It looks nice.

  • @dalisoft
    @dalisoft 2 роки тому

    11:16 are you using Linux?

    • @christianlempa
      @christianlempa  2 роки тому

      No I'm using Windows on my PC

    • @dalisoft
      @dalisoft 2 роки тому

      @@christianlempa cool, i did think it’s kde or gnome

  • @AndreasLenze
    @AndreasLenze 2 роки тому

    Brilliant - again! 👍

  • @domantlen6231
    @domantlen6231 2 роки тому

    Honestly i prefer to use lxc with docker inside. They work better tham VMs in resource limited environments - no virtualisation overhead and much better flexibility in adjusting assigned resources. The only vm i have is pfsense. I cant afford for special virtualization licenses to vitualize other os like windows or macos. I know that some abuse trial licenses or even use keys from physical machines but their license dont allow that, so such actions are plain piracy.

  • @kevinyu9934
    @kevinyu9934 2 роки тому

    Nice !

  • @HiltonT69
    @HiltonT69 2 роки тому

    Really nice. :)

  • @mdiaztoledo
    @mdiaztoledo 2 роки тому

    Interesting

  • @Rgb0braucht0keiner
    @Rgb0braucht0keiner 2 роки тому

    Grüße! Gutes Video Wäre mal schön das auch in deutsch zu hören danke

    • @christianlempa
      @christianlempa  2 роки тому

      Ich mache zwar nicht die gleichen, aber andere Videos auf meinem deutschen Kanal. Ist mehr in Vlog und Persönlicher Kanal, aber kannst ja mal reinschauen ;) Gibts auch Informatiker Content.

    • @Rgb0braucht0keiner
      @Rgb0braucht0keiner 2 роки тому

      @@christianlempa ich finde 👍 👍 👍 gut wie du es machst weiter so

    • @christianlempa
      @christianlempa  2 роки тому

      @@Rgb0braucht0keiner danke, mach ich 😀

  • @EduardoSantanaSeverino
    @EduardoSantanaSeverino 2 роки тому +1

    I would simply use terraform

    • @christianlempa
      @christianlempa  2 роки тому

      You can add terraform to this, but it's actually a good addition, not a replacement.

  • @WojciechKalka
    @WojciechKalka 2 роки тому

    Use ansible

  • @MarkRuvald
    @MarkRuvald 2 роки тому +1

    Please. NixOS

  • @zyntax81
    @zyntax81 2 роки тому

    Guys! Don’t Google Packer 😂

  • @matthiasmartin1975
    @matthiasmartin1975 2 роки тому

    Dude, it's called "Ubuntu", not "Oh-Bantu". So annoying.
    I feel better now.

  • @supradj
    @supradj Рік тому

    LIKE !!
    But i need:
    debian cloud-init lvm (with explain of partman ;) ) uefi boot
    i found out, that you can separate your packer files for better structure as:
    build.pkr.hcl (source and provisioners)
    build-vars.pkr.hcl (default vars)
    eg. PROXMOX.debian.pkr.hcl (build commands...)
    and build-vars-debian.pkvars.hcl (overrride vars)
    THANKS FOR INIT MY PACKER KNOWLEDGE ;)