InvalidBlockDeviceMapping => snapshotId can only be modified on EBS devices (Fog::Compute::AWS::Error)

1,493 views
Skip to first unread message

David Kerr

unread,
Jul 9, 2013, 7:32:51 PM7/9/13
to ruby...@googlegroups.com
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 = $ec2.snapshots.new
      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


geemus (Wesley Beary)

unread,
Jul 15, 2013, 11:47:24 AM7/15/13
to ruby...@googlegroups.com
Could you open an issue at: https://github.com/fog/fog/issues?state=open

I think that will help me to get the right people pointed at it.

Thanks!
wes




--
You received this message because you are subscribed to the Google Groups "ruby-fog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-fog+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Frederick Cheung

unread,
Jul 15, 2013, 12:26:15 PM7/15/13
to ruby...@googlegroups.com
Do you have any instance store volumes mounted? Those are not EBS so trying to do anything EBS related with them will blow up

Fred

David Kerr

unread,
Jul 15, 2013, 3:41:59 PM7/15/13
to ruby...@googlegroups.com
Hmm, I'm not positive about the root partition but that's the one i'm skipping with !~ /sda1/

The other 3 are most definitely EBS.

I'm going to move this over to the github per Wes's suggestion.

Thanks!
Reply all
Reply to author
Forward
0 new messages