Vous êtes sur la page 1sur 15

login as: root

root@104.239.166.112's password:
Welcome to Ubuntu 14.04.4 LTS (GNU/Linux 3.13.0-88-generic x86_64)
* Documentation: https://help.ubuntu.com/
Last login: Fri Jul 22 16:11:45 2016 from c-69-242-132-73.hsd1.mo.comcast.net
root@ubuntu-openstack-liberty22072016-235702:~# vi demo.sh
root@ubuntu-openstack-liberty22072016-235702:~#
root@ubuntu-openstack-liberty22072016-235702:~#
root@ubuntu-openstack-liberty22072016-235702:~# source demo.sh
Please enter your OpenStack Password:
root@ubuntu-openstack-liberty22072016-235702:~#
root@ubuntu-openstack-liberty22072016-235702:~#
root@ubuntu-openstack-liberty22072016-235702:~#
root@ubuntu-openstack-liberty22072016-235702:~# openstack project list
+----------------------------------+--------------------+
| ID
| Name
|
+----------------------------------+--------------------+
| 17b6d29f440d4629aca0a7f67114ef36 | demo
|
| 75dcd08153814e3fad54a81f644eb55b | alt_demo
|
| 7fb93e0bd8f14fa59017060b5c5c926b | swifttenanttest2 |
| 8e28b66195014a768ecd2aa7a438aa92 | invisible_to_admin |
| a8d0f64b0bc240eead25d9c290bce405 | service
|
| c1a806ce826d4dc9aa32c7a1c7127a12 | swifttenanttest1 |
| f29e56b0cae845c79fe8ba551b0ec2da | admin
|
+----------------------------------+--------------------+
root@ubuntu-openstack-liberty22072016-235702:~#
root@ubuntu-openstack-liberty22072016-235702:~#
root@ubuntu-openstack-liberty22072016-235702:~# nova list
+----+------+--------+------------+-------------+----------+
| ID | Name | Status | Task State | Power State | Networks |
+----+------+--------+------------+-------------+----------+
+----+------+--------+------------+-------------+----------+
root@ubuntu-openstack-liberty22072016-235702:~#
root@ubuntu-openstack-liberty22072016-235702:~#
root@ubuntu-openstack-liberty22072016-235702:~#
root@ubuntu-openstack-liberty22072016-235702:~#
root@ubuntu-openstack-liberty22072016-235702:~# nova create
usage: nova [--version] [--debug] [--os-cache] [--timings]
[--os-auth-token OS_AUTH_TOKEN]
[--os-tenant-name <auth-tenant-name>]
[--os-tenant-id <auth-tenant-id>] [--os-region-name <region-name>]
[--os-auth-system <auth-system>] [--service-type <service-type>]
[--service-name <service-name>]
[--volume-service-name <volume-service-name>]
[--os-endpoint-type <endpoint-type>]
[--os-compute-api-version <compute-api-ver>]
[--bypass-url <bypass-url>] [--insecure]
[--os-cacert <ca-certificate>] [--os-cert <certificate>]
[--os-key <key>] [--timeout <seconds>] [--os-auth-url OS_AUTH_URL]
[--os-domain-id OS_DOMAIN_ID] [--os-domain-name OS_DOMAIN_NAME]
[--os-project-id OS_PROJECT_ID]
[--os-project-name OS_PROJECT_NAME]
[--os-project-domain-id OS_PROJECT_DOMAIN_ID]
[--os-project-domain-name OS_PROJECT_DOMAIN_NAME]
[--os-trust-id OS_TRUST_ID] [--os-user-id OS_USER_ID]
[--os-user-name OS_USERNAME]
[--os-user-domain-id OS_USER_DOMAIN_ID]
[--os-user-domain-name OS_USER_DOMAIN_NAME]
[--os-password OS_PASSWORD]

<subcommand> ...
error: argument <subcommand>: invalid choice: u'create'
Try 'nova help ' for more information.
root@ubuntu-openstack-liberty22072016-235702:~# nova help boot
usage: nova boot [--flavor <flavor>] [--image <image>]
[--image-with <key=value>] [--boot-volume <volume_id>]
[--snapshot <snapshot_id>] [--min-count <number>]
[--max-count <number>] [--meta <key=value>]
[--file <dst-path=src-path>] [--key-name <key-name>]
[--user-data <user-data>]
[--availability-zone <availability-zone>]
[--security-groups <security-groups>]
[--block-device-mapping <dev-name=mapping>]
[--block-device key1=value1[,key2=value2...]]
[--swap <swap_size>]
[--ephemeral size=<size>[,format=<format>]]
[--hint <key=value>]
[--nic <net-id=net-uuid,v4-fixed-ip=ip-addr,v6-fixed-ip=ip-addr
,port-id=port-uuid>]
[--config-drive <value>] [--poll] [--admin-pass <value>]
<name>
Boot a new server.
Positional arguments:
<name>
Optional arguments:
--flavor <flavor>
--image <image>
--image-with <key=value>

Name for the new server.

Name or ID of flavor (see 'nova flavor-list').


