how can I use openstack-heat template create instance by snapshot

asked 2015-10-16 04:33:32 -0500

Mafer_Jun gravatar image

I have create a snapshot in project.But it keep response "snapshot is not found", here is my template:

resources:
  iis:
    type: OS::Nova::Server
    properties:
      flavor: { get_param: instance_type }
      block_device_mapping: [{ device_name: "vda", volume_id: { get_resource: volume1}, delete_on_termination : "false" }]
      key_name: { get_param: key_name }
      networks:
        - network: direct-net
      #snapshot_id: { get_param: sh_id }
      user_data: |
        #ps1_hello
        "hello" | Out-File -filepath C:\hello.txt

  volume1:
    type: OS::Cinder::Volume
    properties:
      name : "hongbao valume"
      #image : test_snapshot
      size  : 60
      snapshot_id: { get_param: sh_id}
edit retag flag offensive close merge delete

Comments

It's not quite clear, but you seem to confuse volume snapshots and server snapshots. A server snapshot is an image in Glance; to create a volume from it, use image_id, not snapshot_id. How did you create the snapshot sh_id?

Bernd Bausch gravatar imageBernd Bausch ( 2015-10-16 05:24:53 -0500 )edit