root@OpenstackIcehouse2:~# cat /etc/nova/nova-compute.conf
[DEFAULT]
compute_driver=libvirt.LibvirtDriver
[libvirt]
virt_type=qemu
libvirt_inject_partition=-1
inject_password=true

$ apt-get install libguestfs-tools
$ update-guestfs-appliance
$ libguestfs-test-tool

request:

{"server": {"name": "world", "imageRef": "6a1489cb-5905-4f97-ae8b-012770818213", "availability_zone": "nova", "key_name": "153key", "flavorRef": "2", "OS-DCF:diskConfig": "AUTO", "max_count": 1, "min_count": 1, "networks": [{"uuid": "a29561e9-2f32-4765-a0f8-306b870f780b"}], "security_groups": [{"name": "default"}]}}

http://docs.rackspace.com/servers/api/v2/cs-devguide/content/CreateServers.html

OS-DCF:diskConfig

The disk configuration value.

Valid values are:

  • AUTO: The server is built with a single partition the size of the target flavor disk. The file system is automatically adjusted to fit the entire partition. This keeps things simple and automated. AUTO is valid only for images and servers with a single partition that use the EXT3 file system. This is the default setting for applicable Rackspace base images.

  • MANUAL: The server is built using whatever partition scheme and file system is in the source image. If the target flavor disk is larger, the remaining disk space is left unpartitioned. This enables images to have non-EXT3 file systems, multiple partitions, and so on, and enables you to manage the disk configuration.

The result is :

root@OpenstackIcehouse2:~# ip netns exec qrouter-921c8583-b88f-40ba-8e15-0ae0c78e7296 ssh -i /root/153key.pem ubuntu@192.168.2.5
The authenticity of host '192.168.2.5 (192.168.2.5)' can't be established.
ECDSA key fingerprint is 12:2b:e6:b6:e7:10:03:be:f0:bc:96:d1:0e:d7:b2:31.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.2.5' (ECDSA) to the list of known hosts.
Welcome to Ubuntu 12.04.4 LTS (GNU/Linux 3.2.0-63-virtual x86_64)

* Documentation:  https://help.ubuntu.com/

  System information as of Sat May 31 22:51:08 UTC 2014

  System load:  0.28              Processes:           60
  Usage of /:   4.0% of 19.68GB   Users logged in:     0
  Memory usage: 3%                IP address for eth0: 192.168.2.5
  Swap usage:   0%

  Graph this data and manage this system at:
https://landscape.canonical.com/

  Get cloud support with Ubuntu Advantage Cloud Guest:
http://www.ubuntu.com/business/services/cloud

0 packages can be updated.
0 updates are security updates.

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

ubuntu@hello:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr fa:16:3e:46:3c:f0 
          inet addr:192.168.2.5  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::f816:3eff:fe46:3cf0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:289 errors:0 dropped:0 overruns:0 frame:0
          TX packets:283 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:31400 (31.4 KB)  TX bytes:28240 (28.2 KB)

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

ubuntu@hello:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        20G  801M   18G   5% /
udev            998M   12K  998M   1% /dev
tmpfs           201M  212K  201M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none           1002M     0 1002M   0% /run/shm
ubuntu@hello:~$ sudo su
sudo: unable to resolve host hello
root@hello:/home/ubuntu# cat /etc/sh
shadow  shells 
root@hello:/home/ubuntu# cat /etc/shadow
root:!*:16219:0:99999:7:::
daemon:*:16219:0:99999:7:::
bin:*:16219:0:99999:7:::
sys:*:16219:0:99999:7:::
sync:*:16219:0:99999:7:::
games:*:16219:0:99999:7:::
man:*:16219:0:99999:7:::
lp:*:16219:0:99999:7:::
mail:*:16219:0:99999:7:::
news:*:16219:0:99999:7:::
uucp:*:16219:0:99999:7:::
proxy:*:16219:0:99999:7:::
www-data:*:16219:0:99999:7:::
backup:*:16219:0:99999:7:::
list:*:16219:0:99999:7:::
irc:*:16219:0:99999:7:::
gnats:*:16219:0:99999:7:::
nobody:*:16219:0:99999:7:::
libuuid:!:16219:0:99999:7:::
syslog:*:16219:0:99999:7:::
messagebus:*:16219:0:99999:7:::
whoopsie:*:16219:0:99999:7:::
landscape:*:16219:0:99999:7:::
sshd:*:16219:0:99999:7:::
ubuntu:!$6$QAW37Ccn$Rdv7jduLjDggN8FnNQzFFNSaqbbSDryKRyJfRMcHpKb/1hVJb2v9FKamvI9zG6p46ue4E9jrBBnwvDLgQs0bl/:16219:0:99999:7:::

