Create an instance from ISO, generate a snapshot of an instance, create a mirror (based on the OpenStack kilo platform, KVM virtualization)

Source: Internet
Author: User

ISO Create an instance
Creating an instance from ISO has two key configurations: Cloud host type flavor and ISO mirroring parameters.
Cloud Host Type: OpenStack when you create a virtual machine instance using an ISO image, the root disk in the selected cloud Host type flavor (disk) is set to CDROM, the CD-ROM device that is the ISO boot, the installation source for the OS, and the temporary disk (os-flv-ext-data : ephemeral) as the system disk for the virtual machine instance as the installation target. Therefore, when configuring the cloud host type flavor for ISO boot, you need to set the root disk value, can be slightly about the ISO image file, 5g/10g can be, according to the field configuration, temporary disk as the system startup disk, need to set the size according to business needs, generally more than 100G.
ISO image parameters: ISO image parameters are set according to the type of virtualization such as Kvm/vsphere/xen, the specific parameters can be referenced http://docs.openstack.org/cli-reference/content/chapter_ Cli-glance-property.html the settings. For centos6.7 operating system, KVM virtualization, need to set properties for Os_distro, Os_version, Hw_boot_menu, specific settings command glance Image-update, detailed use please use glance help Image-update View
After you set the cloud host type and the ISO image properties correctly, you can normally start the virtual machine and complete the installation of the operating system. For Windows operating system, the default does not recognize the disk, you need to load the installation of the corresponding Virtio driver, specific OS version please google.

ISO Virtual machine instance generates QCOW2 snapshot
The Qcow2 critical issue that is generated from an ISO virtual machine instance is the order in which the OS boot source of the virtual machine needs to be addressed. Currently there is no open BIOS configuration option on KVM virtualization (this may be the author did not find the entrance, if you have to inform the author, kneeling Xie), the first boot option for the virtual machine from CD/DVD boot. So in order to solve the virtual machine boot order, we need eject CDROM, can use the following methods:
Use Virsh attach-disk empty device, eject CDROM
Locate the physical host of the virtual machine where you want to generate the snapshot, and then locate the virtual machine ID by executing the following command
#virsh List
Locate the ID of the corresponding virtual machine. Execute the following command to eject the CDROM
#virsh attach-disk--type cdrom--mode readonly "" Hda--live
35 is the ID of the virtual machine, which can be queried by Virsh list. At this point, you can perform reboot restart virtual machine validation in the virtual machine, and you can discover that the virtual machines directly start the OS

generate a virtual machine snapshot of CentOS
Generating a CentOS snapshot is primarily used as a mirror template to quickly start a virtual machine, eliminating the time-consuming operation of installing an operating system and automating configuration. From the practice, it is necessary to solve the problem of increasing the name of the network card, for example, the newly generated virtual machine NIC fails to start, the NIC name becomes eth1, etc. It can be solved by the following methods:
A, remove the specific factors about the NIC/etc/sysconfig/network-scripts/ifcfg-eth0, such as Mac parameters, UUID, it is recommended to keep only the following parameters:
Device=eth0
Type=ethernet
Onboot=yes
Bootproto=dhcp
Nm_controlled=yes
b, delete/etc/udev/70-persistent-net.rules, avoid the image generated by the virtual machine NIC name incremented to eth1
Virtual machine snapshots of the Ubuntu operating system are recommended to refer to CentOS requirements for adaptation modifications.

The Windows operating system's virtual machine snapshots are primarily configured with firewalls and Remote Desktop services, and allow remote access, depending on how Google


Create an instance from ISO, generate a snapshot of an instance, create a mirror (based on the OpenStack kilo platform, KVM virtualization)

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.