On Wed, Jan 02, 2013 at 08:31:59PM +0800, lei yang wrote:
I don't understand the domain bus slot fuction in below
xml,becase,
this is used when deal with management of host devices that can be
handed to guests via passthrough as <hostdev> elements in the domain
XML.( from
http://libvirt.org/formatnode.html)
I don't see it use passthrough feature, why it has "domain" bus"
slot"
and function here
You're mixing up two different addresses here - host addresses vs guest
addresses. Every device added to QEMU has a guest address of some kind,
typically either PCI or USB based. This specifies where the device
appears to the guest OS. When using host device passthrough, you also
need to specify the address of the host PCI device to assign.
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/kvm/images/disk/vmname_boot.img'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x04' function='0x0'/>
</disk>
<interface type='bridge'>
<mac address='52:54:00:07:ab:b0'/>
<source bridge='br0'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x03' function='0x0'/>
</interface>
These are both guest addresses.
They are important, because when you start/stop guests, you want the
devices to always have the same address. If the address changed, then
some OS like Windows get unhappy and require re-activation.
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-vnc :|