Answer the question
In order to leave comments, you need to log in
How to reduce (replace) the disk of a virtual machine (KVM + LVM)?
At the time of installing the virtual machine, I had the imprudence to use a rather large partition, now there are problems with the lack of space for other machines, as well as with creating a volume backup and archiving it for transfer to another machine.
I created a volume in the host machine, then set it as a disk for a virtual machine, during installation I specify to use it as a disk (in the guest system it is not LVM) on which the installer himself marks the partitions and installs the system.
[email protected]: /# fdisk -l
Disk /dev/vda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders, total 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00059cf1
Device Boot Start End Blocks Id System
/dev/vda1 * 2048 40894463 20446208 83 Linux
/dev/vda2 40896510 41940991 522241 5 Extended
/dev/vda5 40896512 41940991 522240 82 Linux swap / Solaris
Answer the question
In order to leave comments, you need to log in
In vain you did not make additional disks on the host directly, but partitioned them inside. Now you have the easiest way to solve the problem - "on the forehead", make the second screw, which will become new, cling to the virtual machine, copy all the files to it (this stage is from the LiveCD for the system disk), so with all partitions, well, on the system then write grub through chroot (well, or how is your virtual machine boot organized? If the kernel arrives at the host, then grub is not needed), and you will correct /etc/fstab. And in the future, create screws on the host and immediately slip them into the virtual machine, it will be easier;)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question