Installation guide

<capability type='virt_functions'>
</capability>
</capability>
</device>
2. Ad d t h e d evice
Use the PCI identifier output from the vi rsh no d ed ev command as the value for the --
host-device parameter.
virt-install \
--name=guest1-rhel6-64 \
--disk path=/var/lib/libvirt/images/guest1-rhel6-64.img,size=8 \
--nonsparse --graphics spice \
--vcpus=2 --ram=2048 \
--location=http://example1.com/installation_tree/RHEL6.1-Server-
x86_64/os \
--nonetworks \
--os-type=linux \
--os-variant=rhel6 \
--host-device=pci_0000_01_00_0
3. Co mp let e t h e in st allat io n
Complete the guest installation. The PCI device should be attached to the guest.
12.4 . Det aching an assigned PCI device
When a host PCI device has been assigned to a guest machine, the host can no longer use the
device. Read this section to learn how to detach the device from the guest with vi rsh or virt -
manag er so it is available for host use.
Pro ced u re 12.6 . Det ach in g a PCI device f rom a g u est wit h virsh
1. Det ach t h e d evice
Use the following command to detach the PCI device from the guest by removing it in the
guest's XML file:
# virsh detach-device name_of_guest file.xml
2. Re- at t ach t h e d evice to t h e h o st ( o p t io nal)
If the device is in managed mode, skip this step. The device will be returned to the host
automatically.
If the device is not using managed mode, use the following command to re-attach the PCI
device to the host machine:
# virsh nodedev-reattach device
For example, to re-attach the pci _0 0 0 0 _0 1_0 0 _0 device to the host:
Chapt er 1 2 . PCI device assignment
103