openstack nova常用命令

 

 

jumpbox: 9.41.160.56, root/test4pass

172.40.2.2, r2n2 (mysql, qpid, keystone, nova controller, nova compute)

172.40.2.3, r2n3 (nova compute)

172.40.2.4, r2n4 (cinder)

172.40.2.5, r2n5 (cinder)

 

List of instances on compute nodes:

OS

Server Name

Server IP

Instance Name

Compute Node

Flavor ID

RHEL

rhel01

10.10.0.9

instance-00000009

r2n2

101

WinXP

winxp01

10.10.0.6

instance-00000015

r2n2

101

Win7

win7-01

10.10.0.11

instance-00000016

r2n2

101

Win Server 2008

win2008-01

10.10.0.16

instance-00000017

r2n3

102

SLES

sles01

10.10.0.17

instance-00000014

r2n2

101

 (Win Server 2008 is for the provisioning of windows with sysprep)

 

Flavors of instances:

   # nova flavor-create d40-r4 101 4096 40 2

   (4G ram, 40G disk, 2 vcpus)

   # nova flavor-create d80-r4 102 4096 80 2

   (4G ram, 80G disk, 2 vcpus)

   # nova flavor-create d40-r2 103 2048 40 2

   (2G ram, 40G disk, 2 vcpus)

 

1.Provision VM Instance

(1) Windows

Windows XP

   # glance image-create --name winxp-x86.qcow2 --is-public true --disk-format qcow2 --container-format bare --file /root/images/qcow2/winxp-x86-sp3P.qcow2

   # nova boot winxp01 --image=winxp-x86.qcow2 --flavor=101

 

Windows 7

   # glance image-create --name win7-x64-eeN.qcow2 --is-public true --disk-format qcow2 --container-format bare --file /root/images/qcow2/win7-x64-eeN.qcow2

   # nova boot win7-01 --image=win7-x64-eeN.qcow2 --flavor=101

  

(2) Windows with sysprep

Windows Server 2008

    # glance image-create --name win2008r2.qcow2 --is-public true --disk-format qcow2 --container-format bare --file /root/images/qcow2/win2008r2.qcow2

    # nova boot win2008-01 --image=win2008r2.qcow2 --flavor=102

    Connect to the OS through VNC Viewer, set the language, accept the license, then it will get into the windows.

    Turn off the windows firewall.

 

(3) RHEL

   # glance image-create --name rhel63-64.qcow2 --is-public true --disk-format qcow2 --container-format bare --file /root/images/qcow2/rhel63-64.qcow2

   # nova boot rhel01 --image=rhel63-64.qcow2 --flavor=101

   # ssh root@<instance_ip> (passw0rd)

  

(4) SLES

   # glance image-create --name sles11sp1-x64.qcow2 --is-public true --disk-format qcow2 --container-format bare --file /root/images/qcow2/sles11sp1-x64.qcow2

   # nova boot sles01 –image=sles11sp1-x64.qcow2 --flavor=101

 

2.Deprovision VM Instance

    # nova volume-detach <server_id> <volume_id>

    # nova stop <server_id>

    # nova delete <server_name/server_id>

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值