idea, the method of mounting is to add a disk, there is no way Then stretching the hard disk. Qemu-img provides a resize command, but the command is simply simple to pull up or down a raw img image size, but the partition can not be modified. I need to expand the partitions in them. It is quite coincidental that Red Hat offers this plugin for a while. This method is extended by the plug-in virt-resize that comes with Red Hat. The command first gets the original partition information and other file information. Then repartition and format the new image. Finally, copy the files in the original image to the new file system, and replace the original image with the newly expanded image. Because it actually uses the copy method, it takes a long time. If it is a large image, it is not recommended to use this method
specific solution. Prerequisites Install the libguestfs-tools toolkit. Close the virtual machine #yum -y install libguestfs-tools A, create a new large image #qemu-img create -f raw test_extend.img 15G Note that the img size here is the total size you need to expand B, use virt-resize to pull Lition partition #virt-resize —expand /dev/vda1 /var/lib/libvirt/images/test.img /var/lib/libvirt/images/test_new.img Note that this time is very long, please be patient. Use the new extended image instead of the original image #mv /var/lib/libvirt/images/test_new.img /var/lib/libvirt/images/test.img D, start the virtual machine #virsh start test Expand the completion, virt-resize Advantage: Ability to extend specific partitions in a virtual machine. And can expand the windows image. You do not need to log in to the virtual machine to do anything. Disadvantages: need to shut down when expanding. For large mirrors, the expansion time is longer. Second, for LVM format virtual machines If your hard disk format supports LVM. Then your hard drive expansion will be much easier, LVM supports online expansion of hard drives. Quite convenient. Method steps: #lvcreate -L 40G -n lv_vm_test1 VolGroup #virsh attach-disk test /dev/mapper/VolGroup/lv_vm_test vdb Note that there may be permission issues. Please modify the permissions of /dev/mapper/VolGroup/lv_vm_test first, the virtual machine can be mounted. Enter the virtual machine operation: #pvcreate /dev/vdb #vgextend VolGroup /dev/vdb #vgs #lvextend -l +100%FREE /dev/VolGroup/lv_root #resize2fs -p /dev/VolGroup/lv_root Advantages: Extended time is very Fast, support for dynamic expansion. Disadvantages, not suitable for the expansion of the window.
The original use of Tomcat in Linux does not use the newly created user created by the non-ROOT perm
This article mainly introduces the DB2 database in the inux installation process detailed, the step
This period win8.1 Mac OS X 10.9 Mavericks Two operating systems almost simultaneously released, i
JFS was developed by IBM and originally appeared on the AIX operating system, which provides a log-b
Apache prefork and worker working mode introduction
Linux kernel service routines and system call interface
How to use ReiserFS file system in Linux environment
Exchange 2010 removal and reinstallation issues
More than 80 common Linux commands and tools
Nginx how to configure gzip compression
Linux to view a port usage and kill
The meaning of X-Cache and X-Cache-Lookup in Squid
Microsoft will pre-install Skype
Linux startup script learning tutorial
Azure High Availability Architecture Design (LB and Traffic Manager)
Camera application in Win8 cannot use camera
Win10 how to solve the splash screen when playing League of Legends?
Win7 hard disk can not be formatted solution
Is the Win10 Recycle Bin icon fixed to the taskbar? How about in the tray?
How can I handle the Windows 7 system recycle bin?
Windows Server 2008 initial login password modification skills
Windows 8 Build 7955 new features summary
Unable to unblock Prohibited Group Policy Object Editor
The perfect solution for sharing files under Win8.1 system
Win10 Redstone Preview Edition 14279 Express Edition Repair Content Summary