Find the answer to your Linux question:
Results 1 to 4 of 4
Oddly I couldn't see a Virtualization forum so I have put this here, feel free to move it if it is more likely to be answered elsewhere. I have been ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2009
    Posts
    1

    KVM Hypervisor and Guest OS setup? Help!


    Oddly I couldn't see a Virtualization forum so I have put this here, feel free to move it if it is more likely to be answered elsewhere.

    I have been using Linux for the past 3 or so years, either running it for workstations or servers, and now I want to set up a server for Virtualization. I have been doing a fair bit of research about the different ways of doing this, and I have decided to go with KVM. I usually use CentOS, but will have to use Debian to use KVM. I just have a few questions about the best way of setting it up.

    We have a pretty powerful server* which we are planning on collocating to a data centre and running web servers from the VMs. Virtualization seems like the best way to allow for simpler administration, and also allow us get the most out of our server's resources.

    *Intel Xeon X3230 Quad Core, 8GB Ram, 4x 15k 147gb SAS (RAID 6)

    What is the best way to set this up then? I was thinking we could install Debian as the Host/Hypervisor over the whole drive, and give it a 16GB swap partition. Then I guess when the VMs are installed they live on the Debian drive as a file, or do they need their own partitions?

    Are the guest OS's capable of using the Host's swap space? Its bad enough losing 16GB as a swap partition to the host OS, but please don't tell me I need to supply the VMs with their own swap partition aswell - im curious as to if the server will ever need to use swap space as it has alot of ram, let alone require extra swap for each VM too?

    KVM is still very new, but does anyone know any good books/resources out there? The virtualization books I have seen don't seem to cover KVM, just Xen and others.

  2. #2
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    I haven't used kvm, but usually the guest OS requires its own swap space that is allocated on its own virtual disk, I would also add that 16gb for swap is OVERKILL, if you ever needed to use that much swap, your system would be crawling, your system will crawl at 1gb swap, at which point, with ram being so cheap, you should just purchase more ram.

  3. #3
    Just Joined! deakons's Avatar
    Join Date
    Mar 2009
    Location
    New York
    Posts
    16
    You will not need to create separate partitions to run the VM. You can do something like this.

    Code:
    qemu-img create -f qcow FILENAME SIZE
    Then when you initially run the kvm set it to boot off of the distro installation (either CD or iso) and the installer can format the image for you. Depending upon what you are doing, you can modify how much memory is passed to the guest VM at runtime for the KVM. Personally, I have used KVM for kernel testing and have never needed swap.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,763
    Quote Originally Posted by lukea View Post
    Oddly I couldn't see a Virtualization forum so I have put this here, feel free to move it if it is more likely to be answered elsewhere.

    I have been using Linux for the past 3 or so years, either running it for workstations or servers, and now I want to set up a server for Virtualization. I have been doing a fair bit of research about the different ways of doing this, and I have decided to go with KVM. I usually use CentOS, but will have to use Debian to use KVM. I just have a few questions about the best way of setting it up.

    We have a pretty powerful server* which we are planning on collocating to a data centre and running web servers from the VMs. Virtualization seems like the best way to allow for simpler administration, and also allow us get the most out of our server's resources.

    *Intel Xeon X3230 Quad Core, 8GB Ram, 4x 15k 147gb SAS (RAID 6)

    What is the best way to set this up then? I was thinking we could install Debian as the Host/Hypervisor over the whole drive, and give it a 16GB swap partition. Then I guess when the VMs are installed they live on the Debian drive as a file, or do they need their own partitions?

    Are the guest OS's capable of using the Host's swap space? Its bad enough losing 16GB as a swap partition to the host OS, but please don't tell me I need to supply the VMs with their own swap partition aswell - im curious as to if the server will ever need to use swap space as it has alot of ram, let alone require extra swap for each VM too?

    KVM is still very new, but does anyone know any good books/resources out there? The virtualization books I have seen don't seem to cover KVM, just Xen and others.
    16GB of swap is not needed/recommended - in *any* situation I can think of. If you read up on what swap is and how it's used, you can make a better estimation of an appropriate size (or if any is needed at all.)

    There are existing threads on LF about swap space.

    Re: KVM Setup

    When I go to Google and type in "linux kvm" Google autofills "howto", "virtualization", "tutorial", etc. - many links are available.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •