<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Create a Ubuntu 18.04 cloud init template]]></title><description><![CDATA[<p dir="auto">I try to create a 18.04 cloud init template for ubuntu, but i cannot edit the drive for the new vm. When i install, by itself ubuntu creates two partitions, even if i try to create only one, what i can do to solve this?</p>
<p dir="auto">System is a XCP-NG 8.0<br />
With XenOrchestra build from the sources</p>
]]></description><link>https://xcp-ng.org/forum/topic/1944/create-a-ubuntu-18-04-cloud-init-template</link><generator>RSS for Node</generator><lastBuildDate>Mon, 16 Nov 2026 10:53:49 GMT</lastBuildDate><atom:link href="https://xcp-ng.org/forum/topic/1944.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 12 Sep 2019 21:13:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Create a Ubuntu 18.04 cloud init template on Tue, 28 Jan 2020 17:34:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/bcatubig" aria-label="Profile: bcatubig">@<bdi>bcatubig</bdi></a> <img src="/forum/assets/uploads/files/1580232853539-776ddfa2-a97c-4ea6-adb5-2dd05943b421-image.png" alt="776ddfa2-a97c-4ea6-adb5-2dd05943b421-image.png" class="img-markdown  img-fluid" /></p>
<p dir="auto">I see this message on the console right after the VM is created. Could it be somehow helpful?</p>
]]></description><link>https://xcp-ng.org/forum/post/21756</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/21756</guid><dc:creator><![CDATA[moisei]]></dc:creator><pubDate>Tue, 28 Jan 2020 17:34:51 GMT</pubDate></item><item><title><![CDATA[Reply to Create a Ubuntu 18.04 cloud init template on Tue, 28 Jan 2020 17:32:57 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/moisei" aria-label="Profile: moisei">@<bdi>moisei</bdi></a> I didn't use a custom cloud config. I've only tried adding the ssh-key via XOA</p>
]]></description><link>https://xcp-ng.org/forum/post/21755</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/21755</guid><dc:creator><![CDATA[bcatubig]]></dc:creator><pubDate>Tue, 28 Jan 2020 17:32:57 GMT</pubDate></item><item><title><![CDATA[Reply to Create a Ubuntu 18.04 cloud init template on Tue, 28 Jan 2020 17:31:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/bcatubig" aria-label="Profile: bcatubig">@<bdi>bcatubig</bdi></a> it didn't help. would you mind to share the config that is working for you?</p>
]]></description><link>https://xcp-ng.org/forum/post/21754</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/21754</guid><dc:creator><![CDATA[moisei]]></dc:creator><pubDate>Tue, 28 Jan 2020 17:31:08 GMT</pubDate></item><item><title><![CDATA[Reply to Create a Ubuntu 18.04 cloud init template on Tue, 28 Jan 2020 17:00:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/moisei" aria-label="Profile: moisei">@<bdi>moisei</bdi></a> Sure</p>
<p dir="auto">Can you try running <code>dpkg-reconfigure cloud-init</code> and select both <code>ConfigDrive</code> and the <code>Openstack</code> option.</p>
<p dir="auto">From there, I would try the vm template process again.</p>
<p dir="auto">If that still fails, I would try manually invoking cloud-config from the new vm with the attached cloud-config drive to see if there is an issue with cloud-config or your config.</p>
<p dir="auto">It should provision itself automatically if everything is correct.</p>
<p dir="auto">If that fails, you may need to attempt the entire process again and do some more trial/error.</p>
]]></description><link>https://xcp-ng.org/forum/post/21750</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/21750</guid><dc:creator><![CDATA[bcatubig]]></dc:creator><pubDate>Tue, 28 Jan 2020 17:00:44 GMT</pubDate></item><item><title><![CDATA[Reply to Create a Ubuntu 18.04 cloud init template on Tue, 28 Jan 2020 16:54:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/bcatubig" aria-label="Profile: bcatubig">@<bdi>bcatubig</bdi></a> yes I did. I've just followed your instructions above. Also the fact the cloud-init logs are present indicates that it is running,  isn't it?</p>
]]></description><link>https://xcp-ng.org/forum/post/21749</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/21749</guid><dc:creator><![CDATA[moisei]]></dc:creator><pubDate>Tue, 28 Jan 2020 16:54:16 GMT</pubDate></item><item><title><![CDATA[Reply to Create a Ubuntu 18.04 cloud init template on Tue, 28 Jan 2020 16:01:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/moisei" aria-label="Profile: moisei">@<bdi>moisei</bdi></a> Before rebooting the Ubuntu 18.04 vm to convert it to an image, did you enable <code>cloud-init</code> service by running</p>
<pre><code>sudo systemctl enable cloud-init
</code></pre>
<p dir="auto">before powering off the vm?</p>
]]></description><link>https://xcp-ng.org/forum/post/21747</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/21747</guid><dc:creator><![CDATA[bcatubig]]></dc:creator><pubDate>Tue, 28 Jan 2020 16:01:51 GMT</pubDate></item><item><title><![CDATA[Reply to Create a Ubuntu 18.04 cloud init template on Tue, 28 Jan 2020 15:59:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/bcatubig" aria-label="Profile: bcatubig">@<bdi>bcatubig</bdi></a> yes <code>ConfigDrive</code> and only <code>ConfigDrive</code> is enabled. My script does 3 things: SSH, set hostname, and touch some file. None of them is executed and the cloud-init logs doesn't show any trace of the execution.</p>
<pre><code>#cloud-init