Name or ID of image (see 'nova image-list').
Image metadata property (see 'nova imageshow').
--boot-volume <volume_id>
Volume ID to boot from.
--snapshot <snapshot_id>
Snapshot ID to boot from (will create a
volume).
--min-count <number>
Boot at least <number> servers (limited by
quota).
--max-count <number>
Boot up to <number> servers (limited by
quota).
--meta <key=value>
Record arbitrary key/value metadata to
/meta_data.json on the metadata server. Can be
specified multiple times.
--file <dst-path=src-path>
Store arbitrary files from <src-path> locally
to <dst-path> on the new server. Limited by
the injected_files quota value.
--key-name <key-name>
Key name of keypair that should be created
earlier with the command keypair-add.
--user-data <user-data>
user data file to pass to be exposed by the
metadata server.
--availability-zone <availability-zone>
The availability zone for server placement.
--security-groups <security-groups>
Comma separated list of security group names.
--block-device-mapping <dev-name=mapping>
Block device mapping in the format <devname>=<id>:<type>:<size(GB)>:<delete-onterminate>.
--block-device key1=value1[,key2=value2...]
Block device mapping with the keys: id=UUID
(image_id, snapshot_id or volume_id only if

using source image, snapshot or volume)


source=source type (image, snapshot, volume or
blank), dest=destination type of the block
device (volume or local), bus=device's bus
(e.g. uml, lxc, virtio, ...; if omitted,
hypervisor driver chooses a suitable default,
honoured only if device type is supplied)
type=device type (e.g. disk, cdrom, ...;
defaults to 'disk') device=name of the device
(e.g. vda, xda, ...; if omitted, hypervisor
driver chooses suitable device depending on
selected bus), size=size of the block device
in MB(for swap) and in GB(for other formats)
(if omitted, hypervisor driver calculates
size), format=device will be formatted (e.g.
swap, ntfs, ...; optional), bootindex=integer
used for ordering the boot disks (for image
backed instances it is equal to 0, for others
need to be specified) and shutdown=shutdown
behaviour (either preserve or remove, for
local destination set to remove).
--swap <swap_size>
Create and attach a local swap block device of
<swap_size> MB.
--ephemeral size=<size>[,format=<format>]
Create and attach a local ephemeral block
device of <size> GB and format it to <format>.
--hint <key=value>
Send arbitrary key/value pairs to the
scheduler for custom use.
--nic <net-id=net-uuid,v4-fixed-ip=ip-addr,v6-fixed-ip=ip-addr,port-id=port-uu
id>
Create a NIC on the server. Specify option
multiple times to create multiple NICs. netid: attach NIC to network with this UUID
(either port-id or net-id must be provided),
v4-fixed-ip: IPv4 fixed address for NIC
(optional), v6-fixed-ip: IPv6 fixed address
for NIC (optional), port-id: attach NIC to
port with this UUID (either port-id or net-id
must be provided).
--config-drive <value>
Enable config drive.
--poll
Report the new server boot progress until it
completes.
--admin-pass <value>
Admin password for the instance.
root@ubuntu-openstack-liberty22072016-235702:~# nova boot
usage: nova boot [--flavor <flavor>] [--image <image>]
[--image-with <key=value>] [--boot-volume <volume_id>]
[--snapshot <snapshot_id>] [--min-count <number>]
[--max-count <number>] [--meta <key=value>]
[--file <dst-path=src-path>] [--key-name <key-name>]
[--user-data <user-data>]
[--availability-zone <availability-zone>]
[--security-groups <security-groups>]
[--block-device-mapping <dev-name=mapping>]
[--block-device key1=value1[,key2=value2...]]
[--swap <swap_size>]
[--ephemeral size=<size>[,format=<format>]]
[--hint <key=value>]
[--nic <net-id=net-uuid,v4-fixed-ip=ip-addr,v6-fixed-ip=ip-addr
,port-id=port-uuid>]
[--config-drive <value>] [--poll] [--admin-pass <value>]

<name>
error: too few arguments
Try 'nova help boot' for more information.
root@ubuntu-openstack-liberty22072016-235702:~# nova flavor list
usage: nova [--version] [--debug] [--os-cache] [--timings]
[--os-auth-token OS_AUTH_TOKEN]
[--os-tenant-name <auth-tenant-name>]
[--os-tenant-id <auth-tenant-id>] [--os-region-name <region-name>]
[--os-auth-system <auth-system>] [--service-type <service-type>]
[--service-name <service-name>]
[--volume-service-name <volume-service-name>]
[--os-endpoint-type <endpoint-type>]
[--os-compute-api-version <compute-api-ver>]
[--bypass-url <bypass-url>] [--insecure]
[--os-cacert <ca-certificate>] [--os-cert <certificate>]
[--os-key <key>] [--timeout <seconds>] [--os-auth-url OS_AUTH_URL]
[--os-domain-id OS_DOMAIN_ID] [--os-domain-name OS_DOMAIN_NAME]
[--os-project-id OS_PROJECT_ID]
[--os-project-name OS_PROJECT_NAME]
[--os-project-domain-id OS_PROJECT_DOMAIN_ID]
[--os-project-domain-name OS_PROJECT_DOMAIN_NAME]
[--os-trust-id OS_TRUST_ID] [--os-user-id OS_USER_ID]
[--os-user-name OS_USERNAME]
[--os-user-domain-id OS_USER_DOMAIN_ID]
[--os-user-domain-name OS_USER_DOMAIN_NAME]
[--os-password OS_PASSWORD]
<subcommand> ...
error: argument <subcommand>: invalid choice: u'flavor'
Try 'nova help ' for more information.
root@ubuntu-openstack-liberty22072016-235702:~# nova flavor-list
+-----+-----------+-----------+------+-----------+------+-------+-------------+----------+
| ID | Name
| Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor |
Is_Public |
+-----+-----------+-----------+------+-----------+------+-------+-------------+----------+
| 1 | m1.tiny | 512
| 1
| 0
|
| 1
| 1.0
|
True
|
| 2 | m1.small | 2048
| 20 | 0
|
| 1
| 1.0
|
True
|
| 3 | m1.medium | 4096
| 40 | 0
|
| 2
| 1.0
|
True
|
| 4 | m1.large | 8192
| 80 | 0
|
| 4
| 1.0
|
True
|
| 42 | m1.nano | 64
| 0
| 0
|
| 1
| 1.0
|
True
|
| 451 | m1.heat | 512
| 0
| 0
|
| 1
| 1.0
|
True
|
| 5 | m1.xlarge | 16384
| 160 | 0
|
| 8
| 1.0
|
True
|
| 84 | m1.micro | 128
| 0
| 0
|
| 1
| 1.0
|
True
|
+-----+-----------+-----------+------+-----------+------+-------+-------------+----------+
root@ubuntu-openstack-liberty22072016-235702:~# cglance image list
No command 'cglance' found, did you mean:
Command 'glance' from package 'python-glanceclient' (main)
cglance: command not found
root@ubuntu-openstack-liberty22072016-235702:~# glance image list
usage: glance [--version] [-d] [-v] [--get-schema] [--no-ssl-compression] [-f]

[--os-image-url OS_IMAGE_URL]
[--os-image-api-version OS_IMAGE_API_VERSION]
[--profile HMAC_KEY] [--insecure] [--os-cacert <ca-certificate>]
[--os-cert <certificate>] [--os-key <key>] [--timeout <seconds>]
[--os-auth-url OS_AUTH_URL] [--os-domain-id OS_DOMAIN_ID]
[--os-domain-name OS_DOMAIN_NAME]
[--os-project-id OS_PROJECT_ID]
[--os-project-name OS_PROJECT_NAME]
[--os-project-domain-id OS_PROJECT_DOMAIN_ID]
[--os-project-domain-name OS_PROJECT_DOMAIN_NAME]
[--os-trust-id OS_TRUST_ID] [--os-user-id OS_USER_ID]
[--os-user-name OS_USERNAME]
[--os-user-domain-id OS_USER_DOMAIN_ID]
[--os-user-domain-name OS_USER_DOMAIN_NAME]
[--os-password OS_PASSWORD] [--key-file OS_KEY]
[--ca-file OS_CACERT] [--cert-file OS_CERT]
[--os-tenant-id OS_TENANT_ID] [--os-tenant-name OS_TENANT_NAME]
[--os-region-name OS_REGION_NAME]
[--os-auth-token OS_AUTH_TOKEN]
[--os-service-type OS_SERVICE_TYPE]
[--os-endpoint-type OS_ENDPOINT_TYPE]
<subcommand> ...
glance: error: argument <subcommand>: invalid choice: u'image' (choose from 'exp
lain', 'image-create', 'image-deactivate', 'image-delete', 'image-download', 'im
age-list', 'image-reactivate', 'image-show', 'image-tag-delete', 'image-tag-upda
te', 'image-update', 'image-upload', 'location-add', 'location-delete', 'locatio
n-update', 'md-namespace-create', 'md-namespace-delete', 'md-namespace-import',
'md-namespace-list', 'md-namespace-objects-delete', 'md-namespace-properties-del
ete', 'md-namespace-resource-type-list', 'md-namespace-show', 'md-namespace-tags
-delete', 'md-namespace-update', 'md-object-create', 'md-object-delete', 'md-obj
ect-list', 'md-object-property-show', 'md-object-show', 'md-object-update', 'mdproperty-create', 'md-property-delete', 'md-property-list', 'md-property-show',
'md-property-update', 'md-resource-type-associate', 'md-resource-type-deassociat
e', 'md-resource-type-list', 'md-tag-create', 'md-tag-create-multiple', 'md-tagdelete', 'md-tag-list', 'md-tag-show', 'md-tag-update', 'member-create', 'member
-delete', 'member-list', 'member-update', 'task-create', 'task-list', 'task-show
', 'bash-completion', 'help', 'bash_completion')
root@ubuntu-openstack-liberty22072016-235702:~# glance image-list
+--------------------------------------+---------------------------------+
| ID
| Name
|
+--------------------------------------+---------------------------------+
| 7b924768-ee4c-472e-bc94-6740f957a422 | cirros-0.3.4-x86_64-uec
|
| 035ecf14-2e51-4819-98a1-b45e5dce5eb6 | cirros-0.3.4-x86_64-uec-kernel |
| 6fc94065-2467-4a33-8fb6-980bb6f04b5b | cirros-0.3.4-x86_64-uec-ramdisk |
+--------------------------------------+---------------------------------+
root@ubuntu-openstack-liberty22072016-235702:~#
root@ubuntu-openstack-liberty22072016-235702:~# nova -help|grep key
usage: nova [--version] [--debug] [--os-cache] [--timings]
[--os-auth-token OS_AUTH_TOKEN]
[--os-tenant-name <auth-tenant-name>]
[--os-tenant-id <auth-tenant-id>] [--os-region-name <region-name>]
[--os-auth-system <auth-system>] [--service-type <service-type>]
[--service-name <service-name>]
[--volume-service-name <volume-service-name>]
[--os-endpoint-type <endpoint-type>]
[--os-compute-api-version <compute-api-ver>]
[--bypass-url <bypass-url>] [--insecure]
[--os-cacert <ca-certificate>] [--os-cert <certificate>]
[--os-key <key>] [--timeout <seconds>] [--os-auth-url OS_AUTH_URL]
[--os-domain-id OS_DOMAIN_ID] [--os-domain-name OS_DOMAIN_NAME]

[--os-project-id OS_PROJECT_ID]
[--os-project-name OS_PROJECT_NAME]
[--os-project-domain-id OS_PROJECT_DOMAIN_ID]
[--os-project-domain-name OS_PROJECT_DOMAIN_NAME]
[--os-trust-id OS_TRUST_ID] [--os-user-id OS_USER_ID]
[--os-user-name OS_USERNAME]
[--os-user-domain-id OS_USER_DOMAIN_ID]
[--os-user-domain-name OS_USER_DOMAIN_NAME]
[--os-password OS_PASSWORD]
error: argument -h/--help: ignored explicit argument u'elp'
Try 'nova help ' for more information.
root@ubuntu-openstack-liberty22072016-235702:~# nova help|grep key
[--os-key <key>] [--timeout <seconds>] [--os-auth-url OS_AUTH_URL]
flavor-key
Set or unset extra_spec for a flavor.
keypair-add
Create a new key pair for use with servers.
keypair-delete
Delete keypair given by its name.
keypair-list
Print a list of keypairs for a user
keypair-show
Show details about the given keypair.
--os-key <key>
Defaults to env[OS_KEY].
root@ubuntu-openstack-liberty22072016-235702:~# nova keypair-list
+------+------+-------------+
| Name | Type | Fingerprint |
+------+------+-------------+
+------+------+-------------+
root@ubuntu-openstack-liberty22072016-235702:~#
root@ubuntu-openstack-liberty22072016-235702:~#
root@ubuntu-openstack-liberty22072016-235702:~# nova boot
usage: nova boot [--flavor <flavor>] [--image <image>]
[--image-with <key=value>] [--boot-volume <volume_id>]
[--snapshot <snapshot_id>] [--min-count <number>]
[--max-count <number>] [--meta <key=value>]
[--file <dst-path=src-path>] [--key-name <key-name>]
[--user-data <user-data>]
[--availability-zone <availability-zone>]
[--security-groups <security-groups>]
[--block-device-mapping <dev-name=mapping>]
[--block-device key1=value1[,key2=value2...]]
[--swap <swap_size>]
[--ephemeral size=<size>[,format=<format>]]
[--hint <key=value>]
[--nic <net-id=net-uuid,v4-fixed-ip=ip-addr,v6-fixed-ip=ip-addr
,port-id=port-uuid>]
[--config-drive <value>] [--poll] [--admin-pass <value>]
<name>
error: too few arguments
Try 'nova help boot' for more information.
root@ubuntu-openstack-liberty22072016-235702:~# nova boot --flavor m1.tiny --ima
ge cirros-0.3.4-x86_64-uec testvm
+--------------------------------------+---------------------------------------------------------------+
| Property
| Value
|
+--------------------------------------+---------------------------------------------------------------+
| OS-DCF:diskConfig
| MANUAL
|
| OS-EXT-AZ:availability_zone
|
|
| OS-EXT-SRV-ATTR:host
| |

| OS-EXT-SRV-ATTR:hostname
|
| OS-EXT-SRV-ATTR:hypervisor_hostname
|
| OS-EXT-SRV-ATTR:instance_name
|
| OS-EXT-SRV-ATTR:kernel_id
|
| OS-EXT-SRV-ATTR:launch_index
|
| OS-EXT-SRV-ATTR:ramdisk_id
|
| OS-EXT-SRV-ATTR:reservation_id
|
| OS-EXT-SRV-ATTR:root_device_name
|
| OS-EXT-SRV-ATTR:user_data
|
| OS-EXT-STS:power_state
|
| OS-EXT-STS:task_state
|
| OS-EXT-STS:vm_state
|
| OS-SRV-USG:launched_at
|
| OS-SRV-USG:terminated_at
|
| accessIPv4
|
| accessIPv6
|
| adminPass
|
| config_drive
|
| created
|
| flavor
|
| hostId
|
| id
|
| image
472e-bc94-6740f957a422) |
| key_name
|
| metadata
|
| name
|
| os-extended-volumes:volumes_attached
|
| progress
|
| security_groups
|
| status
|

| testvm
| | instance-00000001
| 035ecf14-2e51-4819-98a1-b45e5dce5eb6
| 0
| 6fc94065-2467-4a33-8fb6-980bb6f04b5b
| r-0g7kbnpj
| | | 0
| scheduling
| building
| | |
|
| 92xHtueHNVji
|
| 2016-07-23T05:11:18Z
| m1.tiny (1)
|
| 4435e882-06ad-4164-9e86-a89f6e0d6049
| cirros-0.3.4-x86_64-uec (7b924768-ee4c| | {}
| testvm
| []
| 0
| default
| BUILD

| tenant_id

| 17b6d29f440d4629aca0a7f67114ef36
|

| updated

| 2016-07-23T05:11:18Z
|

| user_id

| 005ababa1c3246b186d4ff2075c024cc
|
+--------------------------------------+---------------------------------------------------------------+
root@ubuntu-openstack-liberty22072016-235702:~# nova list
+--------------------------------------+--------+--------+------------+------------+--------------------------------------------------------+
| ID
| Name | Status | Task State | Power St
ate | Networks
|
+--------------------------------------+--------+--------+------------+------------+--------------------------------------------------------+
| 4435e882-06ad-4164-9e86-a89f6e0d6049 | testvm | BUILD | spawning | NOSTATE
| private=10.0.0.3, fd98:3961:add0:0:f816:3eff:fe79:5afb |
+--------------------------------------+--------+--------+------------+------------+--------------------------------------------------------+
root@ubuntu-openstack-liberty22072016-235702:~# nova list
+--------------------------------------+--------+--------+------------+------------+--------------------------------------------------------+
| ID
| Name | Status | Task State | Power St
ate | Networks
|
+--------------------------------------+--------+--------+------------+------------+--------------------------------------------------------+
| 4435e882-06ad-4164-9e86-a89f6e0d6049 | testvm | ACTIVE | | Running
| private=10.0.0.3, fd98:3961:add0:0:f816:3eff:fe79:5afb |
+--------------------------------------+--------+--------+------------+------------+--------------------------------------------------------+
root@ubuntu-openstack-liberty22072016-235702:~# nova show testvm
+--------------------------------------+---------------------------------------------------------------+
| Property
| Value
|
+--------------------------------------+---------------------------------------------------------------+
| OS-DCF:diskConfig
| MANUAL
|
| OS-EXT-AZ:availability_zone
| nova
|
| OS-EXT-SRV-ATTR:host
| ubuntu-openstack-liberty22072016-235702
|
| OS-EXT-SRV-ATTR:hostname
| testvm
|
| OS-EXT-SRV-ATTR:hypervisor_hostname | ubuntu-openstack-liberty22072016-235702
|
| OS-EXT-SRV-ATTR:instance_name
| instance-00000001
|
| OS-EXT-SRV-ATTR:kernel_id
| 035ecf14-2e51-4819-98a1-b45e5dce5eb6
|
| OS-EXT-SRV-ATTR:launch_index
| 0
|
| OS-EXT-SRV-ATTR:ramdisk_id
| 6fc94065-2467-4a33-8fb6-980bb6f04b5b
|
| OS-EXT-SRV-ATTR:reservation_id
| r-0g7kbnpj
|
| OS-EXT-SRV-ATTR:root_device_name
| /dev/vda
|
| OS-EXT-SRV-ATTR:user_data
| -

|
| OS-EXT-STS:power_state

| 1
|

| OS-EXT-STS:task_state

| |

| OS-EXT-STS:vm_state

| active
|

| OS-SRV-USG:launched_at

| 2016-07-23T05:11:26.000000
|
| OS-SRV-USG:terminated_at
| |
| accessIPv4
|
|
| accessIPv6
|
|
| config_drive
| True
|
| created
| 2016-07-23T05:11:18Z
|
| flavor
| m1.tiny (1)
|
| hostId
| 257f5afd2c2377d46d87bd78c5f38e51a5a8d82
de23d822c5f9a79fa
|
| id
| 4435e882-06ad-4164-9e86-a89f6e0d6049
|
| image
| cirros-0.3.4-x86_64-uec (7b924768-ee4c472e-bc94-6740f957a422) |
| key_name
| |
| metadata
| {}
|
| name
| testvm
|
| os-extended-volumes:volumes_attached | []
|
| private network
| 10.0.0.3, fd98:3961:add0:0:f816:3eff:fe
79:5afb
|
| progress
| 0
|
| security_groups
| default
|
| status
| ACTIVE
|
| tenant_id
| 17b6d29f440d4629aca0a7f67114ef36
|
| updated
| 2016-07-23T05:11:26Z
|
| user_id
| 005ababa1c3246b186d4ff2075c024cc
|
+--------------------------------------+---------------------------------------------------------------+
root@ubuntu-openstack-liberty22072016-235702:~# nova pause testvm^C
root@ubuntu-openstack-liberty22072016-235702:~# nova list
n+--------------------------------------+--------+--------+------------+------------+--------------------------------------------------------+
| ID
| Name | Status | Task State | Power St
ate | Networks
|
+--------------------------------------+--------+--------+------------+------------+--------------------------------------------------------+
| 4435e882-06ad-4164-9e86-a89f6e0d6049 | testvm | ACTIVE | | Running

| private=10.0.0.3, fd98:3961:add0:0:f816:3eff:fe79:5afb |
+--------------------------------------+--------+--------+------------+------------+--------------------------------------------------------+
root@ubuntu-openstack-liberty22072016-235702:~# nova pause testvm
^[[Aroot@ubuntu-openstack-liberty22072016-235702:~# nova list
+--------------------------------------+--------+--------+------------+------------+--------------------------------------------------------+
| ID
| Name | Status | Task State | Power St
ate | Networks
|
+--------------------------------------+--------+--------+------------+------------+--------------------------------------------------------+
| 4435e882-06ad-4164-9e86-a89f6e0d6049 | testvm | PAUSED | | Paused
| private=10.0.0.3, fd98:3961:add0:0:f816:3eff:fe79:5afb |
+--------------------------------------+--------+--------+------------+------------+--------------------------------------------------------+
root@ubuntu-openstack-liberty22072016-235702:~# nova resume testvm
ERROR (Conflict): Cannot 'resume' instance 4435e882-06ad-4164-9e86-a89f6e0d6049
while it is in vm_state paused (HTTP 409) (Request-ID: req-a3861d86-4175-4e13-a0
42-79acd5f4c39e)
root@ubuntu-openstack-liberty22072016-235702:~# nova unpause testvm
root@ubuntu-openstack-liberty22072016-235702:~# nova list
+--------------------------------------+--------+--------+------------+------------+--------------------------------------------------------+
| ID
| Name | Status | Task State | Power St
ate | Networks
|
+--------------------------------------+--------+--------+------------+------------+--------------------------------------------------------+
| 4435e882-06ad-4164-9e86-a89f6e0d6049 | testvm | ACTIVE | | Running
| private=10.0.0.3, fd98:3961:add0:0:f816:3eff:fe79:5afb |
+--------------------------------------+--------+--------+------------+------------+--------------------------------------------------------+
root@ubuntu-openstack-liberty22072016-235702:~# nova suspend testvm
root@ubuntu-openstack-liberty22072016-235702:~# nova list
+--------------------------------------+--------+-----------+------------+------------+--------------------------------------------------------+
| ID
| Name | Status
| Task State | Power
State | Networks
|
+--------------------------------------+--------+-----------+------------+------------+--------------------------------------------------------+
| 4435e882-06ad-4164-9e86-a89f6e0d6049 | testvm | SUSPENDED | | Shutd
own
| private=10.0.0.3, fd98:3961:add0:0:f816:3eff:fe79:5afb |
+--------------------------------------+--------+-----------+------------+------------+--------------------------------------------------------+
root@ubuntu-openstack-liberty22072016-235702:~# nova resume testvm
root@ubuntu-openstack-liberty22072016-235702:~# nova list
+--------------------------------------+--------+--------+------------+------------+--------------------------------------------------------+
| ID
| Name | Status | Task State | Power St
ate | Networks
|
+--------------------------------------+--------+--------+------------+------------+--------------------------------------------------------+
| 4435e882-06ad-4164-9e86-a89f6e0d6049 | testvm | ACTIVE | | Running
| private=10.0.0.3, fd98:3961:add0:0:f816:3eff:fe79:5afb |
+--------------------------------------+--------+--------+------------+------------+--------------------------------------------------------+
root@ubuntu-openstack-liberty22072016-235702:~# nova stop testvm
Request to stop server testvm has been accepted.
root@ubuntu-openstack-liberty22072016-235702:~# nova list
+--------------------------------------+--------+---------+------------+------------+--------------------------------------------------------+

| ID
| Name | Status | Task State | Power S
tate | Networks
|
+--------------------------------------+--------+---------+------------+------------+--------------------------------------------------------+
| 4435e882-06ad-4164-9e86-a89f6e0d6049 | testvm | SHUTOFF | | Shutdow
n
| private=10.0.0.3, fd98:3961:add0:0:f816:3eff:fe79:5afb |
+--------------------------------------+--------+---------+------------+------------+--------------------------------------------------------+
root@ubuntu-openstack-liberty22072016-235702:~# nova resume testvm
ERROR (Conflict): Cannot 'resume' instance 4435e882-06ad-4164-9e86-a89f6e0d6049
while it is in vm_state stopped (HTTP 409) (Request-ID: req-dd742ed5-503b-4d75-8
8d9-ae2009b3acfe)
root@ubuntu-openstack-liberty22072016-235702:~# nova list
+--------------------------------------+--------+---------+------------+------------+--------------------------------------------------------+
| ID
| Name | Status | Task State | Power S
tate | Networks
|
+--------------------------------------+--------+---------+------------+------------+--------------------------------------------------------+
| 4435e882-06ad-4164-9e86-a89f6e0d6049 | testvm | SHUTOFF | | Shutdow
n
| private=10.0.0.3, fd98:3961:add0:0:f816:3eff:fe79:5afb |
+--------------------------------------+--------+---------+------------+------------+--------------------------------------------------------+
root@ubuntu-openstack-liberty22072016-235702:~# nova start testvm
Request to start server testvm has been accepted.
root@ubuntu-openstack-liberty22072016-235702:~# nova list
+--------------------------------------+--------+--------+------------+------------+--------------------------------------------------------+
| ID
| Name | Status | Task State | Power St
ate | Networks
|
+--------------------------------------+--------+--------+------------+------------+--------------------------------------------------------+
| 4435e882-06ad-4164-9e86-a89f6e0d6049 | testvm | ACTIVE | | Running
| private=10.0.0.3, fd98:3961:add0:0:f816:3eff:fe79:5afb |
+--------------------------------------+--------+--------+------------+------------+--------------------------------------------------------+
root@ubuntu-openstack-liberty22072016-235702:~# nova flavor list
usage: nova [--version] [--debug] [--os-cache] [--timings]
[--os-auth-token OS_AUTH_TOKEN]
[--os-tenant-name <auth-tenant-name>]
[--os-tenant-id <auth-tenant-id>] [--os-region-name <region-name>]
[--os-auth-system <auth-system>] [--service-type <service-type>]
[--service-name <service-name>]
[--volume-service-name <volume-service-name>]
[--os-endpoint-type <endpoint-type>]
[--os-compute-api-version <compute-api-ver>]
[--bypass-url <bypass-url>] [--insecure]
[--os-cacert <ca-certificate>] [--os-cert <certificate>]
[--os-key <key>] [--timeout <seconds>] [--os-auth-url OS_AUTH_URL]
[--os-domain-id OS_DOMAIN_ID] [--os-domain-name OS_DOMAIN_NAME]
[--os-project-id OS_PROJECT_ID]
[--os-project-name OS_PROJECT_NAME]
[--os-project-domain-id OS_PROJECT_DOMAIN_ID]
[--os-project-domain-name OS_PROJECT_DOMAIN_NAME]
[--os-trust-id OS_TRUST_ID] [--os-user-id OS_USER_ID]
[--os-user-name OS_USERNAME]
[--os-user-domain-id OS_USER_DOMAIN_ID]
[--os-user-domain-name OS_USER_DOMAIN_NAME]
[--os-password OS_PASSWORD]
<subcommand> ...

error: argument <subcommand>: invalid choice: u'flavor'


Try 'nova help ' for more information.
root@ubuntu-openstack-liberty22072016-235702:~# nova flavor-list
+-----+-----------+-----------+------+-----------+------+-------+-------------+----------+
| ID | Name
| Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor |
Is_Public |
+-----+-----------+-----------+------+-----------+------+-------+-------------+----------+
| 1 | m1.tiny | 512
| 1
| 0
|
| 1
| 1.0
|
True
|
| 2 | m1.small | 2048
| 20 | 0
|
| 1
| 1.0
|
True
|
| 3 | m1.medium | 4096
| 40 | 0
|
| 2
| 1.0
|
True
|
| 4 | m1.large | 8192
| 80 | 0
|
| 4
| 1.0
|
True
|
| 42 | m1.nano | 64
| 0
| 0
|
| 1
| 1.0
|
True
|
| 451 | m1.heat | 512
| 0
| 0
|
| 1
| 1.0
|
True
|
| 5 | m1.xlarge | 16384
| 160 | 0
|
| 8
| 1.0
|
True
|
| 84 | m1.micro | 128
| 0
| 0
|
| 1
| 1.0
|
True
|
+-----+-----------+-----------+------+-----------+------+-------+-------------+----------+
root@ubuntu-openstack-liberty22072016-235702:~# nova list
+--------------------------------------+--------+--------+------------+------------+--------------------------------------------------------+
| ID
| Name | Status | Task State | Power St
ate | Networks
|
+--------------------------------------+--------+--------+------------+------------+--------------------------------------------------------+
| 4435e882-06ad-4164-9e86-a89f6e0d6049 | testvm | ACTIVE | | Running
| private=10.0.0.3, fd98:3961:add0:0:f816:3eff:fe79:5afb |
+--------------------------------------+--------+--------+------------+------------+--------------------------------------------------------+
root@ubuntu-openstack-liberty22072016-235702:~# nova show testvm
+--------------------------------------+---------------------------------------------------------------+
| Property
| Value
|
+--------------------------------------+---------------------------------------------------------------+
| OS-DCF:diskConfig
| MANUAL
|
| OS-EXT-AZ:availability_zone
| nova
|
| OS-EXT-SRV-ATTR:host
| ubuntu-openstack-liberty22072016-235702
|
| OS-EXT-SRV-ATTR:hostname
| testvm
|
| OS-EXT-SRV-ATTR:hypervisor_hostname | ubuntu-openstack-liberty22072016-235702
|
| OS-EXT-SRV-ATTR:instance_name
| instance-00000001
|
| OS-EXT-SRV-ATTR:kernel_id
| 035ecf14-2e51-4819-98a1-b45e5dce5eb6
|
| OS-EXT-SRV-ATTR:launch_index
| 0

|
| OS-EXT-SRV-ATTR:ramdisk_id
| 6fc94065-2467-4a33-8fb6-980bb6f04b5b
|
| OS-EXT-SRV-ATTR:reservation_id
| r-0g7kbnpj
|
| OS-EXT-SRV-ATTR:root_device_name
| /dev/vda
|
| OS-EXT-SRV-ATTR:user_data
| |
| OS-EXT-STS:power_state
| 1
|
| OS-EXT-STS:task_state
| |
| OS-EXT-STS:vm_state
| active
|
| OS-SRV-USG:launched_at
| 2016-07-23T05:11:26.000000
|
| OS-SRV-USG:terminated_at
| |
| accessIPv4
|
|
| accessIPv6
|
|
| config_drive
| True
|
| created
| 2016-07-23T05:11:18Z
|
| flavor
| m1.tiny (1)
|
| hostId
| 257f5afd2c2377d46d87bd78c5f38e51a5a8d82
de23d822c5f9a79fa
|
| id
| 4435e882-06ad-4164-9e86-a89f6e0d6049
|
| image
| cirros-0.3.4-x86_64-uec (7b924768-ee4c472e-bc94-6740f957a422) |
| key_name
| |
| metadata
| {}
|
| name
| testvm
|
| os-extended-volumes:volumes_attached | []
|
| private network
| 10.0.0.3, fd98:3961:add0:0:f816:3eff:fe
79:5afb
|
| progress
| 0
|
| security_groups
| default
|
| status
| ACTIVE
|
| tenant_id
| 17b6d29f440d4629aca0a7f67114ef36
|
| updated
| 2016-07-23T05:15:01Z
|
| user_id
| 005ababa1c3246b186d4ff2075c024cc
|
+--------------------------------------+---------------------------------------------------------------+
root@ubuntu-openstack-liberty22072016-235702:~# nova resize m1.small testvm

ERROR (CommandError): No server with a name or ID of 'm1.small' exists.


root@ubuntu-openstack-liberty22072016-235702:~# nova resize testvm m1.small
root@ubuntu-openstack-liberty22072016-235702:~# nova list
+--------------------------------------+--------+--------+---------------+------------+--------------------------------------------------------+
| ID
| Name | Status | Task State
| Power
State | Networks
|
+--------------------------------------+--------+--------+---------------+------------+--------------------------------------------------------+
| 4435e882-06ad-4164-9e86-a89f6e0d6049 | testvm | RESIZE | resize_finish | Runni
ng
| private=10.0.0.3, fd98:3961:add0:0:f816:3eff:fe79:5afb |
+--------------------------------------+--------+--------+---------------+------------+--------------------------------------------------------+
root@ubuntu-openstack-liberty22072016-235702:~# nova show testvm
+--------------------------------------+---------------------------------------------------------------+
| Property
| Value
|
+--------------------------------------+---------------------------------------------------------------+
| OS-DCF:diskConfig
| MANUAL
|
| OS-EXT-AZ:availability_zone
| nova
|
| OS-EXT-SRV-ATTR:host
| ubuntu-openstack-liberty22072016-235702
|
| OS-EXT-SRV-ATTR:hostname
| testvm
|
| OS-EXT-SRV-ATTR:hypervisor_hostname | ubuntu-openstack-liberty22072016-235702
|
| OS-EXT-SRV-ATTR:instance_name
| instance-00000001
|
| OS-EXT-SRV-ATTR:kernel_id
| 035ecf14-2e51-4819-98a1-b45e5dce5eb6
|
| OS-EXT-SRV-ATTR:launch_index
| 0
|
| OS-EXT-SRV-ATTR:ramdisk_id
| 6fc94065-2467-4a33-8fb6-980bb6f04b5b
|
| OS-EXT-SRV-ATTR:reservation_id
| r-0g7kbnpj
|
| OS-EXT-SRV-ATTR:root_device_name
| /dev/vda
|
| OS-EXT-SRV-ATTR:user_data
| |
| OS-EXT-STS:power_state
| 1
|
| OS-EXT-STS:task_state
| resize_finish
|
| OS-EXT-STS:vm_state
| active
|
| OS-SRV-USG:launched_at
| 2016-07-23T05:11:26.000000
|
| OS-SRV-USG:terminated_at
| |
| accessIPv4
|
|
| accessIPv6
|
|
| config_drive
| True
|

| created

| 2016-07-23T05:11:18Z
|

| flavor

| m1.small (2)
|

| hostId
de23d822c5f9a79fa
| id

| 257f5afd2c2377d46d87bd78c5f38e51a5a8d82
|
| 4435e882-06ad-4164-9e86-a89f6e0d6049
|

| image
| cirros-0.3.4-x86_64-uec (7b924768-ee4c472e-bc94-6740f957a422) |
| key_name
| |
| metadata
| {}
|
| name
| testvm
|
| os-extended-volumes:volumes_attached | []
|
| private network
| 10.0.0.3, fd98:3961:add0:0:f816:3eff:fe
79:5afb
|
| progress
| 0
|
| security_groups
| default
|
| status
| RESIZE
|
| tenant_id
| 17b6d29f440d4629aca0a7f67114ef36
|
| updated
| 2016-07-23T05:16:37Z
|
| user_id
| 005ababa1c3246b186d4ff2075c024cc
|
+--------------------------------------+---------------------------------------------------------------+
root@ubuntu-openstack-liberty22072016-235702:~# nova help|grep resize
resize
Resize a server.
resize-confirm
Confirm a previous resize.
resize-revert
Revert a previous resize (and return to the
root@ubuntu-openstack-liberty22072016-235702:~# nova resize-confirm testvm
root@ubuntu-openstack-liberty22072016-235702:~# nova list
+--------------------------------------+--------+--------+------------+------------+--------------------------------------------------------+
| ID
| Name | Status | Task State | Power St
ate | Networks
|
+--------------------------------------+--------+--------+------------+------------+--------------------------------------------------------+
| 4435e882-06ad-4164-9e86-a89f6e0d6049 | testvm | ACTIVE | | Running
| private=10.0.0.3, fd98:3961:add0:0:f816:3eff:fe79:5afb |
+--------------------------------------+--------+--------+------------+------------+--------------------------------------------------------+
root@ubuntu-openstack-liberty22072016-235702:~# nova delete testvm
Request to delete server testvm has been accepted.
root@ubuntu-openstack-liberty22072016-235702:~# nova list
+----+------+--------+------------+-------------+----------+
| ID | Name | Status | Task State | Power State | Networks |
+----+------+--------+------------+-------------+----------+
+----+------+--------+------------+-------------+----------+
root@ubuntu-openstack-liberty22072016-235702:~#

Vous aimerez peut-être aussi