[virt-tools-list] Install KVM Virtual machine with virt-install on a LVM partition
arnaud gaboury
arnaud.gaboury at gmail.com
Wed Apr 25 10:27:36 UTC 2012
Hello,
I am far from an expert, and I am trying to build a virtual machine
(debian squeeze) on my Arch 64 bits host. The VM will serve as a
server with usual services (http, mail, ftp, media server etc). This
is only for my own purpose and I do it as a hobby.I have no obligation
to success, and more important I want to understand everything i do. I
have some doubts, so why my post here.
I want to install the VM on a LVM partition.
-I first create successfully a LVM partition on /dev/sda4
$fdisk -l /dev/sda
...
/dev/sda4 1925115904 2949116309 512000203 8e LVM Linux
...
I will install the VM (named "daffodil") on a 200G Logical Volume on groupe vg0
$ lvcreate –n lv_daffodil –L 200G vg0
Logical volume “lv_daffodil” created
Now I need to create the VM. I want to use virt-install IN COMMAND
LINE. After days an days of reading (and headache), here is what i
think is the correct command :
virt-install --connect qemu:///system --name=daffodil --ram 8192 --cpu host
--disk path=/dev/vg0/lv_daffodil,size=200,bus=virtio,sparse=false,format=raw
--cdrom /var/lib/libvirt/images/isofiles/debian-6.0.4-amd64-netinst.iso
--description="daffodil (debian squeeze) - vm guest on host magnolia"
--graphics vnc --os-type=linux --os-variant=debiansqueeze
--network bridge:br0 --video=vga --hvm --accelerate
So my questions :
Is the command correct and academic?
I think size=200 is maybe not needed, as the LV has already be created. Right?
format=raw seems weird to me and not needed. Right?
My host has 16G RAM. Shall I put 16 as --ram argument or stay with 8 ?
How about the filesystem? I want an ext4. Shall I create it on
lv_daffodil BEFORE the install or will I do it under the install
process when partitioning?
Any advantage in creating smaller than 200G logical volume, even if I
want my VM have enough space (The whole HD is 2T)?
Not sure about the --accelerate argument
Any hint for optimization?
As a n00b ++, will I be able to manage SELinux on my server, as it
seems a litle bit tricky?
what about --noautoconsole argument?
Thank you for your help and knowledge.
More information about the virt-tools-list
mailing list