我正在尝试使用python,libvirt 1.2.19在vmware vSphere 6.0上创建虚拟机。我正在连接并创建新VM(它出现在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服务器上此VM的文件夹包含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>
任何帮助将不胜感激。
答案 0 :(得分:0)
如你所说
ESXi服务器上此VM的文件夹包含3个文件:vtest.vmx,vtest.vmsd和vtest.log。这是我用来创建这个域的xml配置:
您正试图找到根本不存在的vtest/vtest.vmdk
。
创建.vmdk文件,然后重试。