150326 openstack, glance 김지은

Download 150326 openstack, glance 김지은

If you can't read please download the document

Upload: jieun-kim

Post on 07-Aug-2015

187 views

Category:

Technology


5 download

TRANSCRIPT

  1. 1. [OpenStack] Image Service, Glance [email protected]
  2. 2. What is the Glance? OpenStack Hypervisor VM , VM OS Glance logical Architecture 1. glance-api , 2. glance-api , glance-registry, glacne database 3. , glance-registry glance-database 4. , glance-database
  3. 3. Virtual Machine Image Type VM Hypervisor QEMU Compute Node CPU iso . OpenStack Virtual Machine http://docs.openstack.org/juno/config-reference/content/iso-support.html no Image Format Explanation 1 raw ( raw) 2 qcow2 QEMU , Copy on Write 3 vhd VMWare, Xen, Microsoft, VirtualBox Virtual Machine 4 vmdk , VM 5 vdi VirtualBox QEMU 6 iso CD_ROM 7 aki Amazon 8 ari Amazon 9 ami Amazon
  4. 4. Container Format VM VM Container Format Type [How to Create Glance Images ?] use DashBorad (Horizon) use CLI no Image Format Explanation 1 bare Qcow2 , 2 ovf OVF(Open Virtualzation Format) Container 3 aki Amazon 4 ari Amazon 5 ami Amazon
  5. 5. Cloud OS Image AWS Glance Glance nova ( virualBox Vmware ) no OS URL 1 Cirros http://download.cirros-cloud.net 2 Ubuntu http://uec-images.ubuntu.com 3 Fedora https://getfedora.org/ko/cloud/download/ 4 OpenSuSe 12.3 http://susestudio.com/a/YRUrwO/testing-instance-for-openstack-opensuse-12-3 5 Windows Server 2012 http://www.cloudbase.it/ws2012r2 6 RedHat https://www.rdoproject.org/Image_resources 7 https://github.com/rackerjoe/oz-image-build
  6. 6. Virtual Machine Manager virt-manager free S/W GUI Libvirt KVM Xen, LXC Wiki Create, edit, start and stop VMs View and control of each VMs console See performance and utilization statistics for each VM View all running VMs and Hosts, and their live performance or resource utilizaion statistics Use KVM, Xen or QEMU virtual machines, running either lovally or remotely Use LXC containers Virual install http://docs.openstack.org/image-guide/content/centos-image.html virt-manager is based on libvirt and supports several Hypervisor
  7. 7. Create Cirros Instance
  8. 8. Create Ubuntu Instance [Ubuntu] ubuntu Cloud image 12.04 precise-server-cloudimg-amd64-disk1.img https://cloud-images.ubuntu.com 14.04 trusty SSH Key-pair 12.04 test 1. Create Glance Image 1.1. use DashBoard
  9. 9. Create Ubuntu Instance 1. Create Glance Image 1.2. use CLI $ mkdir $ cd images $ wget https://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-amd64-disk1.img $ vi admin-openrc.sh $ source admin-openrc.sh $ glance image-create name Ubuntu12.04_LTS disk-format raw container-format bare is-public True progress < trusty-server-cloudimg-amd64-disk1.img $ glance image-list
  10. 10. Create Ubuntu Instance 2. Create Ubuntu Instance 2.1. use DashBoard - > computing > & > > > .pem - > > .pem - 2.2. use CLI $ source demo-openrc.sh $ ssh-keygen# $ nova keypair-add --pub-key ~/.ssh/id_rsa.pub test-key #keypair $ nova keypair-list # keypair $ nova flavor-list # flavor $ nova image-list # image $ neutron net-list # network $ nova secgroup-list # secure-group $ nova boot --flavor m1.tiny --image Ubuntu_14.04_LTS --nic net-id=466d5fa4-435f-446a-9e9b- ee756ec23b7a --securerity-group default --key-name test-key test-instance1 $ nova list # $ nova get-vnc-console test-instance1 novnc # novnc URL
  11. 11. Create Windows Instance Glance .img iso .img [Create .img File] - : ko_windows_7_professional_k_x64.iso - Controller node - .img virt-manager 1. Xwindow 2. FTP $ apt-get install y vsftpd $ sudo vi /etc/vsftpd.conf ----------------------------------------- local_enable=YES write_enable=YES ----------------------------------------- 3. local xftp ko_windows_7_professional_k_x64.iso 4. Controller node (VrtualBox ..) 5. CPU $ egrep c (vmx|svm) /proc/cpuinfo : 0 , 1 6. $ uname m : bit
  12. 12. Create Windows Instance 7. Kvm $ sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils 8. kvm, livbirtd user group $ sudo adduser user kvm $ sudo adduser user libvirtd 9. $ sudo reboot now 10. $ groups user sudo kvm libvirtd $ sudo virsh c qemu:///system list 11. $ sudo apt-get install virt-manager 12. http://alt.fedoraproject.org/pub/alt/virtio-win/lastest/images/bin > virtio-win-0.1-81.iso 13. Virtual machine manager $ virt-manager
  13. 13. Create Windows Instance 7. Kvm $ sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils 14. Image - -> local install media -> Forward - use iso image -> os type -> version-> Forward - choose memory and CPU settings : 2048 / 2 -> Forward - enabled storage for this virtual machine, 20GB ( 13GB!!) -> Forward - check!! Customize configuration before install - advanced options > Finish - Disk1 - NIC -> Device model : virtio - add Hardware -> device type : virtio disk -> storage format : raw -> finish - add hardware -> select managed or other existing storage virtio-win-0.1-81.iso -> device type : IDE cdrom - add hardware -> select managed or other exisiting storage window7.iso -> device type : IDE cdrom - Boot options -> Enable boot menu -> CDROM - Begin installation 15. Windows , - : > CDROMWIN7AMD64 > RedHat VirtIO SCSI 16. > CDROMWIN7AMD64
  14. 14. Create Windows Instance 17. glance $ cd /var/lib/libvirt/images $ cp windows7.img /home/user $ glance image-create name=Windows7 public container-format bare disk-format raw progress < ~/windows7.img 18. Dashboard 19. 20. Security group 3389(RDP) 21. , , mstsc
  15. 15. Create Windows Instance [Troble Shooting] 1. openstack dhcp - ipconfig all , dhcp - ipconfig ip 169.254/16(zero-config) : cmd > netsh c interface ipv4 > reset > 2. Ping - mtu $ netsh interface ipv4 show interfaces ( mtu ) $ ping f l 1400 www.google.com (mtu nice mtu ) $ netsh interface ipv4 set subinterface 11 mtu=1400 ( 11 ) (netsh interface ipv4 set subinterface mtu=1400 )
  16. 16. 2015-03-26 [] docs.openstack.org