diff --git a/vm_supervisor/vm/firecracker/instance.py b/vm_supervisor/vm/firecracker/instance.py index be4f886ba..7831eec7d 100644 --- a/vm_supervisor/vm/firecracker/instance.py +++ b/vm_supervisor/vm/firecracker/instance.py @@ -237,7 +237,7 @@ def _create_network_file(self) -> bytes: def _create_metadata_file(self) -> bytes: """Creates metadata configuration file for cloud-init tool""" - hostname = base64.b32encode(self.vm_hash).decode().strip("=").lower() + hostname = base64.b32encode(str.encode(self.vm_hash)).decode().strip("=").lower() metadata = { "instance-id": f"iid-instance-{self.vm_id}",