https://help.ubuntu.com/community/KVM/CreateGuests
Creating virtual machines
Now that KVM is installed, let’s see how we create our first VM. This can be done using:
virt-manager: a GUI tool virt-install, a python script developed by Red Hat ubuntu-vm-builder, developed by Canonical.
Ubuntu-vm-builder is probably the best tool to use if you want to create VMs running Ubuntu JEOS 8.04, as the install is entirely scripted (very fast).
专注 Ubuntu-vm-builder follow this guide to test
https://www.youtube.com/watch?v=0bbYA_PaLEo
https://jaredkipe.com/blog/programming/general/tag/kvm
测试成功了 Ubuntu-vm-builder
使用 如下command
sudo ubuntu-vm-builder kvm trusty --domain mydomain.com --dest demo1 --hostname demo1 --mem 1024 --cpus 4 --user localadmin --pass Temp2014 --bridge virbr0 --ip 192.168.122.101 --mask 255.255.255.0 --net 192.168.122.0 --bcast 192.168.122.255 --gw 192.168.122.1 --dns 192.168.122.1 --components main,universe --addpkg acpid --addpkg openssh-server --addpkg linux-p_w_picpath-generic --libvirt qemu:///system ;
我没有像教程里 用br0 做bridge 使用的是 virbr0
安装好后
virsh start demo1
在使用 arp -an 确定是IP 地址是不是 192.168.122.101
因为你可以用 virsh edit demo1 进入到demo XML 查看 MAC 地址信息
https://rwmj.wordpress.com/2010/10/26/tip-find-the-ip-address-of-a-virtual-machine/
之后我 ssh 到demo1 里 测试网络是否连通
root@demo1:/home/localadmin# wget vg.no
–2015-03-26 09:57:55– http://vg.no/
Resolving vg.no (vg.no)… 195.88.55.16, 195.88.54.16, 2001:67c:21e0::16
Connecting to vg.no (vg.no)|195.88.55.16|:80… connected.
另一个link:
转载于:https://blog.51cto.com/christhai/1753658