iT邦幫忙

2021 iThome 鐵人賽

DAY 8
1
Modern Web

從 0 開始 - 打造 Home Lab 及家用網路系列 第 8

Day 8 - 安裝 Cloud-Init

那這次我們決定使用 Debian 11 作為系統

首先,進入 Debian 官網下載 ISO,也可透過以下連結來下載。

https://cdimage.debian.org/debian-cd/current/amd64/iso-dvd/

建立虛擬機

需求如下

CPU: 2C
RAM: 2G RAM
Disk: 10G

  1. VM ID 跟 Name 都自定義即可

https://ithelp.ithome.com.tw/upload/images/20210923/20119484SVTIKZ09Sh.png

  1. 選擇剛剛下載好的 Debian 11 ISO

https://ithelp.ithome.com.tw/upload/images/20210923/20119484zNs0YaRsD9.png

  1. 把 qemu-guest-agent 打勾,這樣可以監控到一些 VM 資訊

https://ithelp.ithome.com.tw/upload/images/20210923/20119484bMQJDXyzxT.png

  1. 這邊自己設定 Disk 大小

https://ithelp.ithome.com.tw/upload/images/20210923/20119484b8kuExbdvL.png

  1. 虛擬 CPU 核心數設定

https://ithelp.ithome.com.tw/upload/images/20210923/20119484XUYyFFEQFN.png

  1. 記憶體設定

https://ithelp.ithome.com.tw/upload/images/20210923/20119484oYeYJmJeZd.png

  1. 網路設定(若需要使用物理網卡,請在這邊勾選 "No network drvice",並在結束後新增 PCI 裝置)

https://ithelp.ithome.com.tw/upload/images/20210923/20119484isshuxl9oO.png

設定 Cloud-Init

首先,我們先到 Hardware 的部分,新增兩個硬體。

  • USB Device
  • CloudInit Drive

新增好之後,就會長這樣。

https://ithelp.ithome.com.tw/upload/images/20210923/20119484oq4lYEmDN2.png

接著點選左邊的 Cloud-Init,依序設定,並按 Regenerate Image

https://ithelp.ithome.com.tw/upload/images/20210923/201194848E7gYkbeHI.png

安裝 Cloud-Init

設定好 Cloud-Init 後,我們要在 VM 內安裝

輸入這個指令來安裝 sudo apt install cloud-init -y

然後使用 sudo cloud-init init

就會部署了(或是重開機也可以)


上一篇
Day 7 - 神奇的工具 Cloud-Init
下一篇
Day 9 - 利用路由協議來組 SD-WAN 網路
系列文
從 0 開始 - 打造 Home Lab 及家用網路30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言