The system serial number is empty under KVM and exposed in the sysfs, so I propose putting the fqdn of the server into that field.
That way you can pick up a Brightbox cloud server fairly easily:
with open('/sys/devices/virtual/dmi/id/product_serial', 'r') as content_file: content = content_file.read()
if content.rstrip().endswith(".brightbox.com"): print("Brightbox VM") else: print("Not a Brightbox VM")
The system serial number is empty under KVM and exposed in the sysfs, so I propose putting the fqdn of the server into that field.
That way you can pick up a Brightbox cloud server fairly easily:
with open('/ sys/devices/ virtual/ dmi/id/ product_ serial' , 'r') as content_file:
content = content_file.read()
if content. rstrip( ).endswith( ".brightbox. com"): "Brightbox VM")
print(
else:
print("Not a Brightbox VM")