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>
任何幫助將不勝感激。