您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 管理学资料 > openstack使用手册(v1.0)
目录其他环境虚拟机导入openstack..............................................................................................2hyper-v平台虚拟机导入...................................................................................................2Openstack虚拟机导出到其他环境.........................................................................................4在线迁移...............................................................................................................................4离线迁移...............................................................................................................................4Ceph速度调优............................................................................................................................5读写测试常用命令...............................................................................................................5硬件调优...............................................................................................................................5软件调优...............................................................................................................................6副本调优........................................................................................................................................7基于镜像类型调整...............................................................................................................7FuelOpenstack常用命令........................................................................................................7Fuel常用命令......................................................................................................................7Openstack常用命令.........................................................................................................7Ceph常用命令....................................................................................................................8常见问题及解答...........................................................................................................................8开机顺序...............................................................................................................................8上传镜像报错.......................................................................................................................9创建云主机报错...................................................................................................................9Instance无法获取IP地址................................................................................................9Failedtoconnecttoservercode1006....................................................................11无法限制租户cpu核心,内存等配额............................................错误!未定义书签。使用建议......................................................................................................................................14其他环境虚拟机导入openstackhyper-v平台虚拟机导入原理:VHD-KVMOPENSTACK一、实施说明如果有快照的话注意要将原来的虚拟机快照进行合并成一个vhd文件二、实施步骤跑hyperV的源机器叫H,跑kvm的目标机器叫做K1.在H上将要迁移的的hyperV虚拟机的静态IP改成自动获取,然后关机,将vhd硬盘通过scp或者其他方式拷贝到目标机器K上。2.获取virtio的windows驱动【该驱动主要用于windows的网卡和硬盘】cd/var/lib/libvirt/imagewget在目标机器K上进行映像格式转换,并建立一个新的磁盘文件【该磁盘文件主要用于windows通过识别新硬盘来安装新的virtio驱动,否则内置只有普通IDE驱动无法进行新的驱动安装】qemu-imgconvert-Oqcow2/root/hyperv.vhd/mnt/storage/kvm.qcow2#将vhd格式转换成qcow2格式qemu-imgcreate/mnt/storage/disk.img1G#建立一个新的磁盘4.使用virt-manager或virt-install进行镜像导入,并将驱动镜像放入cdrom建议使用virt-installvirt-install--namewin2012--ram512--os-type=windows--vcpus1--diskpath=/mnt/storage/kvm.qcow2,device=disk,bus=ide,format=qcow2--diskpath=/mnt/storage/disk.img,format=qcow2,bus=virtio--diskpath=/home/leom/Openstack/virtio-win-0.1.126.iso,device=cdrom--networkbridge=br0,model=virtio--graphicsvnc--noautoconsole--import--noreboot--debug–force5.启动虚拟机进入windows,通过cdrom的镜像安装网卡和硬盘驱动,装好后关闭虚拟机。6.通过virt-manager或者修改kvm虚拟机的/etc/libvirt/qemu/server.xml文件,将新建的磁盘删除,将原有的硬盘bus模式改成virtio,xml方式修改如下:disktype='block'device='disk'drivername='server'type='qcow'/sourcedev='/mnt/storage/kvm.qcow2'/targetdev='vda'bus='virtio'/addresstype='pci'domain='0x0000'bus='0x00'slot='0x04'function='0x0'//disk7.启动虚拟机进行ip的配置,验证IP连通性,完成迁移。Openstack虚拟机导出到其他环境在线迁移原理:利用vmwareconvert+vmwareworkstation,将openstack目的主机远程转换成vmdx文件,并导入vmworkstation虚拟机。1.下载并安装VMwareConverter5.5.02.在一台服务器上部署vmware10虚拟化环境3.关闭待迁移服务器上的业务服务(iis,sql,防火墙等)4.点击”convertmachine”,选择”powered-onmachine”,”Aremotemachine”,输入用户名密码5.选择”automaticallyuninstallthefileswhenimportsuccessds”,系统将自动在远程客户机上安装代理服务。6.点击启动迁移离线迁移1.查看ceph中一个computepool里的所有镜像[root@node-44~]#rbdlscompute2.导出镜像[root@node-44~]#rbdexport-pimages--image74cb427c-cee9-47d0-b467-af217a67e60a/root/aaa.qcow23.导出云硬盘[root@node-44~]#rbdexport-pvolumes--imagevolume-470fee37-b950-4eef-a595-d7def334a5d6/var/lib/glance/ceph-pool/volumes/Message-JiaoBenJi-10.40.212.244.在kvm环境下转换格式,并导入kvm虚拟机Ceph速度调优读写测试常用命令写测试:radosbench-prbd10write--no-cleanup顺序读测试:Radosbench–prbd10seq随机读测试:Radosbench–prbd10rand硬盘性能测试:Hdparm–Tt/dev/sda备注:在测试前请使用sync命令清除磁盘缓存,这次测试数据更准硬件调优1.交换机开启大帧模式(变化
本文标题:openstack使用手册(v1.0)
链接地址:https://www.777doc.com/doc-3213830 .html