Re: Install KVM Virtual machine with virt-install on a LVM partition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le 26. 04. 12 10:40, Richard W.M. Jones a écrit :
On Thu, Apr 26, 2012 at 10:36:31AM +0200, Arno Gaboury wrote:
Why don't you specify --network? Not needed ?

It depends.  No --network gives you the defaults.
You could also specify: --network bridge=br0

Is graohics spice best than vnc?

Usually yes.

I do not want to use btrfs but ext4, but my host (Archlinux) use
btfrs. Is this the reason I shall add #options="-x btrfs" ? Or shall
I remove?

It's commented out in the script.  Only Fedora would use this option.

What about sparse=false ? Not needed? Obsolete, or not a good solution?

I thought you were using an LV as storage?  There's no choice for LVs
(except with extremely recent versions of LVM that you're unlikely to
be using).

Rich.

Here we go :


#!/bin/bash

#created Thursday April 26
#following Richard W.M.Jones <rjones@xxxxxxxxxx> advices and script
#this script can be changed according your own need. This one will
#install a debian VM called daffodil on a LVM partition, with 2 CPU, 8192 RAM

# Script used to install VMs.
# You have to lvcreate the disk first!
# lvcreate -L sizeG -n $name vg_data

set -e

name=daffodil
cpus="--cpu=host --vcpus=2"
disk="--disk path=/dev/vg0/lv_daffodil"
location="--cdrom /var/lib/libvirt/images/isofiles/debian-6.0.4-amd64-netinst.iso
type="--os-type=linux"
variant="--os-variant=debiansqueeze"
graphics="--graphics spice"
extra="bus=virtio"
network="--network bridge=br0"


virt-install -n $name -r 8192 \
  $cpus $type $variant $disk $location $graphics $extra $network



Hope everything is correctly set up and it can help other users. I realised KVM is not so straightforward and could be very different depending on your source.


[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux