Revision 31a2b501 lib/hypervisor/hv_kvm.py

b/lib/hypervisor/hv_kvm.py
1999 1999
    utils.EnsureDirs([(self._InstanceNICDir(instance.name),
2000 2000
                     constants.RUN_DIRS_MODE)])
2001 2001
    for nic_seq, tap in enumerate(taps):
2002
      utils.WriteFile(self._InstanceNICFile(instance.name, nic_seq),
2003
                      data=tap)
2002
      nic = kvm_nics[nic_seq]
2003
      self._WriteInstanceNICFiles(instance.name, nic_seq, nic, tap)
2004 2004

  
2005 2005
    if vnc_pwd:
2006 2006
      change_cmd = "change vnc password %s" % vnc_pwd
......
2204 2204
      args = "virtio-net-pci,bus=pci.0,addr=%s,mac=%s,netdev=%s,id=%s" % \
2205 2205
               (hex(device.pci), device.mac, kvm_devid, kvm_devid)
2206 2206
      cmds += ["device_add %s" % args]
2207
      utils.WriteFile(self._InstanceNICFile(instance.name, seq), data=tap)
2207
      self._WriteInstanceNICFiles(instance.name, seq, device, tap)
2208 2208

  
2209 2209
    self._CallHotplugCommands(instance.name, cmds)
2210 2210
    self._VerifyHotplugCommand(instance.name, device, dev_type, True)

Also available in: Unified diff