Skip to main content

Openstack commands

 

Nova:
  • List of instances:
nova list
  • Details on a specific instance:
nova show <UUID_OF_INSTANCE>
  • 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>

 

Neutron:
  • List of subnets and network ID:
neutron net-list
  • List of subnets, their IDs and allocation pools:
neutron subnet-list
  • List ports:
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:
neutron port-show <PORT_UUID>

 

Glance:
  • List images:
glance image-list

or

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

-- 

neutron port-create --fixed-ip subnet_id=SUBNETID,ip_address=192.168.1.100 --name LAN-portname NET-ID

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