Windows 2012/2016 ephermal drive under block devices

23 views
Skip to first unread message

Pietto Vasco

unread,
Sep 17, 2019, 2:40:24 PM9/17/19
to Packer
I wanted to touch base if anyone else is seeing this issue. I have a pretty simple build that is generating 25+ ephemeral drive, causing confusion

{
   "builders":[
      { 
         "vpc_id":"vpc-xxxxxx",
     "subnet_id":"subnet-xxxxxx",
         
         "type":"amazon-ebs",
          "iam_instance_profile":"packer-ami-role",
         "region":"us-xxx-west-1",
         "instance_type":"t3.medium",
         "source_ami":"ami-55295234",
         "ami_name":"xxxx-windows2016-base-{{isotime \"2006-01-02\"}}",
         "user_data_file":"ec2-userdata.ps1",
         "communicator":"winrm",
         "winrm_username":"Administrator",
         "winrm_use_ssl":true,
         "winrm_insecure":true,
     "tags": {
           "Name": "name{{isotime \"2006-01-02\"}}"
     },
         "encrypt_boot":true,
         "kms_key_id":"xxxxx-xxxxxxx-xxxxxxx-xxxxxxxx"


/dev/sda1=snap-0e89848f7d50a2f8b:30:true:gp2:encrypted, xvdca=ephemeral0, xvdcb=ephemeral1, xvdcc=ephemeral2, xvdcd=ephemeral3, xvdce=ephemeral4, xvdcf=ephemeral5, xvdcg=ephemeral6, xvdch=ephemeral7, xvdci=ephemeral8, xvdcj=ephemeral9, xvdck=ephemeral10, xvdcl=ephemeral11, xvdcm=ephemeral12, xvdcn=ephemeral13, xvdco=ephemeral14, xvdcp=ephemeral15, xvdcq=ephemeral16, xvdcr=ephemeral17, xvdcs=ephemeral18, xvdct=ephemeral19, xvdcu=ephemeral20, xvdcv=ephemeral21, xvdcw=ephemeral22, xvdcx=ephemeral23, xvdcy=ephemeral24, xvdcz=ephemeral
   
There is currently a github issue on this 6797, the current workaround is to remove each drive, but as I dont build any in the json, how would I remove them?

thanks

Shashank

unread,
Oct 5, 2019, 7:41:01 AM10/5/19
to Packer

James Jennett

unread,
Nov 8, 2019, 4:12:38 AM11/8/19
to Packer

Pietto,

I am seeing the same thing on all our recent Windows template builds.  The ones from late August don't have this problem.  What I see now is, in the Block Devices property of the AMIs:
/dev/sda1=snap-038cbdd45022646a0:30:true:gp2, xvdca=ephemeral0, xvdcb=ephemeral1, xvdcc=ephemeral2, xvdcd=ephemeral3, xvdce=ephemeral4, xvdcf=ephemeral5, xvdcg=ephemeral6, xvdch=ephemeral7, xvdci=ephemeral8, xvdcj=ephemeral9, xvdck=ephemeral10, xvdcl=ephemeral11, xvdcm=ephemeral12, xvdcn=ephemeral13, xvdco=ephemeral14, xvdcp=ephemeral15, xvdcq=ephemeral16, xvdcr=ephemeral17, xvdcs=ephemeral18, xvdct=ephemeral19, xvdcu=ephemeral20, xvdcv=ephemeral21, xvdcw=ephemeral22, xvdcx=ephemeral23, xvdcy=ephemeral24, xvdcz=ephemeral25

I am using launch_block_device_mappings as Shashank advises in this thread.

        "launch_block_device_mappings": [{
                "device_name": "/dev/sda1",
                "volume_size": 50,
                "volume_type": "gp2",
                "delete_on_termination": true,
                "encrypted": true,
                "kms_key_id": "a5d8c50b-558a-41cd-ab8a-f0f9f1cee864"
            },
            {
                "device_name": "xvdb",
                "volume_size": 50,
                "volume_type": "gp2",
                "delete_on_termination": true,
                "encrypted": true,
                "kms_key_id": "a5d8c50b-558a-41cd-ab8a-f0f9f1cee864"  
            },
            {
                "device_name": "xvdc",
                "volume_size": 40,
                "volume_type": "gp2",
                "delete_on_termination": true,
                "encrypted": true,
                "kms_key_id": "a5d8c50b-558a-41cd-ab8a-f0f9f1cee864"   
            },
            {
                "device_name": "xvdd",
                "volume_size": 20,
                "volume_type": "gp2",
                "delete_on_termination": true,
                "encrypted": true,
                "kms_key_id": "a5d8c50b-558a-41cd-ab8a-f0f9f1cee864"  
            },
            {
                "device_name": "xvde",
                "volume_size": 40,
                "volume_type": "gp2",
                "delete_on_termination": true,
                "encrypted": true,
                "kms_key_id": "a5d8c50b-558a-41cd-ab8a-f0f9f1cee864"  
            },
            {
                "device_name": "xvdf",
                "volume_size": 5,
                "volume_type": "gp2",
                "delete_on_termination": true,
                "encrypted": true,
                "kms_key_id": "a5d8c50b-558a-41cd-ab8a-f0f9f1cee864"  
            }]


This is messing me up because I am trying to build a W2016 image for SQL server (with 6 drives) and the drive mappings in the EC2 images are constantly out of line with the drive mappings in the image.

Needs looking at.

JJ
Reply all
Reply to author
Forward
0 new messages