1
我试图在vmware vSphere 6.0上使用python,libvirt 1.2.19创建虚拟机。我正在连接并创建新VM(它出现在vSphere客户端中),但由于下面的例外情况,无法启动。python libvirt ESX驱动程序错误文件.vmdk未找到
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>
任何帮助将不胜感激。