【问题标题】:python libvirt ESX Driver error File .vmdk was not foundpython libvirt ESX 驱动程序错误 File .vmdk was not found
【发布时间】:2015-12-25 20:29:51
【问题描述】:

我正在尝试使用 python、libvirt 1.2.19 在 vmware vSphere 6.0 上创建一个虚拟机。我正在连接并创建新的虚拟机(它出现在 vSphere 客户端中),但由于以下异常,它无法启动。

libvirt: ESX Driver error : internal error: Could not start domain:
Traceback (most recent call last):
File "/home/three/Downloads/py_scripts/ppp.py", line 129, in <module>
    if dom.create() < 0:
File "/usr/lib/python2.7/dist-packages/libvirt.py", line 866, in create
    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirt.libvirtError: internal error: Could not start domain:
FileNotFound - File /vmfs/volumes/55f98248-00c1a741-e340-000c29b1c8a3/vtest/vtest.vmdk was not found

此虚拟机在 ESXi 服务器上的文件夹包含 3 个文件:vtest.vmx、vtest.vmsd 和 vtest.log。 这是我用来创建此域的 xml 配置:

<domain type='vmware'>
  <name>vtest</name>
  <uuid>cc0a4d56-27bf-82d4-c0a7-ada003b1c8a3</uuid>
  <memory>409600</memory>
  <vcpu>1</vcpu>
  <os>
    <type arch='x86_64' machine='pc'>hvm</type>
    <boot dev='hd'/>
    <boot dev='cdrom'/>
  </os>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <disk type='file' device='disk'>
      <source file='[datastore1] vtest/vtest.vmdk'/>
      <target dev='sda' bus='scsi'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <source file='[datastore1] isos/lubuntu.iso'/>
      <target dev='hda' bus='ide'/>
    </disk>
    <controller type='scsi' index='0' model='lsilogic'/>
    <controller type='ide' index='0'/>    
    <interface type='bridge'>
      <mac address='00:50:56:91:48:c7'/>
      <source bridge='VM Network'/>
    </interface>
  </devices>
</domain>

任何帮助将不胜感激。

【问题讨论】:

    标签: python vsphere libvirt esxi


    【解决方案1】:

    正如你所说的

    此虚拟机在 ESXi 服务器上的文件夹包含 3 个文件:vtest.vmx、vtest.vmsd 和 vtest.log。这是我用来创建此域的 xml 配置:

    您正在尝试查找根本不存在的vtest/vtest.vmdk

    创建 .vmdk 文件并重试。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-09-25
      • 2016-08-21
      • 2016-08-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多