Skip to main content

Openstack commands

 

Nova:
  • List of instances:
openstack server list
nova list
  • Details on a specific instance:
openstack server show {UUID}
nova show <UUID_OF_INSTANCE>{UUID}
  • Rebuild an instance:
openstack server rebuild --image <IMAGE_ID> <SERVER_ID>
  • Attach a port to an instance:
nova interface-attach --port-id <PORT_ID> <INSTANCE_UUID>
  • Create a baremetal baremetal instance:
nova boot --availability-zone nova:metal01:SERVERID --flavor OAS2.2xE5-2650v4.64GB.2x480GB.SSD.10GbE --image IMG-ID --nic port-id=PORT-ID name-of-mechine
    Create a new VM
    openstack server create --image {image list} --flavor {flavor list} --nic net-id={network list},v4-fixed-ip=10.1.2.182 --security-group {security group list} --key-name {keypair list} vmname
    Neutron:
    • List of subnets and network ID:
    openstack network list
    neutron net-list
    • List of subnets, their IDs and allocation pools:
    openstack subnet list
    neutron subnet-list
    • List ports:
    openstack port list
    neutron port-list
    • Create port:
    neutron port-create --fixed-ip subnet_id=<SubNetID>,ip_address=<X.X.X.X> <Neutron network ID>
    • Update port:
    neutron port-update --fixed-ip subnet_id=<SubNetID>,ip_address=<X.X.X.X> --fixed-ip subnet_id=<SubNetID>,ip_address=<X.X.X.X> <PORT_ID>
    • Get details on a port:
    openstack port {PORT_UUID}
    neutron port-show <PORT_UUID>{PORT_UUID}

     

    Glance:
    • List images:
    glance image-list

    or

    openstack image list
    glance image-list
    • Get details on an image:
    glance image-show <UUID_OF_IMAGE>

     

    Other:
      List flavors
      openstack flavor list
        List keypairs
        openstack keypair list
          List Security groups
          openstack security group list