<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/styles/rss-style.xsl"?>

<rss version="2.0"
 xmlns:blogChannel="http://backend.userland.com/blogChannelModule"
>

<channel>
<title>troglodyne.net</title>
<link>http://troglodyne.net//posts/d49f0d99-b303-455d-8d10-66e466558469?format=xml</link>
<description>troglodyne.net : /posts/d49f0d99-b303-455d-8d10-66e466558469</description>
<language>en</language>
<pubDate>2026-04-06T11:28:26</pubDate>
<lastBuildDate>2026-04-06T11:28:26</lastBuildDate>

<image>
<title>troglodyne.net</title>
<url>/favicon.ico</url>
<link>http://troglodyne.net</link>
<width>32</width>
<height>32</height>
<description>troglodyne.net favicon</description>
</image>
<item>
<title>Using libvirt with terraform on ubuntu</title>
<link>http://troglodyne.net/posts/d49f0d99-b303-455d-8d10-66e466558469</link>
<description><![CDATA[<p>
In short, do what is suggested <a href="https://github.com/dmacvicar/terraform-provider-libvirt/commit/22f096d9">here</a>.
</p>
<p>
For the long version, this is a problem because terraform absolutely insists on total hamfisted control of its resources, including libvirt pools.
This means that it must create a new one which is necessarily outside of the realm of it's apparmor rules.
As such you have to turn that stuff off in the libvirt config file.
</p>
<p>
Important stuff now that I'm <a href="https://github.com/Troglodyne-Internet-Widgets/trog-provisioner">using it to deploy resources</a>.
</p>
<h4>Other useful things to remember</h4>
<ul>
<li>hold escape after reboot to get a boot menu to go single-user when using virtual console via virt-manager, etc.</li>
<li><em>virsh net dhcp leases default</em> - get the 'local' IPs of the VMs so spawned</li>
<li>Cloud-init logs live in /var/log/cloud-init*.log</li>
<li>Overall result lives in /var/lib/cloud/data/result.json, you can read this automatically with your tooling.</li>
<li>The scripts you run (what you generally care about) live in /var/lib/cloud/instances/$PROVIDER/scripts/runcmd</li>
</ul>
Longer term I should build a configuration script for the HV to properly setup SELinux contexts, but hey.]]></description>
<author>george</author>
<guid isPermaLink="true">http://troglodyne.net/posts/d49f0d99-b303-455d-8d10-66e466558469</guid>
<pubDate>2024-08-07T13:43:40</pubDate>
<enclosure type="text/html" url="http://troglodyne.net/posts/d49f0d99-b303-455d-8d10-66e466558469" />
</item>
</channel>
</rss>
