nova boot

$ 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]
                 <name>

Boot a new server.

Positional arguments:
  <name>                        Name for the new server

Optional arguments:
  --flavor <flavor>             Name or ID of flavor (see ‘nova flavor-list‘).
  --image <image>               Name or ID of image (see ‘nova image-list‘).
  --image-with <key=value>      Image metadata property (see ‘nova image-
                                show‘).
  --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 <dev-
                                name>=<id>:<type>:<size(GB)>:<delete-on-
                                terminate>.
  --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-uuid>
                                Create a NIC on the server. Specify option
                                multiple times to create multiple NICs. net-
                                id: 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.

时间: 2024-10-28 15:33:09

nova boot的相关文章

nova boot from volume代码分析

OpenStack Liberty版本,这里简单记录下nova boot from volume的代码调用过程. nova boot from volume命令行 nova client novaclient/v2/shell.py   # novaclient端发起请求 def do_boot(cs, args):     """Boot a new server."""     boot_args, boot_kwargs = _boot(c

nova boot from volume无法注入密码的hack

前面有篇<nova boot from volume代码分析>http://iceyao.blog.51cto.com/9426658/1770927,今天这里看下针对nova boot from volume无法注入密码的简单hack. nova/virt/libvirt/driver.py中_inject_data函数部分代码 if any((key, net, metadata, admin_pass, files)):             injection_image = sel

使用nova boot命令创建openstack实例

使用命令:nova boot --flavor 1 --key_name mykey--image 9e5c2bee-0373-414c-b4af-b91b0246ad3b --security_group default cirrOS 其中: flavor是虚拟机的配置,比如说内存大小,硬盘大小等,默认下1为最小,4为最大. key_name是创建虚拟机使用的密钥,使用以下三条命令创建密钥: ssh-keygen cd.ssh nova keypair-add --pub_key id_rsa

nova boot代码流程分析(三):nova与neutron的交互(2)

继续<nova boot代码流程分析(三):nova与neutron的交互(1)>的分析. #/nova/virt/libvirt/driver.py:LibvirtDriver # NOTE(ilyaalekseyev): Implementation like in multinics # for xenapi(tr3buchet) def spawn(self, context, instance, image_meta, injected_files, admin_password,

nova boot代码流程分析(一):Claim机制

nova boot创建VM的流程大致为: 1. novaclient发送HTTP请求到nova-api(这里内部细节包括keystone对用户的验证及用户从keystone获取token和endpoints等信息,具体参考<keystone WSGI流程>). 2. nova-api通过rpc调用到nova-conductor. 3. nova-conductor调用rpc进入nova-scheduler进行compute节点的选择,nova-scheduler将compute节点选择的信息的

nova boot代码流程分析(五):VM启动从neutron-dhcp-agent获取IP与MAC

1.   network和subnet创建代码流程 [[email protected] ~(keystone_user1)]# neutron net-create demo-net [[email protected] ~(keystone_user1)]# neutron subnet-create  demo-net 1.1.1.0/24 --name demo-subnet --gateway 1.1.1.1 --enable_dhcp true 这里,我们主要分析上面两个命令的代码流

nova boot代码流程分析(二):nova-scheduler主机选择

本篇文章将分析nova-scheduler服务在创建VM时如何进行主机的选择.完整来说,nova-scheduler主机选择的过程主要分为以下几个阶段: 1. nova.scheduler.rpcapi.SchedulerAPI发出RPC请求到nova.scheduler.manager.SchedulerManager. 2. 从SchedulerManager到调度器(类SchedulerDriver). 3. 从SchedulerDriver到Filters. 4. 从Filters到权重

nova boot from volume在多主机zone下的坑

测试环境:3个计算节点,分别属于3个zone [[email protected] ~(keystone_admin)]# nova availability-zone-list +-----------------------+----------------------------------------+ | Name                  | Status                                 | +-----------------------+-

Nova: 虚机的块设备总结 [Nova Instance Block Device]

和物理机一样,虚拟机包括几个重要的部分:CPU.内存.磁盘设备.网络设备等.本文将简要总结虚机磁盘设备有关知识. 1. Nova boot CLI 中有关虚机块设备的几个参数 nova boot CLI 的完整参数如下: usage: nova boot [--flavor <flavor>] [--image <image>] //boot from image with id [--image-with <key=value>] //image metadata p