Red Hat ENTERPRISE LINUX 5 - VIRTUALIZATION GUIDE Guide d'installation Page 326

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 361
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 325
mac = [ 0x00, 0x16, 0x3e,
random.randint(0x00, 0x7f),
random.randint(0x00, 0xff),
random.randint(0x00, 0xff) ]
return ':'.join(map(lambda x: "%02x" % x, mac))
#
print randomMAC()
An o t h er met ho d t o g en erat e a n ew MAC f o r yo u r g u est
You can also use the built-in modules of python-virtinst to generate a new MAC address and
UUID for use in a guest configuration file:
# echo 'import virtinst.util ; print\
virtinst.util.uuidToString(virtinst.util.randomUUID())' | python
# echo 'import virtinst.util ; print virtinst.util.randomMAC()' | python
The script above can also be implemented as a script file as seen below.
#!/usr/bin/env python
# -*- mode: python; -*-
print ""
print "New UUID:"
import virtinst.util ; print virtinst.util.uuidToString(virtinst.util.randomUUID())
print "New MAC:"
import virtinst.util ; print virtinst.util.randomMAC()
print ""
33.10. Limit net work bandwidt h for a Xen guest
In some environments it may be required to limit the network bandwidth available to certain guests.
This can be used to implement basic Quality of Service on a host running multiple virtual machines.
By default, the guest can use any bandwidth setting available which your physical network card
supports. The physical network card must be mapped to one of virtual machine's virtual network
interfaces. In Xen the “ rate parameter part of the VIF entries can throttle guests.
This list covers the variables
rate
The rate= option can be added to the VIF= entry in a virtual machine configuration file to
limit a virtual machine's network bandwidth or specify a specific time interval for a time
window.
t ime win d o w
The time window is optional to the rate= option:
The default time window is 50ms.
A smaller time window will provide less burst transmission, however, the replenishment rate
and latency will increase.
The default 50ms time window is a good balance between latency and throughput and in
most cases will not require changing.
Examples of rate parameter values and uses.
Red Hat En t erp rise Lin ux 5 Virt ualizat ion Guid e
322
Vue de la page 325
1 2 ... 321 322 323 324 325 326 327 328 329 330 331 ... 360 361

Commentaires sur ces manuels

Pas de commentaire