Commit a59ee93b authored by Peter Sankauskas's avatar Peter Sankauskas

To be able to build both PV and HVM images, it is not possible to use both...

To be able to build both PV and HVM images, it is not possible to use both /dev/sd[f-p] and [1-16] as the HVM images get attached at /dev/sdf but must be mounted a /dev/sdf1.

This reduces the number of simultaneous packer runs possible significantly, but unless you are Netflix, who have Aminator anyway, this is probably never going to be an issue
parent 19d0961a
......@@ -27,11 +27,12 @@ func AvailableDevice() (string, error) {
continue
}
for i := 1; i < 16; i++ {
device := fmt.Sprintf("/dev/%s%c%d", prefix, letter, i)
if _, err := os.Stat(device); err != nil {
return device, nil
}
// To be able to build both Paravirtual and HVM images, the unnumbered
// device and the first numbered one must be available.
// E.g. /dev/xvdf and /dev/xvdf1
numbered_device := fmt.Sprintf("%s%d", device, 1)
if _, err := os.Stat(numbered_device); err != nil {
return device, nil
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment