openstack创建实例测试步骤

source admin-openrc.sh
keystone user-create --name=demo --pass=123456
keystone tenant-create --name=demo --description="Demo Tenant"
keystone user-role-add --user=demo --role=_member_ --tenant=demo

source demo-openrc.sh
ssh-keygen
nova keypair-add --pub-key ~/.ssh/id_rsa.pub demo-key
neutron net-create demo-net
neutron subnet-create demo-net --name demo-subnet --gateway 192.168.1.1 192.168.1.0/24
neutron router-create demo-router
neutron router-interface-add demo-router demo-subnet
neutron net-list
+--------------------------------------+-----------+-----------------------------------------------------+
| id                                   | name      | subnets                                             |
+--------------------------------------+-----------+-----------------------------------------------------+
| fd39c0bb-f3f5-45dc-8f61-0b516114731f | demo-net  | fb8687e8-1d64-4ed1-afc3-955454090682 192.168.1.0/24 |
| f3376efe-2024-4fa8-9cd5-0c10f2174655 | net04_ext | b39c4183-fe7e-4c71-b934-539a469691f2                |
+--------------------------------------+-----------+-----------------------------------------------------+
neutron router-gateway-set demo-router net04_ext
nova boot --flavor m1.tiny --image cirros-0.3.0-x86_64-disk --nic net-id=fd39c0bb-f3f5-45dc-8f61-0b516114731f --security-group default --key-name demo-key demo-instance1
nova list
+--------------------------------------+----------------+--------+------------+-------------+----------+
| ID                                   | Name           | Status | Task State | Power State | Networks |
+--------------------------------------+----------------+--------+------------+-------------+----------+
| 8423000d-56be-41ff-8a5b-bcf5c5472cf6 | demo-instance1 | BUILD  | spawning   | NOSTATE     |          |
+--------------------------------------+----------------+--------+------------+-------------+----------+

nova show 8423000d-56be-41ff-8a5b-bcf5c5472cf6
+--------------------------------------+-----------------------------------------------------------------+
| Property                             | Value                                                           |
+--------------------------------------+-----------------------------------------------------------------+
| OS-DCF:diskConfig                    | MANUAL                                                          |
| OS-EXT-AZ:availability_zone          | nova                                                            |
| OS-EXT-STS:power_state               | 1                                                               |
| OS-EXT-STS:task_state                | -                                                               |
| OS-EXT-STS:vm_state                  | active                                                          |
| OS-SRV-USG:launched_at               | 2015-12-30T09:57:16.000000                                      |
| OS-SRV-USG:terminated_at             | -                                                               |
| accessIPv4                           |                                                                 |
| accessIPv6                           |                                                                 |
| config_drive                         |                                                                 |
| created                              | 2015-12-30T09:56:01Z                                            |
| demo-net network                     | 192.168.1.2                                                     |
| flavor                               | m1.tiny (1)                                                     |
| hostId                               | 8bfc62fe3673abca838ee2a0f1eab68b771c1469709a7408c4ff98dd        |
| id                                   | 8423000d-56be-41ff-8a5b-bcf5c5472cf6                            |
| image                                | cirros-0.3.0-x86_64-disk (bafeb4c4-781a-49f7-8c9d-9b9db7604db1) |
| key_name                             | demo-key                                                        |
| metadata                             | {}                                                              |
| name                                 | demo-instance1                                                  |
| os-extended-volumes:volumes_attached | []                                                              |
| progress                             | 0                                                               |
| security_groups                      | default                                                         |
| status                               | ACTIVE                                                          |
| tenant_id                            | e234241403d744dfba9ce21f6371fc0e                                |
| updated                              | 2015-12-30T09:57:17Z                                            |
| user_id                              | db35fe5dcc3049dd9c297a6d37ff5b0d                                |
+--------------------------------------+-----------------------------------------------------------------+

nova get-vnc-console demo-instance1 novnc
+-------+----------------------------------------------------------------------------------+
| Type  | Url                                                                              |
+-------+----------------------------------------------------------------------------------+
| novnc | http://168.1.22.30:6080/vnc_auto.html?token=ba5ee3f7-56d2-4113-8b66-b356201dbef6 |
+-------+----------------------------------------------------------------------------------+

ping 192.168.1.1

ping 218.85.157.99

时间: 2024-11-13 03:48:44

openstack创建实例测试步骤的相关文章

简单使用OpenStack创建实例

