12.5. Additional Para-virtualized Hardware Configuration


This section will explain how to add additional virtual network or storage to a guest operating system. For more details on configuring network and storage resources on Red Hat Enterprise Linux 5 Virtualization read the document available on Emerging Technologies, Red Hat.com

12.5.1. Virtualized Network Interfaces

Perform the following steps to configure additional network devices for your guest.
Edit your guest configuration file in /etc/xen/YourGuestName replacing YourGuestName with the name of your guest.
The original entry may look like the one below.
vif = [ "mac=00:16:3e:2e:c5:a9,bridge=xenbr0" ]
Copy to Clipboard Toggle word wrap
Add an additional entry to the “vif=” section of the configuration file similar to the one seen below.
vif = [ "mac=00:16:3e:2e:c5:a9,bridge=xenbr0",
    "mac=00:16:3e:2f:d5:a9,bridge=xenbr0" ]
Copy to Clipboard Toggle word wrap
Make sure you generate a unique MAC address for the new interface. You can use the command below.
# echo 'import virtinst.util ; print virtinst.util.randomMAC()' | python
Copy to Clipboard Toggle word wrap
After the guest has been rebooted perform the following step in the guest operating system. Verify the update has been added to your /etc/modules.conf in Red Hat Enterprise Linux 3 or /etc/modprobe.conf in Red Hat Enterprise Linux 4 and Red Hat Enterprise Linux 5. Add a new alias for each new interface you added.
alias eth1 xen-vnif
Copy to Clipboard Toggle word wrap
Now test that each new interface you added make sure it is available inside the guest.
# ifconfig eth1
Copy to Clipboard Toggle word wrap
The command above should display the properties of eth1, repeat the command for eth2 if you added a third interface, and so on.
Now configure the new network interfaces with redhat-config-network on Red Hat Enterprise Linux 3 or system-config-network on Red Hat Enterprise Linux 4 and Red Hat Enterprise Linux 5.

12.5.2. Virtual Storage Devices

Perform the following steps to configure additional virtual storage devices for your guest.
Edit your guest configuration file in /etc/xen/YourGuestName replacing YourGuestName with the name of your guest. The original entry may look like the one below.
disk = [ "file:/var/lib/libvirt/images/rhel5_64_fv.dsk,hda,w"]
Copy to Clipboard Toggle word wrap
Now, add an additional entry for your new physical device, LUN, partition or volume to the “disk=” parameter in the configuration file. Storage entities which use the para-virtualized driver resemble the entry below. The “tap:aio” parameter instructs the hypervisor to use the para-virtualized driver.
disk = [ "file:/var/lib/libvirt/images/rhel5_64_fv.dsk,hda,w",
    "tap:aio:/var/lib/libvirt/images/UserStorage1.dsk,xvda,w" ]
Copy to Clipboard Toggle word wrap
If you want to add more entries just add them to the “disk=” section as a comma separated list.

Note

You need to increment the letter for the 'xvd' device, that is for your second storage entity it would be 'xvdb' instead of 'xvda'.
disk = [ "file:/var/lib/libvirt/images/rhel5_64_fv.dsk,hda,w",
    "tap:aio:/var/lib/libvirt/images/UserStorage1.dsk,xvda,w",
    "tap:aio:/var/lib/libvirt/images/UserStorage2.dsk,xvdb,w" ]
Copy to Clipboard Toggle word wrap
Verify the partitions have been created and are available.
# cat /proc/partitions
major minor  #blocks    name
   3     0   10485760   hda
   3     1     104391   hda1
   3     2   10377990   hda2
 202     0      64000   xvda
 202     1      64000   xvdb
 253     0    8257536   dm-0
 253     1    2031616   dm-1
Copy to Clipboard Toggle word wrap
In the above output you can see the partition or device “xvdb” is available to the system.
Mount the new devices and disks to local mount points and update the /etc/fstab inside the guest to mount the devices and partitions at boot time.
# mkdir /mnt/pvdisk_xvda
# mkdir /mnt/pvdisk_xvdb
# mount /dev/xvda /mnt/pvdisk_xvda
# mount /dev/xvdb /mnt/pvdisk_xvdb
# df /mnt
Filesystem           1K-blocks      Used   Available Use%  Mounted on
/dev/xvda                64000        15       63985   1%  /mnt/pvdisk_xvda
/dev/xvdb                64000        15       63985   1%  /mnt/pvdisk_xvdb
Copy to Clipboard Toggle word wrap
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat