Zstack Creating a Cloud Host (iii)

Source: Internet
Author: User

Flat network Flat NETWORK1. Introduced

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/74/76/wKiom1YeD3HQgmVhAADFWM1Box4456.jpg "title=" n_e@@9 %d6 (%g3o91k_[j ([x.png "alt=" Wkiom1yed3hqgmvhaadfwm1box4456.jpg "/>

The flat network is very popular in the private cloud network environment. Its network topology is simple, and all cloud hosts are directly connected to a sophomore network within the company. Flat networks are also very easy to build. Since all cloud hosts and physical hosts are in a two-tier broadcast domain, cloud hosts on this two-tier network can link to the Internet through the core routers of the data center. In this tutorial, we assume that you have an IP network that can access the Internet.

2. Prerequisites

We assume that you have successfully installed and started the Zstack according to the method in the installation manual. You can log in to the Zstack admin interface by opening the following address on the Chrome browser or in the Firefox browser (ie may encounter usage issues):

Http://your_machine_ip:5000/

We assume that your Linux server has only one network card and that it can be linked to the Internet. In addition, we need the following requirements:

    • At least 20G of available hard disk space for basic primary storage and backup storage

    • There are several public network IP addresses that can be used

    • There is a bootable NFS server NFS (if you use the-a or-n parameter when installing Zstack, the Zstack installer will start an NFS service on the native, by default, in/usr/local/zstack/nfs_root/. However, we recommend that the user can configure a separate NFS service, such as/my_nfs_folder.

    • You can ssh to this machine using the root user

Based on the environmental requirements above, we assume the following configuration information:

    • Network card device: eth0

    • Eth0 ip:192.168.0.212

    • Other free IP address ranges: 192.168.0.230 ~ 192.168.0.240

    • Primary storage directory:/usr/local/zstack/nfs_root

    • Backup Storage directory:/backupstorage

3. Login

Log in to the Zstack admin interface on the Chrome browser or Firefox browser (ie may encounter usage issues): The default user name and password are admin/password:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/74/73/wKioL1YeEBLD8tvfAADAyKKByqg835.jpg "title=" 5 ' 4G] Q@bsah]jl3w~8l5w[5.png "alt=" Wkiol1yeebld8tvfaadaykkbyqg835.jpg "/>

4. Create Zone

Click ' Zone ' on the left panel:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/74/76/wKiom1YeECCS92r5AABiW97ZsYo376.jpg "title=" {sss~ Gv3mgq~0{9~e{bnxka.png "alt=" Wkiom1yeeccs92r5aabiw97zsyo376.jpg "/>



Click the button ' New Zone ' to open the dialog box:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/74/73/wKioL1YeEF7Bfub3AADCwcD-6-8585.jpg "title=" fdvqq@8aoou@@ zzfcthotfixz 4L ' w$6v.png "alt=" Wkiol1yeef7bfub3aadcwcd-6-8585.jpg "/>



Take a name for the first zone: ' ZONE1 ', then click on the button ' Create ':

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/74/76/wKiom1YeEGKjASW0AAC6n5AVEnU527.jpg "title=" I2el4ot$i0[23o6uas3b0dk.png "alt=" Wkiom1yeegkjasw0aac6n5avenu527.jpg "/>


5. Create cluster

Click ' Cluster ' on the left panel:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/74/73/wKioL1YeEKTAZvjRAABmQo2JmZo289.jpg "title=" 2%@ Bgooh) w@$] (3u_[b{t$1.png "alt=" Wkiol1yeektazvjraabmqo2jmzo289.jpg "/>



Click the button ' New Cluster ' to open the dialog box:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/74/73/wKioL1YeEOyy4FNpAABj92DhnR0665.jpg "title=" OU ' M8mqvkcqedul@]%g0_r3.png "alt=" Wkiol1yeeoyy4fnpaabj92dhnr0665.jpg "/>



Select the zone you just created (ZONE1); Give cluster a name: ' CLUSTER1 '; Then select Hypervisor ' KVM ', then click on the button ' Next ':

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/74/76/wKiom1YeEPbgn5HbAAGEn_MucrE818.jpg "title=" Vhc7p95_[8[osi%lcr]_1ou.png "alt=" Wkiom1yeepbgn5hbaagen_mucre818.jpg "/>



We don't have any primary storage right now, so let's continue clicking on ' Next ':

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/74/73/wKioL1YeETnC3h4-AAExGviOjh4735.jpg "title=" Enqdv16d__ak_d[uxive6f4.png "alt=" Wkiol1yeetnc3h4-aaexgviojh4735.jpg "/>



We do not have any L2 network now, let us directly click ' Create ':

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/74/73/wKioL1YeEWHheLvBAAE1OnpGVpI454.jpg "title=" BMXZX) %]nussstzg27zgh~y.png "alt=" Wkiol1yeewhhelvbaae1onpgvpi454.jpg "/>


6. Add Compute node Host

Click ' Host ' on the left panel:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/74/76/wKiom1YeEW3w6DE6AABTHWMo03s699.jpg "title=") r1%) Stay[ot~x8 ' (gkq5k.png "alt=" Wkiom1yeew3w6de6aabthwmo03s699.jpg "/>



Click the button ' New Host ' to open the dialog box:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/74/73/wKioL1YeEaywsqsKAABTeYNGPJs762.jpg "title=" thgzj~ Lrphbkv[9ft1_k@a8.png "alt=" Wkiol1yeeaywsqskaabteyngpjs762.jpg "/>



    1. Select Zone (ZONE1) and cluster (CLUSTER1)

    2. Take a name for host: ' HOST1 '

    3. Enter the host's IP address (192.168.0.212)

    4. The most important thing is to enter the user name and password of the host root user

    5. Click ' Add '

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/74/76/wKiom1YeEdeiGgFPAAF3nmaAz28617.jpg "title=" wm82w2 ']@y}b ' i[j1sqdmc8.png "alt=" Wkiom1yeedeiggfpaaf3nmaaz28617.jpg "/>



7. Add Primary storage

Click ' Primary Storage ' on the left panel:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/74/73/wKioL1YeElHQlyJEAABbjG9ReB0540.jpg "title=" WL (_@ E7R3K@3~2%_Q2]) ' 9d.png ' alt= "wkiol1yeelhqlyjeaabbjg9reb0540.jpg"/>



Click the button ' New Primary Storage ' to open the dialog box:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/74/76/wKiom1YeEk7gBHlAAABzyosQnIY264.jpg "title=" j%i "u{ O7jehn_b~9$fu0a6e.png "alt=" Wkiom1yeek7gbhlaaabzyosqniy264.jpg "/>



    1. Select Zone (ZONE1)

    2. Take a name for the primary store: ' Primary-storage1 '

    3. Select Type ' NFS '

    4. Enter the NFS URL (for example, 192.168.0.212:/usr/local/zstack/nfs_root)

    5. Click ' Next '

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/74/76/wKiom1YeEorgJin-AAHHO-4qs-A780.jpg "title=" 049EP ( 2yy2}$ ((BC_ ([t{eg.png "alt=" Wkiom1yeeorgjin-aahho-4qs-a780.jpg "/>



Select Cluster (CLUSTER1) as the Mount object and click the button ' ADD ':

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/74/76/wKiom1YeEquCdc97AADtY2GjLfs608.jpg "title=" 3yxdn_ Xff4sjoxm2ixf0veg.png "alt=" Wkiom1yeequcdc97aadty2gjlfs608.jpg "/>

{

Add executes multiple actual zstack APIs

If all goes well, you'll see a notification of two APIs complete: Addprimarystorage and Attachprimarystoragetocluster.

}



8. Add Backup Storage

Click ' Backup Storage ' on the left panel:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/74/73/wKioL1YeExySTPd6AABi_EQCecU859.jpg "title=" _q63tz )) ja{gdpe$]ne[}_v.png "alt=" Wkiol1yeexystpd6aabi_eqcecu859.jpg "/>



Click the button ' New Backup Storage ' to open the dialog box:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/74/73/wKioL1YeEzuSsHSaAABoS3o_rlc601.jpg "title=" izrg[[ Odtn3$c6wn3ac%2gg.png "alt=" Wkiol1yeezusshsaaabos3o_rlc601.jpg "/>



    1. Name the backup store: ' Backup-storage1 '

    2. Select Type ' Sftpbackupstorage '

    3. Enter URL '/backupstorage ' (if the directory does not exist, Zstack will be responsible for creating the directory)

    4. Enter the native IP address (192.168.0.212)

    5. Enter the root user's SSH password

    6. Click ' Next '

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/74/73/wKioL1YeE1_RmDTZAAHzBunvcok742.jpg "title=" $DS% Jo8}7dichp6c$u (_7za.png "alt=" Wkiol1yee1_rmdtzaahzbunvcok742.jpg "/>



Select Zone (ZONE1) as the Mount object and click ' Add ':

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/74/77/wKiom1YeE16S7rIbAADRvo9fu0g440.jpg "title=" 3gg69_ P0md~x_x}_ry~%vg7.png "alt=" Wkiom1yee16s7ribaadrvo9fu0g440.jpg "/>


9. Add a cloud host disk image

Click ' Image ' on the left panel:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/74/77/wKiom1YeE3zwmJ10AABpaZISLyU702.jpg "title=" 94~ JEMJT)) pg8@0xmk3o@ug.png "alt=" Wkiom1yee3zwmj10aabpazislyu702.jpg "/>



Click ' New Image ' to open the dialog box:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/74/73/wKioL1YeE7eDAmxpAABLZJ_wEkg761.jpg "title=" Y615 (@ Miv~s (J51QB ($$~}6.png "alt=" Wkiol1yee7edamxpaablzj_wekg761.jpg "/>



    1. Select Backup Storage (BACKUP-STORAGE1)

    2. Name the disk image ' Ttylinux '

    3. Choose Format ' Qcow2 '

    4. Select the media type ' rootvolumetemplate '

    5. Select platform ' Linux '

    6. Input Http://7xi3lj.com1.z0.glb.clouddn.com/templates/ttylinux.qcow2

    7. Click ' ADD ' (cannot select ' System ')

The image file will be used for the user cloud host template.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/74/77/wKiom1YeFCKi1OFKAAJb4B8bur0036.jpg "title=" S1bi9u2{otaw9 ' m30cz9h (e.png "alt=" Wkiom1yefcki1ofkaajb4b8bur0036.jpg "/>



Click ' New image ' again to add a disk image for the virtual router:

    1. Select Backup Storage (BACKUP-STORAGE1)

    2. Name the disk image ' Virtual-router '

    3. Choose Format ' Qcow2 '

    4. Select the media type ' rootvolumetemplate '

    5. Select platform ' Linux '

    6. Input Http://7xi3lj.com1.z0.glb.clouddn.com/releases/0.9/0.9.0/zstack-virtualrouter-0.9.0.qcow2

    7. Tick ' System '

    8. Click ' Add '

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/74/73/wKioL1YeFIjDS9DDAAI9Sc1gTUQ529.jpg "title=" K ( 5hylh1i$aq6i1dagxc ' V.png "alt=" Wkiol1yefijds9ddaai9sc1gtuq529.jpg "/>



10. Create a two-tier network

Click ' L2 Network ' on the left panel:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/74/73/wKioL1YeFK_jgRYmAABKvq9_MX8663.jpg "title=" Aimi6jkvo[s ' [{d[helymcl.png ' alt= ' wkiol1yefk_jgrymaabkvq9_mx8663.jpg '/>



Click on the button ' New L2 Network ':

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/74/77/wKiom1YeFKnxRKgGAABhAEd_7TA857.jpg "title=" R $ Whbam5mkd%akautm{h@6w.png "alt=" Wkiom1yefknxrkggaabhaed_7ta857.jpg "/>



    1. Select Zone (ZONE1)

    2. Take a name ' Flat-l2 ' to the two-story network.

    3. Select Type ' L2novlannetwork '

    4. Enter the name of the physical NIC ' eth0 '

    5. Click ' Next '

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/74/73/wKioL1YeFOegS_x-AAGup8SddbI862.jpg "title=" 9 (xf[~ 6m[{zy41cr~{%wmz6.png "alt=" Wkiol1yefoegs_x-aagup8sddbi862.jpg "/>



Select Cluster (CLUSTER1) as the Mount object and click ' Create ':

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/74/73/wKioL1YeFQjA3E53AADVWEATfCQ044.jpg "title=" 96BA) I3r$~]iheisdk[h4[6.png "alt=" Wkiol1yefqja3e53aadvweatfcq044.jpg "/>



11. Create a three-tier network

Click ' L3 Network ' on the left panel:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/74/77/wKiom1YeFSbSOFmUAABJk2q4UYE042.jpg "title=" V047w8 %01o~7]2ekeuo[ihy.png "alt=" Wkiom1yefsbsofmuaabjk2q4uye042.jpg "/>


Click ' New L3 Network ':

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/74/73/wKioL1YeFZSylhbsAABjasgEN1M314.jpg "title=" 8nxno2j7qmv$v% ' 1qn$ma82.png "alt=" Wkiol1yefzsylhbsaabjasgen1m314.jpg "/>



    1. Select Zone (ZONE1)

    2. Select a two-tier network (FLAT-L2)

    3. Named ' Flat-l3 ' for the three-tier network

    4. Select Type ' L3basicnetwork '

    5. Enter the domain name: ' tutorials.zstack.org '

    6. Click ' Next ' (do not select System)

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/74/73/wKioL1YeFc2ACrO1AAIpIas-ITQ121.jpg "title=" Xlc9gjeq%2[[pt@[4qhw~ ' R.png "alt=" Wkiol1yefc2acro1aaipias-itq121.jpg "/>



    1. Named IP range: ' Flat-ip-range '

    2. Select Add Method: ' Add by IP Range '

    3. Enter the starting IP address ' 192.168.0.230 '

    4. Enter end IP address ' 192.168.0.240 '

    5. Input subnet mask ' 255.255.255.0 '

    6. Input Gateway ' 192.168.0.1 '

    7. Click ' Add ' to add an IP range

    8. Click ' Next '

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/74/77/wKiom1YeFgjDTj9tAAHkGs8uV08538.jpg "title=" 8CJ " pzi1frp7ktlvx24] ' v2.jpg ' alt= "wkiom1yefgjdtj9taahkgs8uv08538.jpg"/>



Enter ' 8.8.8.8 ' (You can also enter a domestic DNS, such as 114.114.114.114), then click ' Add ' to add a DNS server, then click ' Next ':

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/74/77/wKiom1YeFivDH5piAAEPxdf4Ce8333.jpg "title="]43%4 " B4090nmw}k7m8bk$b.png "alt=" Wkiom1yefivdh5piaaepxdf4ce8333.jpg "/>



    1. Choose Provider ' Virtualrouter '

    2. Select ' DHCP '

    3. Click on ' Add ' to add a Web service to repeat this step above for adding DNS, and finally click ' Create ':

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/74/73/wKioL1YeFnqgFe0rAAGZpE76bV4420.jpg "title=" lco0s) ob_) P) p$%q (34_0a1.png "alt=" Wkiol1yefnqgfe0raagzpe76bv4420.jpg "/>


12. Create a Cloud host template

Click ' Instance offering ' on the left panel:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/74/77/wKiom1YeFozD0LssAACGW9R986k236.jpg "title=" xpmh{ Yhxr{70%s2 ' z6]~ ' cv.png "alt=" Wkiom1yefozd0lssaacgw9r986k236.jpg "/>



Click ' New Instance offering ':

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/74/77/wKiom1YeFq2gD-fvAAB8W3Nw-2c823.jpg "title="}ia$ ( Gq9~t~ ' ([E3) fy_l) a.png "alt=" Wkiom1yefq2gd-fvaab8w3nw-2c823.jpg "/>



    1. Take a name for the template ' 512m-512hz '

    2. Number of input CPUs is 1

    3. Input CPU Speed 512

    4. Input memory Size 512M

    5. Click ' Create '

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/74/73/wKioL1YeFvShgEx-AAFZ8225KJQ189.jpg "title=" pv412~ Yr8wai]gzo}hp8bqi.jpg "alt=" Wkiol1yefvshgex-aafz8225kjq189.jpg "/>

If you use Ttylinux disk mirroring to create a virtual machine, the minimum memory requirement for that virtual machine is only 24MB. Users can create only one 24MB template.



13. Create a virtual machine router template

Click on the left panel ' Virtual Router offering ':

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/74/73/wKioL1YeFyahZ19cAACAagjPXdc624.jpg "title=" 8a~ 94o@{ajiyxs3$t$hbm7u.png "alt=" Wkiol1yefyahz19caacaagjpxdc624.jpg "/>



Click ' New Virtual Router offering ':

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/74/73/wKioL1YeF0HT0r9mAACE1ysV1n4259.jpg "title=" d[[u5v ']~or02i3b5e ' w3f6.png "alt=" Wkiol1yef0ht0r9maace1ysv1n4259.jpg "/>



    1. Select Zone (ZONE1)

    2. Take a name ' vr-offering '

    3. Enter the number of CPUs ' 1 '

    4. Input CPU frequency ' 512 '

    5. Input memory size ' 512M '

    6. Select disk image ' Virtual-router '

    7. Select Management L3 network ' FLAT-L3 '

    8. Select public L3 network ' FLAT-L3 '

    9. Tick ' DEFAULT offering '

    10. Click ' Create '

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/74/73/wKioL1YeF2Gj--TfAAKaHT9wTOc745.jpg "title=" Tyl1w5ako0ds2qdl~ ' ~7cft.jpg "alt=" Wkiol1yef2gj--tfaakaht9wtoc745.jpg "/>



14. Create a cloud Host

Click ' Instance ' on the left panel:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/74/77/wKiom1YeF2LBLdIOAABhcbkHgPw911.jpg "title=" x{~ ' {] {eoypig99m4jm~[k9.png "alt=" Wkiom1yef2lbldioaabhcbkhgpw911.jpg "/>



Click ' New vminstance ':

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/74/77/wKiom1YeF3rQ4DN4AABs2NQwzgc280.jpg "title=" Vgu]e} Qm6l~lfgdlj_[gn0x.png "alt=" Wkiom1yef3rq4dn4aabs2nqwzgc280.jpg "/>



    1. Select template ' 512m-512hz '

    2. Select disk image ' Ttylinux '

    3. Select the three-tier network ' FLAT-L3 ' and click ' Add '

    4. Enter the name of the cloud host ' VM1 '

    5. Enter the network name of the cloud host: ' VM1 '

    6. Click ' Next '

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/74/74/wKioL1YeF7qCMOkNAAGC_49LnSk164.jpg "title=" M6 (Ziz }w%) 4{pap]$3c1) ly.png "alt=" Wkiol1yef7qcmoknaagc_49lnsk164.jpg "/>



Click ' Create ':

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/74/77/wKiom1YeF7iCRTjjAAFEgu6cO88241.jpg "title=" n1s~ Isx]x]b2_p72$i815u1.png "alt=" Wkiom1yef7icrtjjaafegu6co88241.jpg "/>

Starting the first cloud master takes a long time when you first create a cloud host, Zstack needs to download the cloud host's disk image from the backup store to the primary storage, which may take a while depending on the size of the different disk images. In addition, Zstack also creates virtual routers for cloud hosts, which can take up to 1 minutes. Once the first cloud host is created, it will be very fast to create a cloud host again.



When the cloud host is created, click on ' Action ' and click ' Console ' to open the terminal of the cloud host (need to allow pop-ups on the browser):

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/74/78/wKiom1YeF_TShGmhAAEIT52duxw738.jpg "title=" ' I7ld ( DKQ7WSHG) 4 ' 7) sjc7.png "alt=" Wkiom1yef_tshgmhaaeit52duxw738.jpg "/>

In the pop-up window, log in to ttylinux with the root user's password password. After logging in, you can use ' hostname ' to view the hostname and ' ifconfig ' to check if the IP address is a flat network address.


This article is from the "Ming Linux blog" blog, be sure to keep this source http://zhaijunming5.blog.51cto.com/10668883/1702897

Zstack Create a cloud host (iii)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.