hostname: {name}%

ssh_authorized_keys:
  - ssh-rsa AAAA...kd mykey@myhost

runcmd:
 - [ touch, "/tmp/CLOUD_INIT_WAS_HERE", / ]
 - touch /tmp/CLOUD_INIT_WAS_HERE_1
 - touch "/tmp/CLOUD_INIT_WAS_HERE_2"
</code></pre>
]]></description><link>https://xcp-ng.org/forum/post/21745</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/21745</guid><dc:creator><![CDATA[moisei]]></dc:creator><pubDate>Tue, 28 Jan 2020 15:59:55 GMT</pubDate></item><item><title><![CDATA[Reply to Create a Ubuntu 18.04 cloud init template on Tue, 28 Jan 2020 15:49:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/moisei" aria-label="Profile: moisei">@<bdi>moisei</bdi></a> Can you list steps taken?</p>
<p dir="auto">Can you verify that <code>ConfigDrive</code> is enabled in the <code>dpkg-reconfigure</code> of <code>cloud-init</code>?</p>
<p dir="auto">I haven't experimented with a full cloud-config. Only injecting an SSH key via XOA. I'll run through the steps again tonight to see if I run into any issues.</p>
]]></description><link>https://xcp-ng.org/forum/post/21743</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/21743</guid><dc:creator><![CDATA[bcatubig]]></dc:creator><pubDate>Tue, 28 Jan 2020 15:49:16 GMT</pubDate></item><item><title><![CDATA[Reply to Create a Ubuntu 18.04 cloud init template on Tue, 28 Jan 2020 15:27:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/bcatubig" aria-label="Profile: bcatubig">@<bdi>bcatubig</bdi></a> I've done all the magic but still my cloud init is not taken into account completely.<br />
I can see the VM is created with 10 MB additional disk.<br />
I can mount this device and see that it does contain my cloud-init script.<br />
but the script is not executed and cloud-config logs don't contain any useful information.<br />
Please advise what would be the right way to track this issue??</p>
]]></description><link>https://xcp-ng.org/forum/post/21737</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/21737</guid><dc:creator><![CDATA[moisei]]></dc:creator><pubDate>Tue, 28 Jan 2020 15:27:36 GMT</pubDate></item><item><title><![CDATA[Reply to Create a Ubuntu 18.04 cloud init template on Mon, 27 Jan 2020 04:35:26 GMT]]></title><description><![CDATA[<p dir="auto">For those trying to create an Ubuntu 18.04 cloud-init template and are stuck wondering why SSH does not work or why the vm disk size is not matching up to what was configured in XOA, please follow the below <em>extra</em> steps.</p>
<p dir="auto"><strong>Note</strong>: If using the Ubuntu 18.04 in XCP-NG Center (not XOA), the mininum disk size is 10GB (it is not configurable to 4GB as described in the original Debian article.)</p>
<p dir="auto">IMO, ignore the CloudInit part of <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/olivierlambert" aria-label="Profile: olivierlambert">@<bdi>olivierlambert</bdi></a> <a href="https://xen-orchestra.com/blog/debian-cloud-template-for-xenserver/" target="_blank" rel="noopener noreferrer nofollow ugc">original blog post (debian)</a> and follow the below steps</p>
<p dir="auto">The following commands need to be run <em>after</em> you have installed Ubuntu 18.04 (but before you have converted the vm to a template)</p>
<pre><code class="language-sh"># install cloud-init and deps
sudo apt install cloud-init cloud-initramfs-growroot

# !!! This part is important, make sure to keep ConfigDrive checked !!!
# remove all datasources except `ConfigDrive: Reads data from Openstack Config Drive`
sudo dpkg-reconfigure cloud-init

# enable cloud-init systemd unit
sudo systemctl enable cloud-init

# disables bug message from https://bugs.launchpad.net/bugs/1669675
touch /home/ubuntu/.cloud-warnings.skip