在搭建好的OpenStack环境,创建虚拟机. 登录OpenStack login-openstack.png 根据自己的账号信息登录. 登录进去之后,查看网络是这样子的. main-network.png 由于IP 有限,不能够给到用户直接将多个VM 挂载在该网络上,得由用户自行创建子网,创建路由,然后通过申请Floating IP来访问内网创建的VM. 创建子网 Network -- > Network Topology -- > Create Network create-subnet.

openstack创建虚拟机的步骤

图片来自互联网. 虚拟机启动过程如下: 1.界面或命令行通过RESTful API向keystone获取认证信息.2.keystone通过用户请求认证信息,并生成auth-token返回给对应的认证请求.3.界面或命令行通过RESTful API向nova-api发送一个boot instance的请求(携带auth-token).4.nova-api接受请求后向keystone发送认证请求,查看token是否为有效用户和token.5.keystone验证token是否有效,如有效则返回有效的

OpenStack创建实例错误解决方法

实例执行所请求操作失败,实例处于错误状态.: 请稍后再试 [错误: Build of instance beaeb5e0-26eb-4044-ae14-bb87d509886d aborted: Failed to allocate the network(s), not rescheduling.]. 解决办法: 修改/etc/nova/nova.conf文件 #Fail instance boot if vif plugging fails vif_plugging_is_fatal = F

openstack 创建实例报错 **aborted: Failed to allocate the network(s), not rescheduling

消息 Build of instance 6320b5f2-edc2-4e8e-b07c-0047f7ed8f6a aborted: Failed to allocate the network(s), not rescheduling. 编码 500 详情 Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2143, in _

从ISO创建实例、实例生成快照,创建镜像(基于openstack kilo平台、KVM虚拟化)

ISO创建实例从ISO创建实例有两个关键配置:云主机类型flavor和ISO镜像参数.云主机类型:openstack使用ISO镜像创建虚拟机实例时,会将选择的云主机类型flavor中的根磁盘(Disk)设置为cdrom,作为ISO的启动的光驱设备,用于OS的安装源:临时磁盘(OS-FLV-EXT-DATA:ephemeral)作为虚拟机实例的系统盘,作为安装目标.因此在配置用于ISO启动的云主机类型flavor时,需要设置根磁盘(disk)值,可以略大约ISO镜像文件,5G/10G均可,可根据现

Openstack liberty 创建实例快照源码分析1

Openstack liberty中也支持对云主机执行快照,快照是备份系统中一种常用的数据保护技术,在生产系统故障后,能通过快照将系统快速恢复到快照时间点:那Openstack中的云主机快照是否也支持这种故障恢复呢?请看下文: Openstack支持对处于运行或者停止状态的云主机执行快照,另外Openstack既可以从镜像启动云主机,也可以从启动磁盘启动云主机,根据条件组合,可以执行下面4中快照: 镜像启动云主机的离线快照 镜像启动云主机的在线快照 磁盘启动云主机的离线快照 磁盘启动云主机的在线

Ubuntu搭建Openstack平台(kilo)(六.实例化网络,创建实例)

实例化网络 参考文档:http://www.aboutyun.com/thread-13187-1-1.html http://www.aboutyun.com/thread-14639-1-1.html http://docs.openstack.org/mitaka/install-guide-ubuntu/launch-instance.html#create-virtual-networks 一.创建外部网络 加载环境 source admin-openrc.sh 创建网络 neutro

添加Sql作业,新建步骤出现:从IClassFactory为CLSID为{AA40D1D6-CAEF-4A56-B9BB-D0D3DC976BA2}的COM组件创建实例失败

从ICassFactory为CLSID为{17BCA6E8-A950-497E-B2F9-AF6AA475916F}的COM组件创建实例失败,原因是出现以下错误:c001f011.(Microsoft.Server.manageDTS). 在"新建维护计划"时,报错: 创建维护计划失败. 其他信息: 从 ICLassFactory 为CLSID为{17BCA6E8-A95D-497E-B2F9-AF6AA475916F}的COM组件创建实例失败,原因是出现以后错误: c001f011.

转:使用五个安全测试步骤来保护你的应用程序

你可以不必找一个黑客或者解密高手来测试你程序的安全性,也不需要购买一大堆昂贵的黑客工具.但是,你必须有一套处理过程来发现潜在的问题.如果遵从我下面详细介绍的五个处理步骤,你就可以轻松发现一般的开发缺陷.而且一旦发现了这些缺陷,就可以减轻或消除他们. 步骤一:端口扫描 你需要做的第一件事是在客户端和服务器端进行一次端口扫描,找出那些打开但并不需要的通讯端口.各种服务如FTP.NetBIOS.echo.gotd等使用的端口是引起安全问题的典型因素.对于TCP和UDP端口来说,根据经验通常的做法是:关