码迷,mamicode.com
首页 > 其他好文 > 详细

kvm 设置vnc远程登录

时间:2015-07-21 16:49:26      阅读:145      评论:0      收藏:0      [点我收藏+]

标签:

sudo virsh edit VM-name
?
<domain type=‘kvm‘>
? <name>VM-name</name>
? <uuid>12111112-9400-f9c1-cf1a-a5cb1fc6bfd8</uuid>
? <memory unit=‘KiB‘>3096576</memory>
? <currentMemory unit=‘KiB‘>3096576</currentMemory>
? <vcpu placement=‘static‘>2</vcpu>
? <os>
? ? <type arch=‘x86_64‘ machine=‘pc-i440fx-trusty‘>hvm</type>
? ? <boot dev=‘cdrom‘/>
? ? <boot dev=‘hd‘/>
? </os>
? <features>
? ? <acpi/>
? ? <apic/>
? ? <pae/>
? </features>
? <clock offset=‘localtime‘/>
? <on_poweroff>destroy</on_poweroff>
? <on_reboot>restart</on_reboot>
? <on_crash>restart</on_crash>
? <devices>
? ? <emulator>/usr/bin/kvm-spice</emulator>
? ? <disk type=‘file‘ device=‘disk‘>
? ? ? <driver name=‘qemu‘ type=‘raw‘/>
? ? ? <source file=‘/var/lib/libvirt/images/win7x86base-clone.img‘/>
? ? ? <target dev=‘hda‘ bus=‘ide‘/>
? ? ? <address type=‘drive‘ controller=‘0‘ bus=‘0‘ target=‘0‘ unit=‘0‘/>
? ? </disk>
? ? <disk type=‘file‘ device=‘cdrom‘>
? ? ? <driver name=‘qemu‘ type=‘raw‘/>
? ? ? <source file=‘/home/username/OS.iso.dir/YLMF_GhostXP_SP3_YN2014_04.iso‘/>
? ? ? <target dev=‘hdc‘ bus=‘ide‘/>
? ? ? <readonly/>
? ? ? <address type=‘drive‘ controller=‘0‘ bus=‘1‘ target=‘0‘ unit=‘0‘/>
? ? </disk>
? ? <controller type=‘usb‘ index=‘0‘>
? ? ? <address type=‘pci‘ domain=‘0x0000‘ bus=‘0x00‘ slot=‘0x01‘ function=‘0x2‘/>
? ? </controller>
? ? <controller type=‘pci‘ index=‘0‘ model=‘pci-root‘/>
? ? <controller type=‘ide‘ index=‘0‘>
? ? ? <address type=‘pci‘ domain=‘0x0000‘ bus=‘0x00‘ slot=‘0x01‘ function=‘0x1‘/>
? ? </controller>
? ? <interface type=‘network‘>
? ? ? <mac address=‘52:54:00:db:23:80‘/>
? ? ? <source network=‘ovs-br4‘/>
? ? ? <model type=‘rtl8139‘/>
? ? ? <address type=‘pci‘ domain=‘0x0000‘ bus=‘0x00‘ slot=‘0x03‘ function=‘0x0‘/>
? ? </interface>
? ? <serial type=‘pty‘>
? ? ? <target port=‘0‘/>
? ? </serial>
? ? <console type=‘pty‘>
? ? ? <target type=‘serial‘ port=‘0‘/>
? ? </console>

? ? <input type=‘tablet‘ bus=‘usb‘/>

? ? <input type=‘mouse‘ bus=‘ps2‘/>

? ? <input type=‘keyboard‘ bus=‘ps2‘/>

? ? <graphics type=‘vnc‘ port=‘5901‘ autoport=‘no‘ listen=‘0.0.0.0‘ keymap=‘en-us‘ passwd=‘passwd‘>

? ? ? <listen type=‘address‘ address=‘0.0.0.0‘/>

? ? </graphics>

? ? <sound model=‘ich6‘>

? ? ? <address type=‘pci‘ domain=‘0x0000‘ bus=‘0x00‘ slot=‘0x04‘ function=‘0x0‘/>

? ? </sound>

? ? <video>

? ? ? <model type=‘vga‘ vram=‘9216‘ heads=‘1‘/>

? ? ? <address type=‘pci‘ domain=‘0x0000‘ bus=‘0x00‘ slot=‘0x02‘ function=‘0x0‘/>

? ? </video>

? ? <memballoon model=‘virtio‘>

? ? ? <address type=‘pci‘ domain=‘0x0000‘ bus=‘0x00‘ slot=‘0x05‘ function=‘0x0‘/>

? ? </memballoon>

? </devices>

</domain>

看完这个配置,你应该知道:?

  1. 用TightVNC Viewer连接server:1,
  2. 用密码passwd登录,

kvm 设置vnc远程登录

标签:

原文地址:http://www.cnblogs.com/xuguan/p/4664618.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!