Debian6 kvm Virtual Machine Installation

Source: Internet
Author: User
Tags svm


Debian6 kvm installation VM check whether the CPU supports hardware Virtualization (VT technology) www.2cto.com 1root @ debian :~ # Egrep '(vmx | svm)' -- color = always/proc/cpuinfo2flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat limit 36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm limit pebs bts rep_good limit pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 popcnt lahf_lm tpr_shadow vnmi flexpriority ept v Pid 3 flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat limit 36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm limit pebs bts rep_good limit pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 popcnt lahf_lm tpr_shadow vnmi flexpriority ept vpid if nothing is printed, indicates that the CPU does not support hardware virtualization. However, you still need to determine whether the virtualization technology is enabled in the BIOS. If the SVM flag is returned, your processor supports AMD-V. The returned VMX flag indicates that your processor supports INTEL-VT. In addition, BISO also needs to enable virtualization support. Install the kvm package 1root @ debian at www.2cto.com :~ # Atp-get install qemu-kvm 1root @ debian :~ # Dpkg-l | grep kvm2ii qemu-kvm 0.12.5 + dfsg-5 + squeeze3 Full virtualization alization on x86 hardwaredebian6 package name qemu-kvm, debian5 package name kvm configuration bridge network: 01root @ debian :~ # Vim/etc/network/interfaces02auto lo03iface lo inet loopback04 05 auto scaling eth0 inet manual07 08 auto scaling br0 inet static10 address ?netmask =255.255.012 gateway provided 255.255.255.255.255.255.is the bridge forward delay time, in seconds, default 15. bridge_hello is the bridge hello time, in seco Nds, default 2. bridge_maxage is the bridge's maximum message time, in seconds, default is 20. bridge_stp controls the spanning tree protocol, on or off. default is off, and is recommended to stay that way. restart the NIC to create the vm image 1root @ debian:/opt # kvm-img create-f qcow2 vm. there are two common formats for img 5G: qcow2 for qemu, and qcow2 for increasing file formats. the other is the raw format, which is actually a continuous area on the disk. There are two ways to create a vm: Use the kvm command to create 1root @ debian:/opt # kvm-m 2048-drive file = vm. img-cdrom/tmp/debian-6.0.2.1-amd64-CD-1.iso-vnc 10.1.6.175: 1-boot d use vnc for connection installation, after installation, change the boot sequence to hard disk boot, use vnc connection configuration again. Related settings: 1root @ debian:/opt # kvm-m 2048-drive file = vm. img-cdrom/tmp/debian-6.0.2.1-amd64-CD-1.iso-vnc 10.1.6.175: 1-boot c the second method uses libvirt to manage virtual machines libvirt supports management of mainstream virtual machines such as kvm and xen. Install libvirt 1root @ debian :~ # Apt-get install libvirt-bin uninstall instlibvirt-bin the programs for the libvirt libraryvirtinst Programs to create and clone virtual machines using INST is a shell form of virt-install to manage settings/etc/libvirt /libmongod. set the listening address and modify/etc/libvirt/qemu. set the vnc listening address in the vnc_listen parameter of conf. Restart libvirt:/etc/init. d/libvirt-bin restart virt-install the VM: 1root @ debian:/opt # virt-install-d-n vm_kvm-r 2048 -- disk path =/opt/debian6.img, bus = virtio, cache = none -- network bridge = br0, model = virtio -- vnc -- cdrom =/tmp/after the debian-6.0.2.1-amd64-CD-1.iso command is executed, A vm_kvm.xml configuration file is generated in the/etc/libvirt/qemu directory for use when starting a virtual machine. The configuration file can be modified and can be installed through VNC. Virt-install parameters: -n -- name = client Virtual Machine name-r -- ram = memory allocated by client Virtual Machine-u -- uuid = client UUID -- vcpus = 2 client vcpu count-v -- hvm full virtualization- p -- paravirt semi-virtualization-l -- location = localdir installation source -- vnc use vnc-c -- cdrom = optical drive installation path-s -- file-size = disk image size unit: GB -f -- file = file used as the disk image -- disk = use different options as the disk installation media

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.