From 3aeec2dd6460fbdd3b8f217ad8aa231acb4bfd45 Mon Sep 17 00:00:00 2001 From: Daniel Watkins Date: Tue, 21 Jul 2015 13:06:11 +0100 Subject: Add udev rules for Azure ephemeral disks. And install them in the Debian packaging. --- udev/66-azure-ephemeral.rules | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 udev/66-azure-ephemeral.rules (limited to 'udev') diff --git a/udev/66-azure-ephemeral.rules b/udev/66-azure-ephemeral.rules new file mode 100644 index 00000000..b9c5c3ef --- /dev/null +++ b/udev/66-azure-ephemeral.rules @@ -0,0 +1,18 @@ +# Azure specific rules +ACTION!="add|change", GOTO="cloud_init_end" +SUBSYSTEM!="block", GOTO="cloud_init_end" +ATTRS{ID_VENDOR}!="Msft", GOTO="cloud_init_end" +ATTRS{ID_MODEL}!="Virtual_Disk", GOTO="cloud_init_end" + +# Root has a GUID of 0000 as the second value +# The resource/resource has GUID of 0001 as the second value +ATTRS{device_id}=="?00000000-0000-*", ENV{fabric_name}="azure_root", GOTO="ci_azure_names" +ATTRS{device_id}=="?00000000-0001-*", ENV{fabric_name}="azure_resource", GOTO="ci_azure_names" +GOTO="cloud_init_end" + +# Create the symlinks +LABEL="ci_azure_names" +ENV{DEVTYPE}=="disk", SYMLINK+="disk/cloud/$env{fabric_name}" +ENV{DEVTYPE}=="partition", SYMLINK+="disk/cloud/$env{fabric_name}-part%n" + +LABEL="cloud_init_end" -- cgit v1.2.3