Openstack commands
Nova:
- List of instances:
openstack server list
nova list
- Details on a specific instance:
openstack server show {UUID}<server id>
nova show {UUID}<server id>
- Rebuild an instance:
openstack server rebuild --image <IMAGE_IDimage id> <SERVER_IDserver id>
- Attach a port to an instance:
nova interface-attach --port-id <PORT_IDport id> <INSTANCE_UUIDinstance id>
- Create a 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}id> --flavor {<flavor list}id> --nic net-id={<network list}id>,v4-fixed-ip=10.1.2.182<ip-address> --security-group {<security group list}id> --key-name {<keypair list}name> 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:
openstack port create --network <network id> --fixed-ip subnet=<subnet id>,ip-address=<ip-address>
neutron port-create --fixed-ip subnet_id=<SubNetIDsubnet id>,ip_address=<X.X.X.X> <Neutron network IDid>
- Update port:
neutron port-update --fixed-ip subnet_id=<SubNetIDsubnet id>,ip_address=<X.X.X.X> --fixed-ip subnet_id=<SubNetIDsubnet id>,ip_address=<X.X.X.X> <PORT_IDport id>
- Get details on a port:
openstack port {PORT_UUID}<port id>
neutron port-show {PORT_UUID}<port id>
Glance:
- List images:
openstack image list
glance image-list
- Get details on an image:
glance image-show <UUID_OF_IMAGEimage id>
Other:
- List flavors
openstack flavor list
- List keypairs
openstack keypair list
- List Security groups
openstack security group list