您好,登錄后才能下訂單哦!
系統(tǒng)環(huán)境 VMware workstation
系統(tǒng) CentOS-7-x86_64-DVD-1810
以下需注意:本文由多篇博客組成,作者為了防止忘記而記錄,途中有些有誤地方,比如10.10.10.0/24網(wǎng)段的,應(yīng)該改成10.1.1.0/24網(wǎng)段,為了節(jié)省時(shí)間,部分圖取決于https://www.linuxprobe.com/chapter-22.html
安裝前需要修改 /etc/hosts文件,添加 127.0.0.1 op.sealin.top(op.sealin.top為當(dāng)前機(jī)器名)
# yum install -y http://rdo.fedorapeople.org/rdo-release.rpm
# yum install -y openstack-packstack
# packstack --allinone ? ?//在執(zhí)行此處報(bào)錯(cuò),一個(gè)是關(guān)于NetworkManager,關(guān)閉即可,但執(zhí)行到control.pp報(bào)錯(cuò),后來(lái)把demo模塊關(guān)閉即可,命令如下:
# packstack --allinone --provision-demo=n
Welcome to Installer setup utility
Installing:
Clean Up ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? [ DONE ]
Setting up ssh keys ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?[ DONE ]
Discovering hosts' details ? ? ? ? ? ? ? ? ? ? ? ? ? [ DONE ]
Adding pre install manifest entries ? ? ? ? ? ? ? ? ?[ DONE ]
Preparing servers ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?[ DONE ]
Adding AMQP manifest entries ? ? ? ? ? ? ? ? ? ? ? ? [ DONE ]
Adding MySQL manifest entries ? ? ? ? ? ? ? ? ? ? ? ?[ DONE ]
Adding Keystone manifest entries ? ? ? ? ? ? ? ? ? ? [ DONE ]
Adding Glance Keystone manifest entries ? ? ? ? ? ? ?[ DONE ]
Adding Glance manifest entries ? ? ? ? ? ? ? ? ? ? ? [ DONE ]
Adding Cinder Keystone manifest entries ? ? ? ? ? ? ?[ DONE ]
Adding Cinder manifest entries ? ? ? ? ? ? ? ? ? ? ? [ DONE ]
Checking if the Cinder server has a cinder-volumes vg[ DONE ]
Adding Nova API manifest entries ? ? ? ? ? ? ? ? ? ? [ DONE ]
Adding Nova Keystone manifest entries ? ? ? ? ? ? ? ?[ DONE ]
Adding Nova Cert manifest entries ? ? ? ? ? ? ? ? ? ?[ DONE ]
Adding Nova Conductor manifest entries ? ? ? ? ? ? ? [ DONE ]
Creating ssh keys for Nova migration ? ? ? ? ? ? ? ? [ DONE ]
Gathering ssh host keys for Nova migration ? ? ? ? ? [ DONE ]
Adding Nova Compute manifest entries ? ? ? ? ? ? ? ? [ DONE ]
Adding Nova Scheduler manifest entries ? ? ? ? ? ? ? [ DONE ]
Adding Nova VNC Proxy manifest entries ? ? ? ? ? ? ? [ DONE ]
Adding Openstack Network-related Nova manifest entries[ DONE ]
Adding Nova Common manifest entries ? ? ? ? ? ? ? ? ?[ DONE ]
Adding Neutron API manifest entries ? ? ? ? ? ? ? ? ?[ DONE ]
Adding Neutron Keystone manifest entries ? ? ? ? ? ? [ DONE ]
Adding Neutron L3 manifest entries ? ? ? ? ? ? ? ? ? [ DONE ]
Adding Neutron L2 Agent manifest entries ? ? ? ? ? ? [ DONE ]
Adding Neutron DHCP Agent manifest entries ? ? ? ? ? [ DONE ]
Adding Neutron LBaaS Agent manifest entries ? ? ? ? ?[ DONE ]
Adding Neutron Metering Agent manifest entries ? ? ? [ DONE ]
Adding Neutron Metadata Agent manifest entries ? ? ? [ DONE ]
Checking if NetworkManager is enabled and running ? ?[ DONE ]
Adding OpenStack Client manifest entries ? ? ? ? ? ? [ DONE ]
Adding Horizon manifest entries ? ? ? ? ? ? ? ? ? ? ?[ DONE ]
Adding Swift Keystone manifest entries ? ? ? ? ? ? ? [ DONE ]
Adding Swift builder manifest entries ? ? ? ? ? ? ? ?[ DONE ]
Adding Swift proxy manifest entries ? ? ? ? ? ? ? ? ?[ DONE ]
Adding Swift storage manifest entries ? ? ? ? ? ? ? ?[ DONE ]
Adding Swift common manifest entries ? ? ? ? ? ? ? ? [ DONE ]
Adding Provisioning Demo manifest entries ? ? ? ? ? ?[ DONE ]
Adding MongoDB manifest entries ? ? ? ? ? ? ? ? ? ? ?[ DONE ]
Adding Ceilometer manifest entries ? ? ? ? ? ? ? ? ? [ DONE ]
Adding Ceilometer Keystone manifest entries ? ? ? ? ?[ DONE ]
Adding Nagios server manifest entries ? ? ? ? ? ? ? ?[ DONE ]
Adding Nagios host manifest entries ? ? ? ? ? ? ? ? ?[ DONE ]
Adding post install manifest entries ? ? ? ? ? ? ? ? [ DONE ]
Installing Dependencies ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?[ DONE ]
Copying Puppet modules and manifests ? ? ? ? ? ? ? ? [ DONE ]
Applying 192.168.1.105_prescript.pp
192.168.1.105_prescript.pp: ? ? ? ? ? ? ? ? ? ? ? ? ?[ DONE ] ? ? ? ?
Applying 192.168.1.105_amqp.pp
Applying 192.168.1.105_mysql.pp
192.168.1.105_amqp.pp: ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? [ DONE ] ? ?
192.168.1.105_mysql.pp: ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?[ DONE ] ? ?
Applying 192.168.1.105_keystone.pp
Applying 192.168.1.105_glance.pp
Applying 192.168.1.105_cinder.pp
192.168.1.105_keystone.pp: ? ? ? ? ? ? ? ? ? ? ? ? ? [ DONE ] ? ? ? ?
192.168.1.105_glance.pp: ? ? ? ? ? ? ? ? ? ? ? ? ? ? [ DONE ] ? ? ? ?
192.168.1.105_cinder.pp: ? ? ? ? ? ? ? ? ? ? ? ? ? ? [ DONE ] ? ? ? ?
Applying 192.168.1.105_api_nova.pp
192.168.1.105_api_nova.pp: ? ? ? ? ? ? ? ? ? ? ? ? ? [ DONE ] ? ? ? ?
Applying 192.168.1.105_nova.pp
192.168.1.105_nova.pp: ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? [ DONE ] ? ?
Applying 192.168.1.105_neutron.pp
192.168.1.105_neutron.pp: ? ? ? ? ? ? ? ? ? ? ? ? ? ?[ DONE ] ? ? ?
Applying 192.168.1.105_neutron_fwaas.pp
Applying 192.168.1.105_osclient.pp
Applying 192.168.1.105_horizon.pp
192.168.1.105_neutron_fwaas.pp: ? ? ? ? ? ? ? ? ? ? ?[ DONE ] ? ? ? ? ? ?
192.168.1.105_osclient.pp: ? ? ? ? ? ? ? ? ? ? ? ? ? [ DONE ] ? ? ? ? ? ?
192.168.1.105_horizon.pp: ? ? ? ? ? ? ? ? ? ? ? ? ? ?[ DONE ] ? ? ? ? ? ?
Applying 192.168.1.105_ring_swift.pp
192.168.1.105_ring_swift.pp: ? ? ? ? ? ? ? ? ? ? ? ? [ DONE ] ? ? ? ? ?
Applying 192.168.1.105_swift.pp
Applying 192.168.1.105_provision_demo.pp
192.168.1.105_swift.pp: ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?[ DONE ] ? ? ? ? ? ? ?
192.168.1.105_provision_demo.pp: ? ? ? ? ? ? ? ? ? ? [ DONE ] ? ? ? ? ? ? ?
Applying 192.168.1.105_mongodb.pp
192.168.1.105_mongodb.pp: ? ? ? ? ? ? ? ? ? ? ? ? ? ?[ DONE ] ? ? ?
Applying 192.168.1.105_ceilometer.pp
Applying 192.168.1.105_nagios.pp
Applying 192.168.1.105_nagios_nrpe.pp
192.168.1.105_ceilometer.pp: ? ? ? ? ? ? ? ? ? ? ? ? [ DONE ] ? ? ? ? ?
192.168.1.105_nagios.pp: ? ? ? ? ? ? ? ? ? ? ? ? ? ? [ DONE ] ? ? ? ? ?
192.168.1.105_nagios_nrpe.pp: ? ? ? ? ? ? ? ? ? ? ? ?[ DONE ] ? ? ? ? ?
Applying 192.168.1.105_postscript.pp
192.168.1.105_postscript.pp: ? ? ? ? ? ? ? ? ? ? ? ? [ DONE ] ? ? ? ? ?
Applying Puppet manifests ? ? ? ? ? ? ? ? ? ? ? ? ? ?[ DONE ]
Finalizing ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? [ DONE ]
**** Installation completed successfully****** ? ? ? ? ? ? ? ?
Additional information:
irectory.
。。。。。
創(chuàng)建云平臺(tái)的網(wǎng)卡配置文件: ?[root@op?~]#?? DEVICE=br-ex? IPADDR=192.168.3.91? NETMASK=255.255.255.0? BOOTPROTO=static? DNS1=192.168.3.1? GATEWAY=192.168.3.1? BROADCAST=192.168.3.254? NM_CONTROLLED=no? DEFROUTE=yes?IPV4_FAILURE_FATAL=yes? IPV6INIT=no? ONBOOT=yes? DEVICETYPE=ovs? TYPE="OVSIntPort"? OVS_BRIDGE=br-ex? ?修改網(wǎng)卡參數(shù)信息為: ?[root@openstack?~]#??? DEVICE="ens33"? ONBOOT=yes? TYPE=OVSPort? DEVICETYPE=ovs? OVS_BRIDGE=br-ex? NM_CONTROLLED=no? IPV6INIT=no? 將網(wǎng)卡設(shè)備添加到OVS網(wǎng)絡(luò)中: [root@openstack?~]#??? [root@openstack?~]#?? 55501ff1-856c-46f1-8a00-5c61e48bb64d????? Bridge?br-ex??????? ??Port?br-ex?????????? ????Interface?br-ex??????????? ??????type:?internal???????? ??? ?Bridge?br-int???? ?????fail_mode:?secure????? ???Port?br-int??????? ??????Interface?br-int??????????? ??????type:?internal??? ???Port?patch-tun??????????? ???????Interface?patch-tun????????? ???????type:?patch??????????? ??????options:?{peer=patch-int}?? ?Bridge?br-tun???? ????Port?patch-int??????? ??????Interface?patch-int?????????? ???????type:?patch???????? ?????????options:?{peer=patch-tun}??? ?????Port?br-tun???? ?????????Interface?br-tun????? ????????????type:?internal ?????ovs_version:?"2.1.3"? ?重啟系統(tǒng)讓網(wǎng)絡(luò)設(shè)備同步: ?[root@op?~]#?reboot
//登陸平臺(tái)http://192.168.3.91/dashboard
查看密碼
# cat /root/keystonerc_admin
export OS_USERNAME=admin
export OS_TENANT_NAME=admin
export OS_PASSWORD=3b63bde2721349d0
export OS_AUTH_URL=http://192.168.1.105:5000/v2.0/
Openstack創(chuàng)建網(wǎng)絡(luò):
點(diǎn)擊創(chuàng)建子網(wǎng):
子網(wǎng)詳情:
創(chuàng)建私有網(wǎng)絡(luò)
增加路由信息
填寫路由名稱:
設(shè)置路由的網(wǎng)關(guān)信息:
設(shè)置網(wǎng)關(guān):
在網(wǎng)絡(luò)拓?fù)渲刑砑咏涌冢?br />
添加接口信息:
原理,通過kvm安裝好,然后上傳到openstack,網(wǎng)上大多數(shù)都是以這種方式安裝,但是要先下載virtio的驅(qū)動(dòng),網(wǎng)上搜一下就有了
virt-install --connect qemu:///system --name win7 --ram 4080 --vcpus 2 --network=default,model=virtio --disk path=/tmp/win7.qcow2,format=qcow2,device=disk,bus=virtio --cdrom /tmp/win7.iso --disk path=/tmp/virtio-win-0.1.160.iso,device=cdrom --graphics spice,listen=0.0.0.0 --boot cdrom
在此遇到兩個(gè)問題,一個(gè)是無(wú)法讀取cdrom,原因是win7.iso和win-0.1.160.iso的設(shè)備名稱顛倒,把win7.iso設(shè)為hda,win-0.1.160.iso設(shè)為hdb即可。另一個(gè)是卡在start windows ,起初據(jù)網(wǎng)上說(shuō)把 --video 值改為cirrus,但毫無(wú)作用,后來(lái)才發(fā)現(xiàn)是仿真機(jī)的問題,由于我的環(huán)境是vmware所以仿真機(jī)要改
virsh destroy win7 ? 停止win7
vi /etc/libvirt/qemu/win7.xml
dev選項(xiàng)互換即可,途中已經(jīng)互換
virsh define /etc/libvirt/qemu/win7.xml
virsh destroy win7 && virsh start win7
進(jìn)入系統(tǒng)正常驅(qū)動(dòng)viostor對(duì)應(yīng)的驅(qū)動(dòng),一開始我還以為是vioscsi,還以為驅(qū)動(dòng)不行,之后就可以正常安裝了,安裝完還要再裝其他驅(qū)動(dòng),比如網(wǎng)卡,顯卡等
這時(shí)候就大功告成了,我們成功的制作了一個(gè)qcow2的鏡像。接下來(lái)部署到glance上去
glance image-create --name "windows7" --file home/house/windows7.qcow2 --disk-format qcow2 --container-format bare --visibility public --progress
錯(cuò)誤:you must provide a username via either --os-username or env[OS_USERNAME]
由于我之前改了密碼
解決辦法 在root用戶下執(zhí)行如下命令
source ?keystonerc_admin
再執(zhí)行上傳命令
完成后就可以在openstack平臺(tái)看到該鏡像,然后就可以開始創(chuàng)建虛擬機(jī)了
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。