How do I change the name of a server?

Sometimes we misspell the name of a server we create and need to modify the hostname after creation. The following checklist shows the steps to take in order to modify the hostname (currently this is just an outline).

On guest:

  • change /etc/hostname
  • vgrename volume group
  • change /etc/hosts
  • change /etc/fstab
  • Run update-grub
  • Add new monkeysphere service name: monkeysphere-host add-servicename ssh://
  • publish the new service name key monkeysphere-host publish-key <keyid>
  • Revoke old service name: monkeysphere-host revoke-servicename ssh://
  • revoke gpg key

gpg --edit root@…


save (password is monkeys)

gpg --send-key <keyid>

delete the secret key to prompt puppet to renegerate a new one with the new name

gpg --delete-secret-keys <keyid> for root user's gpg key

  • Add DNS entry for


  • reboot the guest
  • edit puppet configs for guest
  • apply new puppet configs to guest

On guest:

  • Reboot. Pray.
  • If it works... shutdown guest.

On host:

  • update-services --remove /etc/sv/OLDNAME
  • Delete old server name stuff in /usr/local/share/ISOs, /etc/kvm-manager, /etc/sv/
  • deluser


  • Update host pp file to fix name

On host:

  • lvremove newly created logical volume
  • lvrename old lv to new logical volume name

On hay:

If controlled by red, make name changes in seso to red_server and red_item.item_host

Last modified 8 years ago Last modified on Sep 21, 2013, 10:40:01 AM