首先要配置br0 这个bridge 网卡模式,保证br0有ip eth0没有ip
iface br0 inet static
address 172.16.17.140
network 172.16.17.0
netmask 255.255.255.0
broadcast 172.16.17.255
gateway 172.16.17.1
bridge_ports eth0
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off
dns-nameservers 172.16.17.1
重启网络服务networking
ubuntu@nbutest:~$ sudo brctl show
[sudo] password for ubuntu:
bridge name bridge id STP enabled interfaces
br0 8000.002186f70663 no eth0
vnet0
virbr0 8000.000000000000 yes
1. 安装了virt-manager
2. 图形创建的console 鼠标 键盘都不能用,无法安装系统
3. 只能使用virt-install 创建了
ubuntu@nbutest:~$ sudo virt-install --prompt
What is the name of your virtual machine? centos
How much RAM should be allocated (in megabytes)? 512
What would you like to use as the disk (file path)? /var/lib/libvirt/p_w_picpaths/rhel.img
How large would you like the disk (/var/lib/libvirt/p_w_picpaths/rhel.img) to be (in gigabytes)? 10
What is the install CD-ROM/ISO or URL? /home/ubuntu/CentOS-6.4-x86_64-bin-DVD1.iso
Starting install...
Allocating 'rhel.img' 100% |=========================| 0 B 00:00
Creating domain... 0 B 00:00
Unable to connect to graphical console: virt-viewer not installed. Please install the 'virt-viewer' package.
Domain installation still in progress. You can reconnect to
the console to complete the installation process.
ubuntu@nbutest:~$ sudo virsh list
Id Name State
----------------------------------
7 centos running
4. 这回用virt-viewer 就可以使用鼠标,键盘了,可以安装系统了。
5. 安装系统比平时安装简单,步骤少,应该是最小安装了,之后配置ip在br0网段的,注意网关是br0