Debian SqueezeにKVM導入 ゲストにDebianSqueezeを

#aptitude install ssh bridge-utils libvirt-bin virt-manager

sshは通信用 libvirtは管理用API virtmanagerは管理ソフト

#adduser user libvirt

ユーザーをlibvirtグループに入れる
でなければ

と警告



Unable to open connection to hypervisor URI'qume:///system':
unable to connection to '/var/run/libvirt/libvirt-sock', libvirtd may need to be started.................

#lvcreate -L 20G -n LV02 VG
ボリュームグループ'VG'に20GBの論理ボリューム'LV02'を作成

#mkfs.ext4 /dev/VG/LV02
上記の論理ボリュームをext4でフォーマット

次にブリッジ作成
vi /ete/network/interfaces



auto lo br0
iface lo inet loopback
allow-hotplug eth0
iface br0 inet static
address 192.168.11.3
netmask 255.255.255.0
network 192.168.11.0
broadcast 192.168.11.255
gateway 192.168.11.1
dns-nameservers 192.168.11.1
bridge_ports eth0
bridge_stp off


再起動で設定反映
/etc/init.d/networking stop
/etc/init.d/networking start

最後にインストール
cd /tmp
wget http://cdimage.debian.or.jp/6.0.6/amd64/iso-cd/debian-6.0.6-amd64-netinst.iso
モリー1GB2CPUの場合
virt-install --connect=qemu:///system -n Name -r 1012 --vcpus=2 --cdrom=/tmp/debian-6.0.6-amd64-netinst.iso --os-type=linux --os-variant=debiansqueeze --disk path=/dev/VG/Ser01,bus=virtio --network bridge:br0 --vnc --hvm --virt-type kvm --accelerate

aptitude install acpid



参考
電・脳・日・記: KVM − ゲストをLVMで ( @ Debian GNU/Linux 6.0 )
DebianにインストールしたKVMの仮想OSで、ブリッジ接続が使えるようにする - Symfowar