Howdy.
I'm trying to take a snapshot of the volumes on one instance and move them to a new instance that I'm creating.
(think cloning a database server to a new environment for testing)
I get the snapshots created ok. but when I try to attach them to the new instance I get the above error.
I've attempted to go the reverse route and attach the volumes after the instance is created, and that sort of worked
(I got 1 volume out of the 3 i tried to attach) but I'd much rather have it get created with the volumes.
@mysnapshot = Array.new
loop through snapshots{
if y['deviceName'] !~ /sda1/ # because i don't want the root device.
snap.description = "hello"
snap.volume_id = y['volumeId']
snap.save
snap.reload
@mysnapshot.push({ 'DeviceName' => y['deviceName'], 'Ebs.SnapshotId' =>
snap.id , 'Ebs.DeleteOnTermination' => true })
end
}
server = $ec2.servers.create( :image_id => 'ami-xxxxxxx', :flavor_id => 'm1.large',
:ebs_optimized => 'true',
:block_device_mapping => @mysnapshot
[other stuff])
I suspect that my block_device_mapping is clobbering my root partition. does that sound correct? assuming that i solve that does this look right?
Thanks