Linux - Virtualization and CloudThis forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I am having trouble to install guests out of previously made Guests.
I use KVM and for guests I use LVMs as SWAP and disk
I installed a CentOS guest and mounted it using kpartx and zipped all its contents, preserving numeric owners.
Now when I create a new Guest, I am trying to use the zip from the old machine to simply unzip it and boot.
Before unzipping, I am copying the 512 bytes of the MBR and Partition table from the original guest.
Then I unzip the zip I created after mounting the LVM of the new machine.
When I boot the machine, the console in Virt-Manager shows its hung at StartUp only and the CPU Usage is at 50% of the total Server CPU.
What's all this stuff about the MBR?? if you want to make a new VM from an existing disk image, just take a copy of the disk image and use it under a new VM config. I don't understand what or why you're trying to do this. Might be ignorance on my side, but I have never ever seen any reference to messing with MBR's or partition tables within any form of virtualization.
Also, AFAIK, you don't need any swap under a KVM VM, as it can use memory over subscription and let the host machine swap out the mapped memory to the hosts swap implicitly, so just make the guests memory as large as you need, and don't use a swap partition at all.
resize2fs doesn't work properly? How so? The guest will have no idea what size LV the underlying virtual disk is attached to, so what are we really talking about? resize2fs clearly has nothing to do with LVM so you need to be clearer on the terminology and scope you're talking about. Why is a copy of the disk image not going to work? If you provide a consistent and well managed evironment then you should be able to drop the VM image in really easily to a new qemu config.
I installed the CentOS guest on a 2 GB LVM
Then I made a image of the LVM :
dd if=/dev/vg/centos of=/root/centos.img
Then I created a 10GB LVM and ran the following command :
dd if=/root/centos.img of=/dev/vg/10g
I made the KVM config and booted it without errors.
df now shows 2 GB in the 10GB LVM.
Why is that so ?
I tried resize2fs and still 2 GB!
Any help will be appreciated.
Also I wanted to know who should I shrink the size of the centos.img I made.
Can it be squeezed to just use the space occupied by the OS files ?
It uses only 900MB in the LVM.
But the centos.img is 2.00 GB full as I dd'd it.
Is there a way to dd only the occupied space.