lei yang
2013-Jan-02 12:31 UTC
[libvirt-users] can someone explain why the domain, function bus, slot function is used in this xml
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 <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> which originally comes from this blog: http://blog.allanglesit.com/2011/03/kvm-guests-manipulating-libvirt-xml-for-guest-creation/ Any point?
Daniel P. Berrange
2013-Jan-02 13:31 UTC
[libvirt-users] can someone explain why the domain, function bus, slot function is used in this xml
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 hereYou'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 :|
Possibly Parallel Threads
- Live Migration Without Shared Storage
- xen4.0.0 64 bit boot "panic on cpu 0, crc errror"
- xen4.0.0 64 bit boot "panic on cpu 0, crc errror"
- Do we have a tree to support 2.6.34 dom0 kernel
- What''s the different for "dom0_max_vcpus=4 dom0_vcpus_pin" and "dom0_max_vcpus=4" ?