9 月 052013
 

……

启动一个virt-install安装任务并使用参数确定配置

[root@localhost ~]# virt-install --name=CentOS --description="CenOS 6" \
 > --os-type=linux --os-variant=rhel6 \
 > --hvm --ram=1024  --vcpus=1 \
 > --cdrom=/var/lib/libvirt/images/CentOS-6.3-i386-minimal.iso \
 > --disk=/var/lib/libvirt/images/centos.img,size=8 \
 > --network bridge=virbr0 \
 > --graphics vnc,password=12345,port=5920,keymap=us

Starting install...
 Creating domain...                                       |    0 B     00:00
 Cannot open display:
 Run 'virt-viewer --help' to see a full list of available command line options
 Domain installation still in progress. You can reconnect to
 the console to complete the installation process.
 [root@localhost ~]#

查看图形接口的端口监听

[root@localhost ~]# netstat -lutn |grep 5920
 tcp        0      0 127.0.0.1:5920              0.0.0.0:*                   LISTEN
 [root@localhost ~]#

查看新建虚拟机实例的运行状态

[root@localhost ~]# virsh list
 Id    Name                           State
 ----------------------------------------------------
 1     CentOS                        running

[root@localhost ~]#

关于VNC的端口使用范围

VNC port must be a number between 5900 and 65535, or -1 for auto allocation

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)