Virtual PTP hardware clock on KVM guests

Written at evening time in English • Tags: , ,

Using a virtual PTP hardware clock with the ptp_kvm driver and chrony is an easy solution for keeping time on guest machines synchronized to their host. Ideally the host is already keeping accurate time by tracking a set of NTP servers, but it is still probably a good idea to still add some network NTP peers on guests as well. (more…)

Refreshing old Terraform state

Written at evening time in English • Tags: , ,

If you find yourself with an old Terraform state file (say from v0.11) and you need to run terraform plan to check things out, you’ll need to make some adjustments:

  • Add a terraform block with required_providers to provide the source for the provider.
  • Remove the version statement from the provider block. (You will want to move it to the provider in the required_providers block.)
  • Adjust any other syntax changes that result in errors (terraform plan):
    • list()tolist([])
    • type = "string"type = string
    • Possibly many others…
  • Replace the provider in the existing ancient state file.
  • Refresh the providers (terraform init).
  • Plan away! (more…)