Sets the blockDeviceMapping used for an instance.
The instance needs to be in a
InstanceState#STOPPED state, which
implies two things:
- The instance was launched from an EBS-backed AMI so that it can stop
- You have stopped and waited for the instance to transition from
InstanceState#STOPPING to
InstanceState#STOPPED
To create the instances of
BlockDevice, the
constructor can be used with the following parameters:
BlockDevice#EbsBlockDevice(String,String,boolean), that are:
- Volume id (required), for instance, "vol-blah"
- Device name (optional), for instance, "/dev/sda1". To find out more
about device names, read the next paragraph.
- Delete on termination flag (optional), which defines whether the
volume will be deleted upon instance's termination.
Note that the device names between Linux and Windows differ. For Linux,
ensure that your device name is in the form /dev/sd[a-z] . For example,
/dev/sda , /dev/sdb and /dev/sdh are all valid device names.
For Windows, the root device is still referred to as /dev/sda1 . For other
devices, ensure that they are in the form /xvd[c-p] . For example, /xvde ,
/xvdf and /xvdp are all valid Windows device names.
NOTE: As of now 02/20/2010, this command only works to change the
DeleteOnTermination property of the device. The volume must be
attached to a stopped instance.