# disable root password
passwd -l root
</code></pre>
<p dir="auto">and finally, power off the vm and convert to a template.</p>
<p dir="auto"><strong>Notes</strong></p>
<ul>
<li>You shouldn't have to configure the default <code>/etc/cloud/cloud.cfg</code> file as it comes configured by Ubuntu out of the box</li>
<li>The key is to enable the <code>cloud-init</code> systemd unit before powering off the vm.</li>
<li>Before enabling <code>cloud-init</code>, when a vm launched from the original template, it did not have SSH installed or the correct disk size.</li>
</ul>
]]></description><link>https://xcp-ng.org/forum/post/21663</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/21663</guid><dc:creator><![CDATA[bcatubig]]></dc:creator><pubDate>Mon, 27 Jan 2020 04:35:26 GMT</pubDate></item><item><title><![CDATA[Reply to Create a Ubuntu 18.04 cloud init template on Sun, 15 Sep 2019 09:42:13 GMT]]></title><description><![CDATA[<p dir="auto">No need, we'll have tested templates available for everyone for our next XOA release, within "XO hub" feature <img src="https://xcp-ng.org/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=566b705aef6" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
]]></description><link>https://xcp-ng.org/forum/post/16959</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/16959</guid><dc:creator><![CDATA[olivierlambert]]></dc:creator><pubDate>Sun, 15 Sep 2019 09:42:13 GMT</pubDate></item><item><title><![CDATA[Reply to Create a Ubuntu 18.04 cloud init template on Sat, 14 Sep 2019 18:58:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/olivierlambert" aria-label="Profile: olivierlambert">@<bdi>olivierlambert</bdi></a> thanks for you help, i was able to create the template, to be able to work i needed to reinstall cloud-init and configure it. i'm thinking of uploading the template to some server, to help those who need it. do you know any server for me to do it?</p>
]]></description><link>https://xcp-ng.org/forum/post/16951</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/16951</guid><dc:creator><![CDATA[luizbob]]></dc:creator><pubDate>Sat, 14 Sep 2019 18:58:49 GMT</pubDate></item><item><title><![CDATA[Reply to Create a Ubuntu 18.04 cloud init template on Sat, 14 Sep 2019 14:34:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/luizbob" aria-label="Profile: luizbob">@<bdi>luizbob</bdi></a> said in <a href="/forum/post/16941">Create a Ubuntu 18.04 cloud init template</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/olivierlambert" aria-label="Profile: olivierlambert">@<bdi>olivierlambert</bdi></a>  thank you</p>
<p dir="auto">i looked into the logs and it seems the cloud-init is using NoCloud datasource, i'm gonna run dpkg-reconfigure cloud-init to change it to cloud drive.<br />
but, when i searched witch datasource should be used i find this link <a href="https://xen-orchestra.com/docs/cloudinit.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://xen-orchestra.com/docs/cloudinit.html</a><br />
saying that NoCloud could be used</p>
</blockquote>
<p dir="auto">and, another thing, when i installed ubuntu, by itself the system create a second partition called boot, which was 1mb in size.<br />
Could be that the reason of cloud-init not working properly?</p>
]]></description><link>https://xcp-ng.org/forum/post/16942</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/16942</guid><dc:creator><![CDATA[luizbob]]></dc:creator><pubDate>Sat, 14 Sep 2019 14:34:10 GMT</pubDate></item><item><title><![CDATA[Reply to Create a Ubuntu 18.04 cloud init template on Sat, 14 Sep 2019 14:17:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/olivierlambert" aria-label="Profile: olivierlambert">@<bdi>olivierlambert</bdi></a>  thank you</p>
<p dir="auto">i looked into the logs and it seems the cloud-init is using NoCloud datasource, i'm gonna run dpkg-reconfigure cloud-init to change it to cloud drive.<br />
but, when i searched witch datasource should be used i find this link <a href="https://xen-orchestra.com/docs/cloudinit.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://xen-orchestra.com/docs/cloudinit.html</a><br />
saying that NoCloud could be used</p>
]]></description><link>https://xcp-ng.org/forum/post/16941</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/16941</guid><dc:creator><![CDATA[luizbob]]></dc:creator><pubDate>Sat, 14 Sep 2019 14:17:19 GMT</pubDate></item><item><title><![CDATA[Reply to Create a Ubuntu 18.04 cloud init template on Sat, 14 Sep 2019 08:19:59 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">You need to investigate on the VM logs to understant why your cloudinit config isn't taken into account.</p>
<p dir="auto">Or you could wait for our "XO Hub" feature with tested/working CloudInit templates (we'll have one for Ubuntu)</p>
]]></description><link>https://xcp-ng.org/forum/post/16939</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/16939</guid><dc:creator><![CDATA[olivierlambert]]></dc:creator><pubDate>Sat, 14 Sep 2019 08:19:59 GMT</pubDate></item><item><title><![CDATA[Reply to Create a Ubuntu 18.04 cloud init template on Sat, 14 Sep 2019 03:09:24 GMT]]></title><description><![CDATA[<p dir="auto">i was able to create the template, but when i try to add a ssh-key in cloud-init it is not added to the server, what can i do?</p>
]]></description><link>https://xcp-ng.org/forum/post/16937</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/16937</guid><dc:creator><![CDATA[luizbob]]></dc:creator><pubDate>Sat, 14 Sep 2019 03:09:24 GMT</pubDate></item></channel></rss>