Discussion:
InvalidBlockDeviceMapping => snapshotId can only be modified on EBS devices (Fog::Compute::AWS::Error)
David Kerr
2013-07-09 23:32:51 UTC
Permalink
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
--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
geemus (Wesley Beary)
2013-07-15 15:47:24 UTC
Permalink
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
Post by David Kerr
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',
[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
--
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
For more options, visit https://groups.google.com/groups/opt_out.
--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Frederick Cheung
2013-07-15 16:26:15 UTC
Permalink
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
Post by David Kerr
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',
[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
--
You received this message because you are subscribed to the Google Groups "ruby-fog" group.
For more options, visit https://groups.google.com/groups/opt_out.
--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
David Kerr
2013-07-15 19:41:59 UTC
Permalink
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!
Post by Frederick Cheung
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
Post by David Kerr
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.
Post by David Kerr
(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.
Post by David Kerr
I've attempted to go the reverse route and attach the volumes after the
instance is created, and that sort of worked
Post by David Kerr
(I got 1 volume out of the 3 i tried to attach) but I'd much rather have
it get created with the volumes.
Post by David Kerr
@mysnapshot = Array.new
loop through snapshots{
if y['deviceName'] !~ /sda1/ # because i don't want the root
device.
Post by David Kerr
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 })
Post by David Kerr
end
}
server = $ec2.servers.create(
:image_id => 'ami-xxxxxxx',
:flavor_id => 'm1.large',
:ebs_optimized => 'true',
[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?
Post by David Kerr
Thanks
--
You received this message because you are subscribed to the Google
Groups "ruby-fog" group.
Post by David Kerr
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/groups/opt_out.
--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Loading...