Proxmox VE Full Course: Class 6 - Creating Virtual Machine Templates

Поделиться
HTML-код
  • Опубликовано: 14 май 2024
  • Proxmox Virtual Environment is an awesome virtualization solution for your business or home lab, and in this series, you'll learn everything you need to know in order to fully utilize it. In this class, we take a look at creating virtual machine templates.
    Other episodes:
    Class 01 - Getting Started: linux.video/pve1
    Class 02 - Installation Process: linux.video/pve2
    Class 03 - Web Console Overview: linux.video/pve3
    Class 04 - Containers vs Virtual Machines: linux.video/pve4
    Class 05 - Launching a Virtual Machine: linux.video/pve5
    Class 06 - Setting up Virtual Machine Templates: This video
    Class 07 - Creating Containers: linux.video/pve7
    Class 08 - Setting up Container Templates: linux.video/pve8
    Class 09 - User Management: linux.video/pve9
    Class 10 - Backups and Snapshots: Coming soon!
    Class 11 - Integrated Firewall: Coming soon
    Class 12 - Command-line Interface: linux.video/pve12
    Class 13 - Networking: linux.video/pve13
    Class 14 - Shared storage: linux.video/pve14
    Class 15 - Clustering: linux.video/pve15
    Class 16 - High availability: linux.video/pve16
    Bonus video 1 - Launching a Windows VM: linux.video/pve-win
    Bonus video 2 - Getting started with Proxmox Backup Server: linux.video/pbs
    Bonus video 3 - Proxmox VE - How to build an Ubuntu 22.04 Template (Updated Method): linux.video/pve-2204
    Bonus video 4 - Build a Kubernetes Cluster on Proxmox: linux.video/proxmox-k8s
    LearnLinuxTV Sites
    🐧 Main site:
    ➡️ www.learnlinux.tv
    🐧 LearnLinuxTV Community:
    ➡️ community.learnlinux.tv
    Support LearnLinuxTV (commission earned)
    📖 Check out Jay's latest book, Mastering Ubuntu Server 4th Edition. Covers Ubuntu 22.04!
    ➡️ ubuntuserverbook.com
    🙌 Support me on Patreon and get early access to new content!
    ➡️ learnlinux.link/patron
    ☁️ Support LearnLinuxTV and Set up your own cloud server with Akamai Connected Cloud:
    ➡️ learnlinux.link/akamai
    🛒 Affiliate store for Linux compatible hardware/accessories:
    ➡️ learnlinux.link/amazon
    💻 Check out the Tiny Pilot KVM for your Homelab:
    ➡️ learnlinux.link/tinypilot
    About Me
    🐦 Follow me on Twitter!
    ➡️ learnlinux.link/twitter
    👨 More about me:
    ➡️ www.jaylacroix.com
    ➡️ www.learnlinux.tv
    Recommended evergreen videos:
    💽 How to create a bootable flash drive for installing Linux
    ➡️ linux.video/flash-usb
    🐧 Understanding Linux permissions
    ➡️ linux.video/perms
    🐧 OpenSSH Guide
    ➡️ linux.video/ssh
    📖 LVM Deep-dive:
    ➡️ linux.video/lvm
    🔐 How to better secure OpenSSH:
    ➡️ linux.video/secure-ssh
    ☁️ How to create a cloud Linux server with Linode:
    ➡️ learnlinux.link/create-linode
    FAQ
    🐧 Which distro do I use?
    ➡️ learnlinux.link/mydistro
    💽 My recording gear (commissions earned):
    ➡️ learnlinux.link/recording-stuff
    #LearnLinuxTV #Linux
    #proxmox #virtualization #vm
  • НаукаНаука

