Open braham2019 opened 2 weeks ago
@braham2019 the Terraform looks good. You could change boot
to boot = "order=scsi0"
, not sure what bootdisk
does in this context.
The disks swapping probably has to do with the os in the image as /dev/sda
and /dev/sdb
are based on the order is which GRUB discovered the "hardware".
As workaround, you could add a serial:
to the disks. In /dev/disk/by-id
, a simlink will be created to /dev/sda
and /dev/sdb
.
I want to create 3 identical swarm nodes with a 8 GB boot disk and 16 GB data disk. This is a lab setup to practice my terraform and ansible skills.
The VM's are clones from a cloud init template.
The problem I'm facing is that every time a VM is created, I get a different boot disk. Sometimes it's sda, sometimes it's sdb. I've destroyed and redone this several times. The results are always different.
Example for first server
And the second server:
I have tried to change "disks" section to a "disk" section , but then cloud-init fails altogether. Commenting out the boot section or enabling it is the same result.
boot = "order=scsi0;scsi1"
This is my swarm.tf file.