Openstack Reference Commands
Openstack Reference Commands
Identity (keystone)¶
List all users
Images (glance)¶
List images you can access
$ glance image-list
Update image
Compute (nova)¶
List instances, check status of instance
$ nova list
List images
List flavors
$ openstack flavor list
Boot an instance using flavor and image names (if names are unique)
Login to instance
# ip netns
# ip netns exec NETNS_NAME ssh USER@SERVER
# ip netns exec qdhcp-6021a3b4-8587-4f9c-8064-0103885dfba2 \
ssh [email protected]
Note
In CirrOS the password for user cirros is “cubswin:)” without the quotes.
Unpause
Suspend
Unsuspend
Stop
Start
Rescue
Rebuild
Reboot
To validate that the file was injected, use ssh to connect to the instance, and
look in /var/lib/cloud for the file.
Inject a keypair into an instance and access the instance with that keypair
Create keypair
Add rules to default security group allowing ping and SSH between instances in
the default security group
Networking (neutron)¶
Create network
Create a subnet
$ cinder list
Note
On the Xen Hypervisor it is possible to provide a specific device name instead of
automatic allocation. For example:
This is not currently possible when using non-Xen hypervisors with OpenStack.
# fdisk -l
# mkfs.ext3 /dev/vdb
Create a mountpoint
# mkdir /myspace
# touch /myspace/helloworld.txt
# ls /myspace
# umount /myspace
$ swift stat
$ swift stat ACCOUNT
$ swift stat CONTAINER
$ swift stat OBJECT
List containers
$ swift list