Комментарии • 171

  • @weirbm
    @weirbm 2 года назад +183

    Hi again Jay,
    Apologies for all of the comments regarding my issue with cloud-init and SSH, but I have SOLVED the issue after troubleshooting, and watching your "Intro to Cloud-init" video - it was very helpful. As I'm sure other users may encounter the same error that I did while following along, I wanted to include the [simple] solution:
    Once all of the steps have been completed in the VM that is destined to become the template (but before you power it down!), ensure that you run "sudo cloud-init clean" - this will ensure that cloud-init knows that - the next time this machine boots, whether from this VM instance or a clone from it becoming a template - it will see that boot as the first boot, and apply the necessary changes to the SSH host keys.
    When I followed along with your tutorial verbatim for the third time, I simply issued the "sudo cloud-init clean" command before powering down and everything worked beautifully! :)
    Hopefully this comment helps other users out who are following along. If it doesn't, please feel free to remove it! I am now able to proceed to the next video on containers! Can't wait!
    Thanks again, Jay! All the best!

    • @DeadTux
      @DeadTux 2 года назад +2

      I did the same thing, thanks for posting this

    • @GotchaPine007
      @GotchaPine007 2 года назад +3

      Thanks a lot, that did the trick for me to. Without that it would not allow me to initiate a SSH session after the clone

    • @wiesawpeche7273
      @wiesawpeche7273 2 года назад +2

      Thanks for this post - saved my day!

    • @Trains-With-Shane
      @Trains-With-Shane 2 года назад +4

      Thanks Ben! Had the same problem on my first template-created test VM. I recreated the template (from the test VM that wouldn't let me SSH in) but this time ran the additional "sudo cloud-init clean" command right before shutting down. converted to template, cloned, tested, and all is well. SSH in just like it should.

    • @weirbm
      @weirbm 2 года назад +3

      Hi all,
      I'm very glad that this comment has helped resolve so many issues.

  • @PersonalMusicChanel
    @PersonalMusicChanel 6 месяцев назад +19

    Attention for those following this tutorial: A newer video labeled "Bonus video 3 - Proxmox VE - How to build an Ubuntu 22.04 Template (Updated Method)" has been added to the course video list which is more up to date. With that said are already trying to go trough this tutorial below are the steps I had to add to make it work for me.
    If you've encountered issues getting SSH to function after following the steps in the video, try running the command 'sudo cloud-init clean.' This fix should be done around the 8-minute mark in the tutorial, before stoping the VM after the clean up. Fix was originally suggested by @weirdbm in the comments.
    Additionally, @ossamaboughaba7926 suggested using 'ssh-keygen -A' in one of the comments to regenerate the SSH key if you hadn't executed 'sudo cloud-init clean' before creating the template. Although I haven't personally tested it, this might resolve the issue.
    In case your VM starts without an assigned IP address, it might be expecting a static IP and needs to be set to acquire one via DHCP. Access the 'cloud init' configuration of your VM, edit the 'IP config' option, and enable DHCP for IP4.
    By implementing these updates, I managed to progress through the tutorial successfully till the end.

    • @AlexB-op7kb
      @AlexB-op7kb 5 месяцев назад

      THank you

    • @ourkid2000
      @ourkid2000 4 месяца назад

      Wow, thanks! Solved my issue and I learned something new, thanks for this

  • @barrymeehan3027
    @barrymeehan3027 2 года назад +6

    Jay: I'm really enjoying the content for this class! I'll be rolling out a ProxMox deployment for a client later this week. PLEASE release the rest of the classes for this course ASAP!!! I can hardly wait to see what you have in store. Keep up the great work. Thanks!

  • @wekiwa7055
    @wekiwa7055 2 года назад

    Watching each new Proxmox video repeatedly! Templates will help immensely!

  • @craftsmanshopswoodworking5197
    @craftsmanshopswoodworking5197 2 года назад +46

    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.

    • @telecomcraft
      @telecomcraft 2 года назад +2

      Thanks that did it for me. I'm confused though, as I though cloud-init would take care of this.

    • @TommysToe2
      @TommysToe2 2 года назад

      @craftman a million times thank you!

    • @ermmoore2161
      @ermmoore2161 Год назад +1

      Thank you! I too thought cloud-init would rebuild them automatically in the VMs created from the template. I wasn't able to connect through PuTTY SSH until I ran the command you mention!

    • @jimb599
      @jimb599 Год назад

      A million thanks!

    • @JazzMac36251
      @JazzMac36251 Год назад

      Months later, still helpful. Thank you!

  • @PrapotnikDusan
    @PrapotnikDusan 2 года назад

    Jay, thank you for the nice explanation
    instructions🤓👏💪

  • @IvanRosaT
    @IvanRosaT Год назад

    I can comfirm my imagination took me over to do all of this on the Desktop Gnome GUI, and works!
    This is just the Video I was looking for!
    I went trough like 5 Videos and they made reference of Cloud Init but it was super confusing and 10 mins of not going straing to the point, you defenately nailed! 💗

  • @4g242
    @4g242 9 месяцев назад

    This was very helpful, Thank you very much!

  • @srihariravikumar5897
    @srihariravikumar5897 2 года назад +1

    Thanks Jay for this awesome course of Proxmox😊

  • @MatthewCrofut
    @MatthewCrofut 2 года назад +1

    Good stuff Jay. I knew nothing about cloudinit before or how to wipe ssh info so each clone had its own.

  • @ovaisvaid4628
    @ovaisvaid4628 Год назад +2

    Jay, thank you for the Proxmox course. I am following it and learning a lot. I have one issue when I created a webserver using template it breaks the ability to SSH into the server. But if I create a normal VM SSH works.

  • @hidaya8195
    @hidaya8195 Год назад +4

    For those who may get the spinned off VMs are not assigned IPs, ensure you update IP Config while setting up Cloud-Init. I found out setting to DHCP makes it work out of the box.

  • @d36247
    @d36247 8 месяцев назад

    very very helpful, you are amazing ! high support from me

  • @Chris4380.
    @Chris4380. 2 года назад

    Thanks Jay! I am working with Terraform and using it to deploy proxmox vms based on templates I have created following the steps in this tutorial. Its working great with one exception.. For some reason netplan dhcp4: true is taking precedence over the cloud-init IP. In proxmox you can see the cloud-init drive is active and the IP is set, but the VM is stuck with DHCP without manual intervention. I could use a playbook from Ansible to fix this, but I wanted to check with you to see if there is something I'm missing in the template preparation. Thanks for all that you do! I point all my fellow tech friends and colleagues to your channel.

  • @magicmanj32
    @magicmanj32 2 года назад +2

    Great Video, as a new linux user, you explain yourself very well, keep up the good work

  • @iscariotproject
    @iscariotproject 5 месяцев назад

    thank you for this series

  • @sankalpswami3335
    @sankalpswami3335 Год назад

    Jay, you are awesome!

  • @danbrown586
    @danbrown586 2 года назад +4

    Between this and your video on cloud-init, I'm a little confused and hoping you can clarify, perhaps in a future video. I completely understand wanting to replace the SSH host keys, and that's something that would need to be done in each clone of the template, so you'd want to have cloud-init do that. But it seems that most of what cloud-init would otherwise do *in a Proxmox environment* (or at least in this context--one where you're creating a VM, configuring it in some way, and then turning it into a template) could be done just as well (if not better) by making those configuration decisions in the VM itself before turning it into a template. Installing extra packages, setting up (or changing) a default user, adding a SSH public key for that user, configuring SSH to accept user certificates from a specified CA, setting time zone, etc., seem that they could all be handled at least as well directly in the VM. But I say that having never used cloud-init, so it's entirely possible (indeed, likely) that I'm missing something. Some discussion of when it makes more sense to use cloud-init, vs. when it makes more sense to just preconfigure the VM before creating the template, would be helpful.

  • @mithubopensourcelab482
    @mithubopensourcelab482 2 года назад +1

    Please please consider Open VSwitch lesson, installing pFsense as vm & using inbuilt Proxmox Firewall in your ongoing Proxmox series.

  • @applemodus
    @applemodus 6 месяцев назад

    Thanks for the video

  • @danieldewindt3919
    @danieldewindt3919 Год назад

    very usefull episode this one

  • @javbaes1427
    @javbaes1427 2 года назад

    Great video - question, why did you remove the attachment to the iso for the virtual disk? (in the CD\DVD). is it because you were going to use cloud init? would you have removed the virtual disk if you were not planning on using cloud init? thank you and keep up the good work.

  • @dvreal
    @dvreal 2 года назад +2

    How long do you think until the rest of the series comes out? I'm thinking about wiping my proxmox server and starting fresh but have been waiting to learn more about the topics in the remaining videos first.

  • @michaelcooper5490
    @michaelcooper5490 2 года назад

    Awesome job Jay, Does the template actually use up resources (i.e. Ram, cpu) if it is just sitting there not running? In other words does it count against the hosts resources. I know storage will because it uses that to store the image/template. As I understand templates are just sitting there correct, waiting to be cloned?

  • @andrewreeves9492
    @andrewreeves9492 8 месяцев назад

    This corse is excelent really enjoying it, but the bit below got me into such a mess, did the sudo cloud-init clean after biukding a clone and running dpkg-reconfigure openssh-server and made a new clone which seems to work-ish, now the network has dissapeared.
    I'm going to start the whole thing again, build server from scratch, create template, good practice I guess !!!

  • @guilherme5094
    @guilherme5094 2 года назад

    Thanks jay!

  • @magicmanj32
    @magicmanj32 2 года назад

    Hi jay, great video as usual, does the process differ win a windows vm template?

  • @ImamMaulanaSukarna
    @ImamMaulanaSukarna 2 года назад

    Hi Jay, thank alot for the tutorial. how about if we using centos 7, i got problem after creating clone from template i cannot access server using the ssh it say "No supported authentication methods available"

  • @zuldjin4342
    @zuldjin4342 Год назад

    Hello Jay! The video is amazing, you can make a video how to create a template for a windows machine in proxmox, please?

  • @quiensabecuando4063
    @quiensabecuando4063 6 месяцев назад

    Hi Jay. Many thanks for these videos.
    Is this case valid for having a BTC node and a XMR node running in parallel in one machine with Ubuntu server? If so, dobwe need to make 2 partitions? As I see you share same disk space because you clone the first installation, is that correct ?
    Thank you

  • @markGibby
    @markGibby 2 месяца назад

    Great videos! I did have issues with ssh not workting and I dont know think the cloud-init worked... I still had to use the original username and password... I removed and then added openssh to get it work. To be honest i am still new with linux and dont know what cloud-init is or what it does.

  • @franek4always
    @franek4always 2 года назад

    consider using hostnamectl insted of manual editing hostname

  • @bthegawd8113
    @bthegawd8113 2 года назад +1

    Have you considered using terraform to launch proxmox vm’s?

  • @peteallennh
    @peteallennh Год назад

    Great content! I’m surprised there isn’t a way to automate the hostname setting.

  • @MacGyver0
    @MacGyver0 2 года назад

    Is proxmox a decent alternative for vmware vsphere?
    What about vGPU features, can we pass physical GPU to VM?

  • @Anonymous-qp4zf
    @Anonymous-qp4zf Год назад

    Before converting to template, do in source VM:
    "sudo cloud-init clean"

  • @01uu011
    @01uu011 Год назад

    Hey guys. Quick question. If we have Static IP on VM, and there is no DHCP on the router, whats the best solution to create a template?
    Is there any way to set the IP before make a new VM from template?
    We can set IP address in CT vir Proxmox GUI, but not for VM.
    So everytime when I clone the template to VM, I'm facing IP conflict.
    Any tip how to handle this?
    thanks!

  • @SauloEduardo1
    @SauloEduardo1 2 года назад

    Hey Jay, is this serie fully available on Patreon? If the answer is yes, what layer would grant access to the all videos of the series?

  • @danieldewindt3919
    @danieldewindt3919 Год назад

    this is usefull info

  • @Breto151
    @Breto151 2 года назад

    I just followed these instructions but I am not able to ssh into the new VM created from the template. If I look in /etc/ssh on the console there are no ssh_host* files in there so it looks like they are not automatically getting re-created. Is there an extra step that needs to be done?

  • @piotrpytkowski1542
    @piotrpytkowski1542 2 года назад

    When the machines are created witch cloud-init, is this possible to change a ip address to static and still will be worked witch cloud-init?

  • @bjornarsimonsen7592
    @bjornarsimonsen7592 Год назад

    Is there anything I need to purge or prepare regarding Windows templates? I mean, they require licenses of course, but other than that?

  • @coucoutuveux
    @coucoutuveux 9 месяцев назад

    Is there a benefit to not use template and keep a VM "as a template" but just using clone and keeping the VM shutdown for further start and upgrade ?

  • @alantan157
    @alantan157 9 месяцев назад

    Can we use the same ethernet port for difference vm with different ip address?

  • @rawhive26
    @rawhive26 Год назад

    i followed the video and cloned the template to create 2 VMs.. however the IP assigned to them were same as the template machine.
    Could let you me know what have I missed here? Thanks

  • @tjoleary8738
    @tjoleary8738 11 месяцев назад

    Hey Jay,
    You templated Linux. is the templating process different for Windows?
    If so, can you release a video that steps through templating Windows?
    Thx

  • @myproject6753
    @myproject6753 2 года назад

    I like your channel and recommended it to friends but the ssh error issue after creating the procmox template following your tutorial is quit a problem! I had to start all over again.... would it be possible to update your tutorial?

  • @user-jd6zl8ts8v
    @user-jd6zl8ts8v Месяц назад

    Jay, any reason why after a did a full clone the SSH server failed to start. I was able to get it going by running dpkg-reconfigure openssh-server. Thanks

  • @frankbaron1608
    @frankbaron1608 2 года назад

    did i miss the bit where you regenerate the ssh public keys as i deleted them. each instance fils to start ssh. it's not hte end of the world as i can get in via vnc but...

  • @kingcogles
    @kingcogles 2 года назад

    Hi Jay and anyone that can help. After I cloning from my ubuntu server template I end up with a GUI. I really don't know why ubuntu server doesn't come with a GUI and I didn't installed any prior converting my VM into a template. Any idea?

  • @SpaccaIT
    @SpaccaIT 2 месяца назад

    Hi all,
    I've been experimenting with VM templates and created a couple of clones, but I've noticed an issue. After each reboot, the IP changes (from x.x.x.23 to 24 and so on). The odd thing is, from the Proxmox Console, the MAC address stays the same. Can anybody help?
    Thanks!

  • @Sil3nC4
    @Sil3nC4 2 года назад

    When I start webserver1 the proxmox console works and show the IP, but when I try to logon via SSH (Putty) it says "network error: connection refused". Did I do something wrong or did something meaningfull change to Proxmox 7.2 / Ubuntu 22.04 LTS? BTW ping to the server works

  • @user-ub3pm6wo2y
    @user-ub3pm6wo2y 8 месяцев назад

    Hello. I have some issue with this totaria: i create Ubuntu from Template with predefined login and password. But everytime i get Login Incorrect. I try to change template and login\password but it doesn't help. Has anyone had this issue?

  • @andrewreeves9492
    @andrewreeves9492 8 месяцев назад

    ok found it, you need to enable dhcp or provide the IP in the cloud-init IP Config, I recon the sudo cloud-init clean changes this. On on 👍

  • @mczac3733
    @mczac3733 2 месяца назад

    When creating a new VM from the template cloudinit does not generate new hostkeys why could that be?

  • @nandurx
    @nandurx Год назад

    Any plan on making video for debian? Or is it same steps?

  • @tocool2010
    @tocool2010 Год назад +1

    if the you are unabel to create a symbolic link its because the notation is different for some reason, it needs to be, "sudo ln -s /etc/machine-id /var/lib/dbus/machine-id"

  • @UltimateJiuJitsu
    @UltimateJiuJitsu 2 года назад

    Hi Jay.. thanks for another great video! What are you using to ssh into your machines? I've tried using a linux terminal & using PuTTY, but I can't connect to the webservers -1 & -2. Is it okay to just use the machine console in Proxmox?

    • @LearnLinuxTV
      @LearnLinuxTV  2 года назад +1

      What was the error you were getting when you tried to use ssh? Another way to troubleshoot it, run this inside the Proxmox console: sudo tail -f /var/log/auth.log
      And while that's running, try to SSH from your computer. You should see whatever the error is in the Proxmox console. Press CTRL+C in the Proxmox console to break out of the tail command.

    • @UltimateJiuJitsu
      @UltimateJiuJitsu 2 года назад

      @@LearnLinuxTV I was getting 'connection refused' message, so I just entered the nano commands into my node shell. It seemed to work but I still cannot ssh into either of the webservers. I thought that removing the ssh from the template may have caused an issue. I will try what you said above and see how things go. Thank you for your help!

    • @MrPaulyoutoobing
      @MrPaulyoutoobing 2 года назад

      @@UltimateJiuJitsu I have this same error - did anything work For you?

    • @UltimateJiuJitsu
      @UltimateJiuJitsu 2 года назад

      @@MrPaulyoutoobing I used the Proxmox node shell to start with.. a few days later I was able to ssh into the webserver as normal

    • @MrPaulyoutoobing
      @MrPaulyoutoobing 2 года назад +1

      @@UltimateJiuJitsu I could not even SSH into itself. I just blew it away and started over. I know I did not follow the video exactly though so I think I did it to myself.

  • @andrewreeves9492
    @andrewreeves9492 8 месяцев назад

    hmm ok don't know what's going wrong here but when I create a clone it loses all of it's network information, the interface is there but not configured. I'll be checking out yoiur help pages :-)

  • @Adamn32
    @Adamn32 Год назад

    Hi Jay. If I delete the iso from proxmox, the vm will not run. why?

  • @juanmanuelmartin-tss5822
    @juanmanuelmartin-tss5822 Месяц назад

    Hi, is thare something like cloud-int for Windows VMs?

  • @user-ld8zz5jd4d
    @user-ld8zz5jd4d Год назад

    Hi Jay. Thank you for this great tutorial. I'm on part 6 and i haven't had any problems up until now. So i could ssh into the guest via remotely no problem but after i followed the steps in cloning the VM and making it a template. Now i cant ssh to or from webserver-1 and 2. error says "ssh.service failed with result "exit code" and " Failed to start open BSD Secure Shell server. Any help is much appreciated. Thank you.

    • @LearnLinuxTV
      @LearnLinuxTV  11 месяцев назад +1

      If you implement the solution in this video, it'll fix that! Implement the ssh reset service I use in this video into your template: ruclips.net/video/oAULun3KNaI/видео.html

  • @frankbaron1608
    @frankbaron1608 2 года назад

    as in "dpkg-reconfigure openssh-server" then "sudo systemctl restart ssh"

  • @hekel1152
    @hekel1152 Год назад +1

    Hi Jay, thanks for the video, but I feel like there might be something going on in the SSH clean up part.
    By deleting the host keys in /etc/ssh, the SSH service will then fail to start; I've tried recreating your scenario twice in a row, and verified that the ssh service was indeed running to begin with (systemctl status ssh did give me an active running state).
    After removing the host keys and restarting the server, the SSH service fails to start.

    • @Servicehans
      @Servicehans Год назад

      Hey i think i have the same problem. The template creates fine, however i am then unable to ssh into the "child" VMs. How do i fix that ?

    • @DaveCampbellKY
      @DaveCampbellKY Год назад

      @@Servicehans - i had that issue, and then i read in a post above to do a "sudo cloud-init clean" before templatizing.
      that actually solved the ssh on start problem.
      but now each VM made from the template gets the same IP address as the template had.
      messing with the network settings in cloud-init now (DHCP ?) -but not sure of the outcome yet.

  • @ggalland1
    @ggalland1 Год назад

    @Servicehans
    For some reason I have replied with a fix twice and both times they have disappeared so will try it this way.
    After spending half the day building vm's, converting them to templates and cloning. I finally google searched and found the fix. But first I also have to say that when working the the "machine-id" file, I could NOT get the symbolic link to work as stated in the video. I could truncate it in /etc folder, but I had to remove the file located in /var/lib/dbus before the command to create a symbolic link would work. Once I got the fixed so the cloned template would provide new machin-id and new IP address the fix for SSH was to perform the following command from the console of the VM in Proxmox:
    sudo dpkg-reconfigure openssh-server
    Once that was done I was able to SSH into the new VM with no trouble. I think something changed in Ubuntu within the last few months that was preventing it from all working like Jay shows in the video. I say this because I had no problems when I first did this back then.

    • @Servicehans
      @Servicehans Год назад

      Yes, I also think this has to do with the newer Ubuntu ISO. However, as some others have suggested, you have to run "sudo cloud-init clean" before shutting down the template VM. Cloud-init only runs once and using sudo cloud-init clean resets it, so it runs again. That way i got new machine id, ssh working and new ip.

  • @ggalland1
    @ggalland1 Год назад

    Not sure if you will see this since it's a pretty old video. Just came across this series and am following along. Issued I had on this segment was after I converted the original VM to a template and did the 2 clones, I could not SSH in to those VM's as I could on the original. Now during the "clean up" process on the original VM concerning the machine-id file in "/var/lib/dbus", I never saw the " -> " for the symbolic link. When I ran the "sudo ln -s" command it said the file was already there. Not exactly sure where I messed up. Both new VM's seem to work fine, just can not SSH into them.

    • @Servicehans
      @Servicehans Год назад

      Hi, i had the same problem. I used "sudo ln -sf /etc/machine-id /var/lib/dbus/machine-id" to force the link. However, i am having in the same problem in regards to not being able to ssh into the "child" VMs. Did you fix your issue? @Hekel seems to have the same problem.

    • @ggalland1
      @ggalland1 Год назад

      @@Servicehans @Hekel
      It had been so long, I couldn't remember if I fixed it or not so went ahead and created another vm and followed the process again. Big twist..........I ran into the same issue with the machine-id, symbolic link as stated in my original reply. However, now after following the video and creating template and doing the clones, both my cloned vm's have the same IP address as the original vm. Also looked at the machin-id in the cloned versions, and they match the machine-id from the original vm. However, since the IP addresses and machine-id's did not change as they are supposed to, I had no problems connecting to them via ssh. So now I have a whole different set of problems to try and figure out, smh!
      Please let me know if y'all have had success or not.

    • @Servicehans
      @Servicehans Год назад +1

      @@ggalland1 Ok. As someone else in comments suggested, you have to use the command 'sudo cloud-init clean'. Cloud Init only runs once, which it did after the first reboot(after finishing the setup). To reset it, you have to run that command. I tried it and it finally worked, new IPs and SSH keys.

    • @DaveCampbellKY
      @DaveCampbellKY Год назад

      @@Servicehans, @Hekel, @Gary Galland - i am also getting VMs with the same IP address, and the same /etc/machine-id despite going through the video steps AND the final "sudo cloud-init clean" before making the template originally. am i missing something in the sequence?
      am i reading a suggestion to do the "sudo cloud-init clean" on the new VMs after cloning from the template?
      thanks!

  • @Sil3nC4
    @Sil3nC4 2 года назад

    What confuses me is why you log onto the server via SSH everytime when you already have an active session in the console on the Proxmox webinterface. Is this just for demonstration purposes, doublechecking that it is indeed up/running/connected, or is there an actual difference?

    • @kamalgeorgesnoun4075
      @kamalgeorgesnoun4075 Год назад +1

      First thing that comes to mind for a beginner like me is the ability to scroll back which is not possible in the internal console where what you see is all you get once the screen scrolls down.

  • @NabilMakhout
    @NabilMakhout Год назад

    Hmmm VM that are created from the template isn't getting any IP-address. Any idea why?

  • @wesgould1
    @wesgould1 2 года назад

    Maybe I missed a step. My cloned VMs keep spinning up with the same LAN ip address. They aren't different. I am wondering if my UDM Pro is seeing the MAC address and assigning the ip from 'memory'. Any way to fix this via ProxMox?

    • @wesgould1
      @wesgould1 2 года назад

      I re-made the template from scratch(following the same instructions)and it worked. I'll chalk it up to having missed a step the first time. ¯\_(ツ)_/¯ That or maybe the machine ID regenerates if you install updates/packages.

  • @rcdenis1
    @rcdenis1 2 года назад

    I tried to install cloud-init but it warned of a bug while installing. Thank you Jay!

    • @LearnLinuxTV
      @LearnLinuxTV  2 года назад

      What was the verbiage? Might be interesting to look into.

    • @rcdenis1
      @rcdenis1 2 года назад

      while attempting to reproduce the error I now realize what happened. I mistakenly tried to install cloud-init on the proxmox server's terminal window instead of the VM terminal window. I had multiple terminal windows open at the same time, clicked on the wrong one and started typing.

    • @W4tchUrSix
      @W4tchUrSix Год назад

      ​@@LearnLinuxTV I have tried sudo cloud-int clean before shutting down the server. I have tried regenerating both the ssh key with both ssh-keygen -A and sshd -A in the /etc/ssh dir. I made sure to stop and restart the VM and none of this worked for the server to accept the password. Anyone have any idea?

    • @W4tchUrSix
      @W4tchUrSix Год назад

      I figured it out. I had to change the cloud-init drive settings for network to DHCP it was set on static by default. I changed both IPv4 and IPv6.

  • @audriusjanusauskas6182
    @audriusjanusauskas6182 2 года назад +5

    Good tutorial, but in my case SSH keys were not auto re-created on clones. OpenBSD secure shell server failed to start, ssh.service failed. Was unable to SSH in clones, had to generate keys at first. My base image for template creation was Ubuntu-20.04.3-live-server-amd64.iso
    Maybe someone would know what could be the cause for this and have anyone faced issue too? In template image removed keys like Jay did.

    • @vash469
      @vash469 2 года назад +1

      yea same here i cant ssh in to the clone and regenerating doesn't work for me. seems like the service doesn't get started start request repeated to quickly is what the status is showing...any help?

    • @LynnEasley
      @LynnEasley 2 года назад +1

      For anyone else following along, I had the same issue, the solution that worked for me was regenerating the host keys, in /etc/ssh directory run sudo ssh-keygen -A and then start ssh with sudo systemctl start ssh After that ssh worked for me.

    • @audriusjanusauskas6182
      @audriusjanusauskas6182 2 года назад

      @@LynnEasley Yes, I have used those commands also as a workaround. Sudo dpkg-reconfigure openssh-server could be used too (tested on containers). Question is - why keys are being created automatically for some, while for others - not.

    • @sdhcapital
      @sdhcapital 2 года назад

      out of curiosity, did anyone also try using a different username in cloud-init settings? I found that my user as well as keys were not being generated, seems like cloud-init never ran.

    • @lord-baltimore
      @lord-baltimore 2 года назад +4

      Running "sudo cloud-init clean" as a last step before converting the vm into a template solved the problem for me

  • @Servicehans
    @Servicehans Год назад +4

    5:58 after running "sudo ln -s /etc/machine-id /var/lib/dbus/machine-id". I get "failed to create symbolic link 'var/lib/dbus/machine-id': File exists.
    SOLUTION: add an 'f' to the variables like that 'sudo ln -sf /etc/machine-id /var/lib/dbus/machine-id' . This will force the link to be created.

    • @peterenis1363
      @peterenis1363 Год назад +2

      same, tried to delete but it says permission denied. seems like there is an additional machine-id, not a symbolic link

    • @Servicehans
      @Servicehans Год назад +4

      @@peterenis1363 ok i added f to the attributes of ln like that "sudo ln -sf /etc/machine-id /var/lib/dbus/machine-id". And the symlink is now there. Lets see if that worked or if the template is now borked.

    • @peterenis1363
      @peterenis1363 Год назад +1

      @@Servicehans worked perfectly for me, thank you

    • @youtube-administrator-handle
      @youtube-administrator-handle Год назад +1

      @@Servicehans I am getting the same issue. If I add f to force the link, will it cause any problems later when using the template? have you noticed any issues when using a template for other VMs after adding the f?

    • @Servicehans
      @Servicehans Год назад

      @@youtube-administrator-handle sorry for the late reply. The template creates fine, as do the two "child" VMs. However, they both get assigned the same ip and i cant ssh into them. I cant say that using -sf is causing this, could be smth else. Did it work for you?

  • @nickgood3998
    @nickgood3998 2 года назад

    Does this work?

  • @str0g
    @str0g 2 года назад

    well isn't the hostname good enough of a 'machine-id'??

  • @nandurx
    @nandurx 2 года назад

    hey rebooting VM is keep changing host name back to what was. I tried twice and same issue both time.

    • @nandurx
      @nandurx 2 года назад

      Any help? I still couldn't figure out!!

  • @bs6667
    @bs6667 2 года назад +1

    Aren't these VMs using the same MAC address? Is the only way to generate a new MAC is removing and re-adding the NIC?

    • @davidgrishko1893
      @davidgrishko1893 2 года назад +1

      When you clone it, proxmox gives a new mac address on the NIC.

    • @bs6667
      @bs6667 2 года назад

      @@davidgrishko1893 That's weird. When I first cloned it, it copied the MAC address, but now it is generating new MACs. Maybe I was seeing things :o. Appreciate the response!

  • @Ranblv
    @Ranblv 2 года назад

    I would rename the template to ubuntu-server 2004 web server template

  • @hnic29
    @hnic29 2 года назад

    I created a VM and cloned it, but the cloning process took more than 2 hours. Do you have any idea why this is taking such a long time?

    • @bthegawd8113
      @bthegawd8113 2 года назад

      What type of hardware are you running? Are you using ssd’s or regular drives? That type of info would be helpful

  • @AlexDresko
    @AlexDresko 2 года назад

    Do you mean to tell me that cloud-init cannot even set hostname?

  • @SauloEduardo1
    @SauloEduardo1 2 года назад

    Does anybody have issues connecting to VM through SSH?
    I'm getting the message: connect to host XXX.XXX.XXX.XXX port 22: Connection refused
    I'm kind of stuck on this so any help is really appreciated.

    • @SauloEduardo1
      @SauloEduardo1 2 года назад +6

      In order to solve my problem, I had to run the following command through the Proxmox VM Console:
      sudo /usr/bin/ssh-keygen -A
      I've followed the exact same steps as Jay. I don't know why I got a different result.
      Does anybody has a suggestion about how to include this command in the cloning process of a VM template?

    • @williemaddox9919
      @williemaddox9919 2 года назад +2

      @@SauloEduardo1 After running keygen, you'll need to reboot the VM before you can log in remotely. just fyi.

    • @williemaddox9919
      @williemaddox9919 2 года назад +3

      Or instead of rebooting, run systemctl restart sshd

    • @arrecky
      @arrecky 2 года назад +1

      @@SauloEduardo1 thanks a mill mate for your help

    • @justincollins4332
      @justincollins4332 2 года назад +1

      I got this exact same problem. Followed everything to the "t". And your keygen command worked!

  • @nonkelsue
    @nonkelsue 2 года назад

    Jay, two out of the three clones I made are showing a "Status: stopped, Config locked (clone)" message. What did go wrong and how to unlock those?

  • @TheJimmyCartel
    @TheJimmyCartel 2 месяца назад

    PLEASE SHOW WINDOWS SERVER

  • @florentflote
    @florentflote 2 года назад

  • @ierosgr
    @ierosgr 2 года назад

    Now, that s something Windows has and Linux doesnt .... sysprep

    • @michaelmeffie4468
      @michaelmeffie4468 2 года назад +1

      linux has virt-sysprep (part of the libguestfs tools)

  • @curmudgeoniii9762
    @curmudgeoniii9762 2 года назад

    Hey guys..... You don't go into to much detail because you do not know to much.... guys!!

  • @tezza5751
    @tezza5751 7 месяцев назад

    Dude needs to take a couple bumps of coke before recording. Great information but I'm about to go to sleep...

  • @Mzansi74
    @Mzansi74 7 месяцев назад +1

    Who is here in 2023?