Skip to content

Commit ace72f3

Browse files
feat(post): Cloud Image, Cloud Init
1 parent 057631e commit ace72f3

File tree

1 file changed

+83
-0
lines changed

1 file changed

+83
-0
lines changed
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
layout: post
3+
title: "Perfect Proxmox Template with Cloud Image and Cloud Init"
4+
date: 2022-03-19 10:00:00 -0500
5+
categories: proxmox
6+
tags: proxmox ubuntu cloud-image cloud-init cloud clone linux
7+
---
8+
9+
[![Perfect Proxmox Template with Cloud Image and Cloud Init](https://img.youtube.com/vi/shiIi38cJe4/0.jpg)](https://www.youtube.com/watch?v=shiIi38cJe4 "Perfect Proxmox Template with Cloud Image and Cloud Init")
10+
11+
Using Cloud Images and Cloud Init with Proxmox is easy, fast, efficient, and fun! Cloud Images are small images that are certified cloud ready that have Cloud Init preinstalled and ready to accept a Cloud Config. Cloud Images and Cloud Init also work with Proxmox and if you combine the two you have a perfect, small, efficient, optimized clone template to provision machines with your ssh keys and network settings. So join me as we discuss, set up, and configure Proxmox with Cloud Images and Cloud Init.
12+
13+
📺 [Watch Video](https://www.youtube.com/watch?v=shiIi38cJe4)
14+
15+
16+
17+
## Intructions
18+
19+
Choose your [Ubuntu Cloud Image](https://cloud-images.ubuntu.com/)
20+
21+
Download Ubuntu (replace with the url of the one you chose from above)
22+
23+
```bash
24+
wget https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64-disk-kvm.img
25+
```
26+
27+
Create a new virtual machine
28+
29+
```bash
30+
qm create 8000 –-name ubuntu-cloud --memory 2048 --net0 virtio,bridge=vmbr0
31+
```
32+
33+
Import the downloaded Ubuntut disk to local-lvm storage
34+
35+
```bash
36+
qm importdisk 8000 focal-server-cloudimg-amd64.img local-lvm
37+
```
38+
39+
Attach the new disk to the vm as a scsi drive on the scsi controller
40+
41+
```bash
42+
qm set 8000 --scsihw virtio-scsi-pci --scsi0 local-lvm:vm-8000-disk-0
43+
```
44+
45+
Add cloud init drive
46+
47+
```bash
48+
qm set 8000 --ide2 local-lvm:cloudinit
49+
```
50+
51+
Make the clud init drive bootable and restrict BIOS to boot from disk only
52+
53+
```bash
54+
qm set 8000 --boot c --bootdisk scsi0
55+
```
56+
57+
Add serial console
58+
59+
```bash
60+
qm set 8000 --serial0 socket --vga serial0
61+
```
62+
63+
DO NOT START YOUR VM
64+
65+
Configure hardware and cloud init, then clone if you want
66+
67+
## Troubleshooting
68+
69+
70+
If you need to reset your machine-id
71+
72+
```bash
73+
sudo rm -f /etc/machine-id
74+
sduo rm -f /var/lib/dbus/machine-id
75+
76+
```
77+
78+
Then shut it down and do not boot it up
79+
80+
81+
⚙️ See all the hardware I recommend at <https://l.technotim.live/gear>
82+
83+
🚀 Don't forget to check out the [🚀Launchpad repo](https://l.technotim.live/quick-start) with all of the quick start source files

0 commit comments

Comments
 (0)