added vm for second student
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -65,3 +65,73 @@ resource "proxmox_vm_qemu" "vm-student-1" {
|
|||||||
|
|
||||||
sshkeys = var.ssh_public_key
|
sshkeys = var.ssh_public_key
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
resource "proxmox_vm_qemu" "vm-student-2" {
|
||||||
|
name = "student02"
|
||||||
|
|
||||||
|
# Node name has to be the same name as within the cluster
|
||||||
|
# this might not include the FQDN
|
||||||
|
target_node = "pve"
|
||||||
|
|
||||||
|
# The template name to clone this vm from
|
||||||
|
clone = "temp-debian-13"
|
||||||
|
|
||||||
|
# Activate QEMU agent for this VM
|
||||||
|
agent = 1
|
||||||
|
|
||||||
|
os_type = "cloud-init"
|
||||||
|
vmid = 1001
|
||||||
|
vm_state = "running"
|
||||||
|
|
||||||
|
cpu {
|
||||||
|
cores = 2
|
||||||
|
sockets = 1
|
||||||
|
type = "host"
|
||||||
|
}
|
||||||
|
memory = 2048
|
||||||
|
scsihw = "virtio-scsi-pci"
|
||||||
|
|
||||||
|
# Setup the disk
|
||||||
|
disks {
|
||||||
|
scsi {
|
||||||
|
scsi0 {
|
||||||
|
# We have to specify the disk from our template, else Terraform will think it's not supposed to be there
|
||||||
|
disk {
|
||||||
|
storage = "local-lvm"
|
||||||
|
# The size of the disk should be at least as big as the disk in the template. If it's smaller, the disk will be recreated
|
||||||
|
size = "16G"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ide {
|
||||||
|
# Some images require a cloud-init disk on the IDE controller, others on the SCSI or SATA controller
|
||||||
|
ide1 {
|
||||||
|
cloudinit {
|
||||||
|
storage = "local-lvm"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
# Setup the network interface and assign a vlan tag: 256
|
||||||
|
|
||||||
|
network {
|
||||||
|
id = 0
|
||||||
|
model = "virtio"
|
||||||
|
bridge = "vmbr0"
|
||||||
|
macaddr = "bc:24:11:de:c1:28"
|
||||||
|
}
|
||||||
|
|
||||||
|
boot = "order=scsi0"
|
||||||
|
tags = "test,student,deb"
|
||||||
|
|
||||||
|
# Setup the ip address using cloud-init.
|
||||||
|
# Keep in mind to use the CIDR notation for the ip.
|
||||||
|
ipconfig0 = "ip=10.11.12.202/24,gw=10.11.12.254"
|
||||||
|
ciuser = "sbxadmin"
|
||||||
|
cipasswd = "sbxadmin"
|
||||||
|
cicustom = "vendor=local:snippets/qemu-guest-agent.yml" # /var/lib/vz/snippets/qemu-guest-agent.yml
|
||||||
|
ciupgrade = true
|
||||||
|
|
||||||
|
sshkeys = var.ssh_public_key
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user