使用自定义 FreeBSD ISO 创建 Google 云实例

Create Google Cloud instance with custom FreeBSD ISO

我想用 Hardenedbsd iso 创建一个新的 Google 云实例。 Hardenedbsd 是基于 FreeBSD 的 OS。我检查了 public 关于 https://cloud.google.com/compute/docs/images/import-existing-image 的文档,但我在支持的 OS 部分看不到 FreeBSD。

有办法吗?

我还没有尝试在 Google Cloud Platform 上使用任何 *BSD,所以请相信我的话。 您可以尝试以救援模式启动实例(如果支持)并执行 dd 将 Hardenedbsd 写入主磁盘。 您还可以查看 Hashicorp 的 Packer,它旨在创建 OS 图像以部署在云端。

https://www.packer.io/docs/builders/googlecompute.html

FreeBSD works pretty well in GCE, the upload procedure of a custom image or making your own is quite easy I would say even better than with AWS, therefore high are the changes the same could apply for Hardenedbsd,唯一的"trick"是你有你的原始磁盘后,你需要使用gnu tar上传图像:

gtar -cSzf freebsd.tar.gz disk.raw

要创建 disk.raw 我使用此脚本 https://github.com/fabrik-red/images/blob/master/fabrik.sh (root on ZFS) to read more about the procedures you could check: https://fabrik.red/post/google/

为了测试或获得想法,您可以尝试 FreeBSD 12.0 https://github.com/fabrik-red/images/releases/download/12.0/disk.tar.gz