nova compute enable password injection and filesystem resize的更多相关文章

  1. nova虚拟机镜像从创建到文件系统resize完整流程

    1. 虚拟机镜像的创建和resize流程 nova创建虚拟机涉及的组件比较多,调用比较复杂,这里只列出跟虚拟机镜像创建相关的流程,方便理清虚拟机状态变化的整个流程. nova-api nova.api ...

  2. openstack-lanch an instance and nova compute log analysis

    1. how to launch an instance: [root@localhost ~(keystone_admin)]# nova flavor-list+----+-----------+ ...

  3. 1898 ERROR nova.compute.manager

    2018-06-10 21:03:54.045 1898 ERROR nova.compute.manager [instance: 15a6c26f-b8af-4a3e-a3df-8552c16e0 ...

  4. openstack私有云布署实践【11.2 计算nova - compute节点配置(办公网环境)】

    这里我只使用compute1节点配置为示例,其它节点的配置基本是一样的,只是声明的管理IP不同而已   计算节点 # yum install openstack-nova-compute sysfsu ...

  5. openstack私有云布署实践【11.1 计算nova - compute节点配置(科兴环境)】

    这里我只使用kxcompute1节点配置为示例,其它节点的配置基本是一样的,只是声明的管理IP不同而已   计算节点 # yum install openstack-nova-compute sysf ...

  6. openstack私有云布署实践【11.3 计算nova - compute节点-nova用户免密登录(用于云主机冷迁移+扩展云主机大小)】

    云主机迁移+扩展云主机大小 ,官方说它依赖nova用户之间的免密登录.确保每个resion区域的compute节点服务器他们可以相互SSH免密   compute1-7     他们相互SSH免密 k ...

  7. Openstack 03 - Nova Compute

    1.前言 非常早之前就開始着手写Openstack 系列的博客了,在写了总体架构和Keystone之后,准备写Nova,可是每次写到一半,自己心里就认为不踏实,由于似乎我并没有真正理解Nova,或者说 ...

  8. OpenStack 之 Nova Compute 的代码结构图

    nova-compute 的代码结构图 如上图所看到的, 类图中最重要的三个Category Manager: 核心的业务类.提供实际的业务操作.比如启动虚拟机等等. Service: 每一个serv ...

  9. Migrate Instance 操作详解 - 每天5分钟玩转 OpenStack(40)

    Migrate 操作的作用是将 instance 从当前的计算节点迁移到其他节点上. Migrate 不要求源和目标节点必须共享存储,当然共享存储也是可以的. Migrate 前必须满足一个条件:计算 ...

随机推荐

  1. 针对特定网站scrapy爬虫的性能优化

    在使用scrapy爬虫做性能优化时,一定要根据不同网站的特点来进行优化,不要使用一种固定的模式去爬取一个网站,这个是真理,以下是对58同城的爬取优化策略: 一.先来分析一下影响scrapy性能的set ...

  2. [Spring实战笔记]4面向切面编程的Spring-代理

    代理 代理(Proxy)是一种设计模式,可以在目标对象实现的基础上,扩展目标对象的功能. 代理对象是对目标对象的扩展,并会调用目标对象. 三种代理模式 静态代理 100% 代理对象与目标对象要实现相同 ...

  3. python3 电脑说话

    #coding:utf-8 import win32com.client spk = win32com.client.Dispatch("SAPI.SpVoice") spk.Sp ...

  4. 一篇文章说清楚mysql索引

    索引是什么? 索引是为了加速对表中数据行的检索而创建的一种分散的数据存储结构 为什么要使用索引? 索引能极大的减少数据存储引擎需要需要扫描的数据量: 索引能够把随机IO变为数序IO: 索引能够帮助我们 ...

  5. SQL Injection-Http请求的参数中对特殊字符的处理

    1.背景:最近学习webgoat到了SQL Injection的这一课,要完成这一课需要拦截Http请求,修改参数,不过在修改的参数中加入特殊字符才能完成.下面让我们一起来学习吧. 2.题目: 大致翻 ...

  6. 四、PyQt5布局管理(绝对&相对、水平、垂直、格栅、表单)

    目录 一.绝对布局 二.盒布局 三.格栅布局 四.格栅布局跨行跨列显示 布局管理即设置窗体上各个控件的位置,对于新手来说,这是学习的难点. 布局管理根据绝对坐标是否变动分为绝对布局和相对布局两大类.采 ...

  7. ELK日志系统使用说明

    数据探索 Elasticsearch具有强大的数据检索和分析同能,支持模糊.全文.过滤.管道等数据查询.对于日志型数据处理很有优势. 下图为KIbana的主页图,将逐步说明每一部分的功能: 依照图中的 ...

  8. EXCEL公式及宏

    VLOOKUP特别好用的一个用于映射的公式 1.需要根据ID找到对应的NAME 2.将可以用于映射的两列放到G,H列中(注意!用于检索的要放在相对的第一列中) 3.VLOOKUP(A2,G:H,2,F ...

  9. HDU4460

    #include <iostream> #include <queue> #include <vector> #include <cstring> #i ...

  10. Ubuntu16.04 安装Tensorflow1.7过程记录二:安装CUDA及Tensorflow

    参考 How to install Tensorflow 1.7.0 using official pip package 其中的CUDNN应该改为7.05for CUDA9.0 后面安装的spyde ...