--- tags: NodeWeaver, NFVI --- # Build a VM and Docker Container on NodeWeaver SOP ###### tags: NodeWeaver ## BIOS setting enable SR-IOV and vSwitch ## install and enter nodeweaver (YiHao in charge of this part) ### install nodeweaver 1. Choose option 1 like picture below ![](https://i.imgur.com/399XV4C.png) 2. After step 1, you'll enter this login frame Default account: setup Default password: nodeweaver ![](https://i.imgur.com/4JF9orx.png) 3. After login, nodeweaver will search cluster automaticly, like picture below If there's cluster found, follow step 4-6 else, follow step 7 ![](https://i.imgur.com/P8YjuP0.png) 4. If there's cluster found, it will ask for join cluster or not, like picture below ![](https://i.imgur.com/GCrO1RZ.png) 5. Press space to choose the cluster, and it will add "*" mark, like picture below After that, choose "connect" option below ![](https://i.imgur.com/n9dTT3S.png) 6. After rebooting, it will show message like picture below, and it means node setted ![](https://i.imgur.com/pjMtfeq.png) 7. If there's no cluster found or creating a new cluster, it will show pictures below Type in label, IP address, netmask, default gateway and canary IP (fill in default gateway in canary IP column), after that, it will start processing after press enter ![](https://i.imgur.com/uYsbR9z.png) ![](https://i.imgur.com/DOATriH.png) ![](https://i.imgur.com/q54nQuE.png) ![](https://i.imgur.com/SG6lpaQ.png) ### enter nodeweaver webUI 1. Open web browser and type in IP address Default account: admin Default password: cloud ![](https://i.imgur.com/8yqqfQz.png) ### troubleshooting When creating a new node (step 7 of install nodeweaver) It should be finished in 10 minutes, or it may have problem Please reboot and follow step 1 and step 2 of install nodeweaver part, we'll show the frame like picture below, and we choose "Manage Options" ![](https://i.imgur.com/gPgbgZT.png) After that, choose "Format" option and restart install nodeweaver procedure ![](https://i.imgur.com/H2bWLMy.png) ### caution 1. If you can, avoid using console, sometimes it occurs error (no output from console) 2. If stucked at procedure 7 of install nodeweaver, please follow troubleshooting and do, and it may takes more than 1 time to do that ## build VM ### create a net interface 1. Click Item on the menu of the left: Network => Virtual Networks 2. Click “+” button on the upper left side of the menu ![](https://i.imgur.com/zPmoNWZ.png) 3. Type Name of that Virtual Network Interface ![](https://i.imgur.com/Rk2k7aI.png) 4. Click Item on the menu of the top: Addresses 5. Type in first IP address, size (amount of VMs in the virtual internet) and first MAC 6. Click "Create" button ![](https://i.imgur.com/9A4kkf3.png) ### create a image which contains installing OS .iso file 7. Click Item on the menu of the left: Storage => Images 8. Click "+" button on the upper left side of the menu ![](https://i.imgur.com/1PQehGA.png) 9. Write name and select goal (about goal, I always choose HDD_2 option because there's no SSD on system) 10. Upload the .iso file from local 12. Click "Create" button ![](https://i.imgur.com/ATeyh2X.png) ### doing setting of VM 12. Click Item on the menu of the left: Templates => VMs 13. Click "+" button on the upper left side of the menu ![](https://i.imgur.com/TQkkJHI.png) 14. Type in Name, HW Resource (including Memory, CPU and VCPU) of VM ![](https://i.imgur.com/Yu0d6Lg.png) 15. Click Item on the menu of the top: Storage 16. Add a disk what you built with installing OS .iso ![](https://i.imgur.com/kXOwcfI.png) 17. Add a disk 18. Click "Volatile disk" option 19. Type in capacity of storage ![](https://i.imgur.com/81Q0nur.png) 20. Click Item on the menu of the top: Network 21. Choose a defined NIC interface 22. Click "Create" button on the upper left side ![](https://i.imgur.com/qxV4j1i.png) 23. Click Item on the menu of the left: Instances => VMs 24. Click "+" button on the upper left side of the menu ![](https://i.imgur.com/y35tjGZ.png) ### starting VM 25. Choose template of VM you built 26. Click "Create" button on the upper left side ![](https://i.imgur.com/1YPDHuH.png) 27. Click Item on the menu of the left: Instances => VMs 28. If VM was built successfully, it should show RUNNING on the column of Status, if the VM's running, click the monitor button at the rightside to the view of VM and install OS ![](https://i.imgur.com/PnaF03u.png) ### installing OS 29. After installing OS, poweroff your VM. After VM poweroffed, clicking your VM ![](https://i.imgur.com/phR1mle.png) 30. Click Item on the menu of the top: Storage 31. Detach the Vhd with installing OS .iso ![](https://i.imgur.com/teedWhU.png) ## after installing OS 1. install ssh ```javascript= $ sudo apt-get install ssh ``` 2. attach the VM by ssh protocol ## transfer file to VM (VM must be poweroffed if use this method) 1. Click Item on the menu of the left: Storage => Images 2. Click "+" button on the upper left side of the menu ![](https://i.imgur.com/Ocxg4r2.png) 3. Write name and select goal (about goal, I always choose HDD_2 option because there's no SSD on system) 4. Choose Type: Generic storage datablock 5. Choose Advanced Options => BUS: SCSI(sd) 6. Pack file what you want to upload to a .iso file at local 7. Upload the .iso file from local 8. Click "Create" button ![](https://i.imgur.com/tyYzdwy.png) 9. Click Item on the menu of the left: Instances => VMs 10. Click your VM ![](https://i.imgur.com/t1YY45U.png) 11. Click Item on the menu of the top: Storage 12. Click Attach disk button ![](https://i.imgur.com/t3tfvBf.png) 13. Choose disk that contains your file and click attach button ![](https://i.imgur.com/q81SWeO.png) 14. Boot VM 15. Mount the disk in the VM like you use Linux ## Build a Docker Container After we built a VM, we can build a docker container on VM We work on command line, so we can attach VM by NodeWeaver or SSH ### Install Docker Container on VM source: https://docs.docker.com/engine/install/ubuntu/ ```javascript= $ sudo apt-get remove docker docker-engine docker.io containerd runc $ sudo apt-get update $ sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg-agent \ software-properties-common $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - $ sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable" $ sudo apt-get update $ sudo apt-get install docker-ce docker-ce-cli containerd.io # reboot ``` ### Pull docker images I take ubuntu docker image for example * search docker images ```javascript= $ sudo docker search ubuntu //docker search [keyword] ``` * pull docker images from docker images library ```javascript= $ sudo docker pull ubuntu //docker pull [image_Name] ``` * create docker container from docker image ```javascript= $ sudo docker run -it ubuntu //docker run -it [image_Name] ``` * exit from container and close container ```javascript= # exit ``` We can also use Ctrl+C * exit container without close it (Ctrl+P) and (Ctrl+Q) ## source https://docs.nodeweaver.eu/#/ https://docs.docker.com/engine/install/ubuntu/ ## special thanks Rick Xiao Kevin Chio YiHao Shih