KVM Virtual machine synchronization can be done through base image
Main operation
1, create a new incremental disk
Qemu-img create-b base.img-f Qcow2 delta.img
2, modify the configuration file
Cp/etc/libvirt/qemu/base.xml/etc/libvirt/qemu/delta.xml
Vi/etc/libvirt/qemu/delta.xml
Modify fields such as
3. Define virtual machine Virsh define/etc/libvirt/qemu
Host is ubuntu16.04, installed KVM, and installed Windows 7 system, initially allocated hard disk space is too small, so consider adding hard disk, the specific operation record as follows.1. Create a hard disk image with the QEMU HDD Image tool qemu-img
$CD/var/lib/libvirt/images/$sudo qemu-img create-f qcow2 extendwin.img 10G
Check the information for the newly created image
$ qemu-img Info extendwin.img
The previous article details the installation configuration of the KVM virtual machine http://msiyuetian.blog.51cto.com/8637744/1707539The following article mainly introduces the basic management of the KVM virtual machineV. Virsh Command Common operation1. Open and log into the sub-machine[Email protected] ~]# Virsh s
Solve the problem that virshconsole cannot connect to the KVM Virtual Machine
As shown in this case, the link to the KVM virtual machine through the virsh console is stuck on this interface, and no operations can be performed.
You can solve this problem by using the following methods.
1. Modify/etc/securetty an
Solve the problem that the virsh console cannot connect to the KVM virtual machine.
As shown in this case, the link to the KVM virtual machine through the virsh console is stuck on this interface, and no operations can be performed.
You can solve this problem by using the following methods.
1. Modify/etc/securet
1. Turn off the virtual machine # try to get the customer to shut downVmagent/vmsh Stop xxxxxxxxxVirsh List--all2. Enter the directory where the virtual machine files are locatedCd/images/xxxxxxxxx3. Increase disk capacityQemu-img Resize disk.img +10g# expansion of the virtual machine disk.img disk File 10G4. Start the virtua
KVM One-click Shell automatically generates a Windows virtual machine, unattended operation scheme is divided into four steps to complete the joint;The first step: Start the startup script, so that the machine can be executed at the start of the script, to complete all the necessary basic operations (such as setting a password, binding Ip , add domain, activate), this step is repeated on a separate machine,
Definition of CPU model:Libvirt extracts several standard types of CPU definitions, which can be found in/usr/share/libvirt/cpu_map.xml."486", "Pentium", "pentium2", "pentiumpro", "coteco", "N270", "pentiumpro", "qemu32 ","Kvm32", "cpu64-rhel5", "cpu64-rhel5", "kvm64", "pentiumpro", "Conroe" "Penryn ","Nehalem", "westmere", "pentiumpro", "cpu64-rhel5", "cpu64-rhel5", "opteron_g1 ","Opteron_g2", "opteron_g3," opteron_g4"The CPU configuration mode can be as follows:CustomBased on the characteristi
To facilitate the use of Virt-manager to create and manage KVM virtual machines. The default is to create a good Windows XP virtual machine, there will be no sound when connected with VNC, the sound is normal when connected with Rdesktop.Checked out some distributions of bugzilla and found a number of related bugs and found solutions on Fedora's wiki (the origina
KVM maps scsi disks to virtual machines. Note: physical machine redhat6.4, but a redhat 5.5 is installed on the Virtual machine. lsscsi cannot be used on the vm. Therefore, the vm Version 5.5 is too low, the kernel cannot be identified. Therefore, we installed a kernel version higher than redhat6.4 to confirm this problem. We found that we can see the disk and sh
Redhat linux KVM Virtual Machine bridging configuration bridge access method www.2cto.com. 1. Create a Bridge under the/etc/sysconfig/network-scripts directory and create a ifcfg-br0 file whose type is set to Bridge: Example: DEVICE = br0BOOTPROTO = staticBROADCAST = broadcast = 255.255.255.0NETWORK = 192.168.110.0ONBOOT = yesGATEWAY = 192.168.110.1TYPE = Bridge2. Bridge the physical interface to the bridge
checked every mounts or180 days, whichever comes first. Use Tune2fs-c or-i to override.Next, build a directory to mount the new hard disk:[[email protected] ~]# mkdir/nd[[email protected] ~]# mkdir/nd[[email protected] ~]# mount/dev/vdb/nd/# get the Uuid[[emai of the hard drive L protected] ~]# Blkid/dev/vdb/dev/vdb:uuid= "A35e0890-3aa6-47a7-921c-c2cb9dd431e6" type= "Ext4"To add a mount to the boot boot:[[email protected] ~]# Cat/etc/fstab # #/etc/fstab# Created by Anaconda on Tue June to 08:5
/mode-listselect1024x768 @60hzd-ipreseed/late_commandnBsp;stringin-targetchsh-s/bin/bash;in-targetechogrub_ Recordfail_timeout=2>>/etc/default/grub;in-target/usr/sbin/update-grubHow to use makevm.sh1965./makevm.sh 1966 Virsh List 1967 SSH [email protected][Email protected]:~/virtualization/preseed# virsh list Id Name State----------------------------------------------------Control24 running CONTROL16 runningOnce installed, the host can ssh directly to the VM for more operations.This article from
Two steps: First step export xml:[[emailprotected] ~]# virsh dumpxml centos02 >12c.xml Second Step disk file [[emailprotected] virhost]# CP Centos02.img 12c.img Look at the differences between the two files: [[emailprotected] ~]# diff/etc/libvirt/qemu/centos02.xml ~/12c.xml 1,10c1,3[[email protected] ~]# Virsh define 12c.xml Domain 12c defined from 12c.xml[email protected] ~]# Virsh start 12cDomain 12c Started[[email protected] ~]# virsh list Id Name State ----------
This time found that the virtual machine can only be started once, if you start again will prompt: Unable to create cgroup for $VM _nameIt was initially thought that cgourp was not mounted, but the Mount command found that the Cgroup had been mounted. Finally in the forum to find the reason:/lib64/rc/sh/cgroup-release-agent.sh This file has the behavior of cleaning the Cgroup directory:
The code is as follows
Copy Code
If
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.