KVM
by
Robert Anderson
—
last modified
Nov 14, 2011 07:33 PM
Linux Virtualization with KVM
- Fedora 14 notes
- http://www.howtoforge.com/virtualization-with-kvm-on-a-fedora-14-server
Debian notes
install kvm virtualization:
sudo apt-get install kvm
create disks:
kvm-img create -f qcow2 ~/disks/debian603.qcow2 10G kvm-img create -f qcow2 ~/disks/data1.qcow2 10G
install debian to image:
kvm -smp cores=2 -m 4G -net nic \
-net user,hostfwd=tcp::2222-:22,hostfwd=tcp:8888-:80 \
-cdrom Downloads/debian-6.0.3-amd64-businesscard.iso \
-hda ~/disk
~/disks/data1.qcow2 10G
install debian to image:
kvm -smp cores=2 -m 4G -net nic \
-net user,hostfwd=tcp::2222-:22,hostfwd=tcp:8888-:80 \
-cdrom Downloads/debian-6.0.3-amd64-businesscard.iso \
-hda ~/disks/debian603.qcow2 -hdb ~/disks/data1.qcow2
on virtual machine, as root:
apt-get install ssh
on host, add alias to start kvm .bash_aliases:
alias kvm.deb603='kvm -smp cores=2 -m 4G -net nic \
-net user,hostfwd=tcp::2222-:22,hostfwd=tcp::8888-:80 \
-hda ~/disks/debian603.qcow2 -hdb ~/disks/data1.qcow2'
alias kvm.deb603ng='kvm -nographic \
-smp cores=2 -m 4G -net nic \
-net user,hostfwd=tcp::2222-:22,hostfwd=tcp::8888-:80 \
-hda ~/disks/deb603.qcow2 -hdb ~/disks/data1.qcow2'

