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 Жыл бұрын
Fantastic tip 👍
@overmastermisterio8 ай бұрын
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!
@Uhlatek8 ай бұрын
For future note, I had to install tools for accessing and modifying virtual machine disk images with "apt-get install libguestfs-tools"
@danbrown5866 ай бұрын
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.
@overmastermisterio6 ай бұрын
@@danbrown586 how would I create an image with a custom set of tools installed without the issues of machines having same ID
@aramsmith41626 ай бұрын
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!
@DeliberateGeek4 ай бұрын
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 Жыл бұрын
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!
@djstraussp2 жыл бұрын
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.
@scockman2 жыл бұрын
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 Жыл бұрын
Thank you, I added the "--format qcow2" flag at the end of the import disk command, worked perfectly.
@oddyseus19632 ай бұрын
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!!!!
@aqueous672 жыл бұрын
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 Жыл бұрын
Your videos are always so clear. Step-by-step. Very helpful. Very much appreciate the videos you produce on KZbin!
@ZostaćAdminemАй бұрын
much easier than your first video about templates. Thanks :D
@terbeest Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
This is literally the best guidance and so well delivered. Definitely like and subscribe!
@JohnMatthew1 Жыл бұрын
WOW! Thank you, other sites make this process seem so complicated, but your video got me going in minutes, Thank you!!!!
@yasaralzakout769110 ай бұрын
Great work, Jay. you can't make it easier than this. Thanks for the excellent work.
@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.
@JeffMijares2 жыл бұрын
this is cleaner than the 20.04 tutorial. Thank you so much
@andrebalsa203 Жыл бұрын
Great video, and exactly what I needed to generate an efficient Ubuntu template for my ProxMox VMs. Thanks a bunch !
@jesperbeltman Жыл бұрын
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
@OriginalResponsibleUser6 ай бұрын
Thanks, this is exactly what I needed! Mine wasn't running any of the cloudinit scripts or setting the user.
@JustinHoMi7 ай бұрын
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.
@AppleGreenmusic2 жыл бұрын
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.
@mikequinn87802 жыл бұрын
You can convert a template back to a regular vm. It's in the vm config file. Template=1 or template=0 IIRC.
@hotstovejer2 жыл бұрын
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. :)
@ajanardhanan2 жыл бұрын
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
@GreggInternationalCollege2 жыл бұрын
THANK YOU!
@ZeeKay80 Жыл бұрын
I ran this command in the VM I created from the template and still had the issue
@xDSticker Жыл бұрын
Your are great and explain everything in detail. I like your work!
@AntonStolov Жыл бұрын
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!
@Ecker0011 ай бұрын
This is the kind of details missing here, thank you. Seems you can do quite a lot with the virt command!
@AntonStolov11 ай бұрын
@@Ecker00 yeah sure, u can prepare image for any case and with any inside. Word up!
@weidongxu1377 Жыл бұрын
great video, accurate instructions and work like a charm, thanks Jay
@pauldowling21602 жыл бұрын
Thanks very much. So easy to follow with great explanations at each step. Fabulous work.
@AndreCataldi Жыл бұрын
You don't have to rename the image from .img to .qcow2 if you pass the parameter --format qcow2 to the qm importdisk command!
@ritchie19502 жыл бұрын
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?
@michaelwaterman35532 жыл бұрын
Learned something today, thanks a million Jay!
@doop97138 ай бұрын
Thank you so much, these videos are tremendously helpful!
@przemysawpakua9619 Жыл бұрын
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 Жыл бұрын
I'm having exactly the same problem. Did you manage to fix it? :)
@kaliyuga342210 ай бұрын
youtube.com/@LearnLinuxTV I'm having this problem also...can you help?
@lionking102228 ай бұрын
Same problem here... Someone knows how to fix it or can explain? Would really appreciate!
@cristian-danielbarbis51616 ай бұрын
same problem
@sda29112 жыл бұрын
Love the guide, except for several "...now BEFORE you click on this" (as I'm clicking on it...)
@DeliberateGeek4 ай бұрын
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 Жыл бұрын
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
@justaramdomkid74042 жыл бұрын
Bro ur so good at making tutorials
@RicardoWagner Жыл бұрын
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 Жыл бұрын
Thanks for the demo and info, have a great day
@LearnLinuxTV Жыл бұрын
Thanks, you too!
@michaelcooper54903 ай бұрын
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-op7kb11 ай бұрын
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 Жыл бұрын
Great video Jay! Thanks again!
@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.
@telecomcraft2 жыл бұрын
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?
@pablouesc9 ай бұрын
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 Жыл бұрын
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 Жыл бұрын
sudo apt install libguestfs-tools sudo virt-customize -a image-name.qcow2 --install qemu-guest-agent
@LucS0042 Жыл бұрын
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?
@Michael2010782 жыл бұрын
Very good explanation! Right the thing I need. Many thanks.
@bibelstudiet7580 Жыл бұрын
Thank you very much, again. Very useful.
@gineraso8 ай бұрын
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Ай бұрын
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 Жыл бұрын
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 Жыл бұрын
I wish I could put more than one like on this video ;)
@THEMithrandir09 Жыл бұрын
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?
@ostinatarg10 ай бұрын
Very good, excelent tutorial, recomended
@ahmedyo211 ай бұрын
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 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
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-gu2ql2 жыл бұрын
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 Жыл бұрын
Tnx, fyi with command qm importdisk I added -format qcow2 leaving extension to img seems to work
@BigFourHead2 жыл бұрын
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 Жыл бұрын
Brilliant, thank you!
@escanorsama79225 ай бұрын
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!
@Ecker0011 ай бұрын
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?
@speedyg52 жыл бұрын
why wouldn't you install the qemu-guest-agent as part of the template?
@daviddunkelheit9952 Жыл бұрын
Probably to prevent replication of the ID or secret
@saibaneko Жыл бұрын
Great video! Thnx a lot!
@gintarasp22 жыл бұрын
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 Жыл бұрын
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. :)
@DrMerciless7 ай бұрын
very important step before you clone your template it to remove the Machine-IDs.
@MrWhereIsYourGodNow2 жыл бұрын
But there is already an LXC template available in proxmox with Ubuntu 22.04. Why not use that?
@mhavock2 жыл бұрын
IKR 😀, I was about to ask why he did it this way.
@djstraussp2 жыл бұрын
Learning from scratch... This is the way !!
@mhavock2 жыл бұрын
@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?
@hotstovejer2 жыл бұрын
@@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 Жыл бұрын
thanks Jay !
@srdjanmarjanovic2 жыл бұрын
Could qemu-guest-agent somehow be installed on the template so it gets automatically installed on every VM ?
@ritchie19502 жыл бұрын
You could just start the machine and install the preferred software and then do a second template.
@MrPDC-jr5yl2 жыл бұрын
yep: virt-customize -a ubuntu-22.04.img --install qemu-guest-agent
@Skullfurious5 ай бұрын
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.
@caseyknolla84192 жыл бұрын
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-rw9co2 жыл бұрын
I had the same issue. I just went into the UI and changed the interface back to default and it worked for me.
@caseyknolla84192 жыл бұрын
I discovered that this was due to upgrading to Proxmox 7 without rebooting afterwards. Once I rebooted the server, this tutorial worked as described!
@TheFaltajan3 ай бұрын
unfortunately not working for me. Unable to login to VM. no ssh, no user/passwd
@jus40272 жыл бұрын
cracking good tutorial Jay
@hamidouz312 жыл бұрын
You are the best
@joeortega99302 жыл бұрын
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?
@rraymakers2 жыл бұрын
I had the same issue. Setting one solved it.
@voiceoftreason17609 ай бұрын
why do you make the template BIOS instead of UEFI?
@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_BE8 ай бұрын
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 Жыл бұрын
Hello Jay! Great video. When I clone the template and boot the VM I get the Grub rescue prompt everytime
@sudocheese Жыл бұрын
I found this useful, so I'm leaving a vapid comment to appease our algorithmic overlords.
@bclso2 жыл бұрын
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?
@Wallf02 жыл бұрын
Did you find a solution for this? Thank you!
@MrPDC-jr5yl2 жыл бұрын
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 Жыл бұрын
@@MrPDC-jr5yl THANKS SOOOOO MUCH!!!
@ZeeKay80 Жыл бұрын
@@MrPDC-jr5yl there is a file under /etc/ssh/sshd_config.d/ directory that overrides this. You have to set PasswordAuthentication yes in there.
@khanhthedag726910 ай бұрын
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 Жыл бұрын
i have kvm running raw and cloudinit installs the qemu agent as part of update to cloudimage. - can proxmox not do that
@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 Жыл бұрын
What do you see instead? I'm not sure I'm following.
@ashishsinghdev Жыл бұрын
Looks like a network issue when leasing IP from DHCP server,
@am7-p Жыл бұрын
The cloud-init images are very minimal. Is there any way to use full featured Ubuntu server for this?
@aHondaAccord Жыл бұрын
What are ssh public key used for? (referencing @7:03)
@LearnLinuxTV Жыл бұрын
I have an ssh key video that’s dedicated to that topic.
@hendranatasaputra28262 жыл бұрын
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?
@Kumalski972 ай бұрын
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?
@Kumalski972 ай бұрын
OK! I AM IDIOT GUYS I need to specify where is my private key on my machine and then everything works beautifully :)
@MrDenisJoshua Жыл бұрын
Can you install qemu directly in the template ? Thanks for the video
@scerons Жыл бұрын
See @FilipeNeto616 comment
@MrEric3778 ай бұрын
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
@fabiosuriano54335 ай бұрын
Is it possible to create a template for Debian with LVM included?
@GayBoucheryGonzague2 жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
@@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 Жыл бұрын
@@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 Жыл бұрын
@@BillCClinton It is the "libguestfs-tools" package, so "apt install libguestfs-tools"
@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 Жыл бұрын
Is this for all Linux distros or just for Ubuntu?
@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 :(
@TheBoyNamedR10 ай бұрын
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?
@TheBoyNamedR10 ай бұрын
Sometimes I can just press enter and I'm good, other times no response.
@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.
@Ecker0011 ай бұрын
Found any solution to this?
@stevegailey77011 ай бұрын
@@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.
@Ecker0010 ай бұрын
@@stevegailey770 alright so delete the machine id, shutdown, convert to template, clone, clone, clone and then it will be regenerated on first boot/login.
@stevegailey77010 ай бұрын
@@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...
@volodyaevv71202 жыл бұрын
Why you did not integrate (install) QEMU agent into your template?
@kolyacpp2 жыл бұрын
Для этого перед созданием шаблона нужно запустить виртуалку, а тогда сразу запустится cloud init для настройки, и больше не получится сделать такую настройку под каждую клонированную виртуалку с помощью cloud init диска. Если нужно много всего поставить, то можно вручную поставить систему, а потом подготовить её для конвертации в шаблон. На этом канале есть урок. Но мне больше понравился этот способ, потому что получается меньше ненужного говна в шаблоне. Единственное, с чем пока не разобрался - это как в самом шаблоне разрешить ssh аутентификацию по паролю, а не по ключу. После каждого клонирования лень редактировать sshd_config
@MrPDC-jr5yl2 жыл бұрын
@@kolyacpp Не обязательно, можно через команду: qemu-img resize ubuntu-20.04.img 32G сразу увеличить и потом: virt-customize -a ubuntu-20.04.img --install qemu-guest-agent. Работает на ура
@kolyacpp2 жыл бұрын
@@MrPDC-jr5yl Круто! Я погуглил, у этой штуки есть ещё --run-command. По идее можно запустить команду, которая отредактирует PasswordAuthentication в sshd_confing. Но если openssh ставится с помощью cloud-init, то этого файла там ещё не будет. Как костыль можно добавить это в греп) и потом туда костыль, чтобы почистить греп, когда замена удастся)
@ahmednishaal943210 ай бұрын
"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