Re: Create VMWare ESXi domain via virsh error(error: this function is not supported by the connection driver: virDomainCreateXML)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/12/2 mop amg <amghostman@xxxxxxxxx>:
> Hi, Dear.
> I have two questions ask for help:
> my virt-manager and libvirt version is :
> linux-vaan:~ # rpm -q libvirt
> libvirt-0.8.5-1.2.i586
> linux-vaan:~ # uname -a
> Linux linux-vaan 2.6.34-12-desktop #1 SMP PREEMPT 2010-06-29 02:39:08 +0200
> i686 i386 GNU/Linux
> linux-vaan:~ # rpm -q virt-manager
> virt-manager-0.8.5-3.1.i586
> linux-vaan:~ # cat /etc/SuSE-release
> openSUSE 11.3 (i586)
> VERSION = 11.3
>
> virsh # version
> Compiled against library: libvir 0.8.5
> Using library: libvir 0.8.5
> Using API: ESX 0.8.5
> Running hypervisor: ESX 4.1.0
>
>
> question 1 :
> When I try to create a vmware esxi domain from virsh like this :
> ÂÂÂÂÂÂ create --file /work/dom1.x
> Âthere is a error message :
> ÂÂÂÂÂÂ error: Failed to create domain from /work/dom1.xml
> ÂÂÂÂÂÂ error: this function is not supported by the connection driver:
> virDomainCreateXML
> it seems dosen't support create esxi domain, but the
> http://libvirt.org/hvsupport.html show that is supported after â 0.7.0

virDomainCreateXML and virDomainCreate are different.
virDomainCreateXML creates a new transient domain and starts it,
virDomainCreate starts a persistent domain that has been created using
virDomainDefineXML before.

A transient domain will automatically go away when it is stopped. A
persistent domain won't and has a persistent config stored to disk.

ESX(i) doesn't have this transient semantic for it's domains,
therefore libvirt can't support virDomainCreateXML for it.

In order to create a new ESX(i) domain you need to define it using
virDomainDefineXML. In virsh use 'define /work/dom1.x' instead of
'create --file /work/dom1.x' to create a new domain, then use 'start
dom1' to start it.

> or create via virt-install
>
> ÂÂÂÂÂÂÂÂÂ linux-vaan:~ # virt-install
> --connect=esx://root@xxxxxxxxxxxxx/?no_verify=1 -n rhel5 -r 512 --vcpus=1
> --nodisks bridge=vmk0 --network bridge=vmk0 --pxe
>
> ÂÂÂÂÂÂÂÂÂ Enter root's password for 192.168.8.162:
>
>
>
> ÂÂÂÂÂÂÂ Â Starting install...
>
> ÂÂÂÂÂÂÂÂÂ ERRORÂÂÂ this function is not supported by the connection driver:
> virDomainCreateXML
>
> how to fix it ?

Unfortunately virt-install doesn't work for ESX(i) yet. One reason is
that it uses virDomainCreateXML, but there are some other things that
need to be implemented or solved before virt-install will be able to
install an ESX(i) guest.

> dom1.xml
> <domain type='vmware'>
> Â <name>dom1</name>
> Â <memory>524288</memory>
> Â <currentMemory>524288</currentMemory>
> Â <vcpu>1</vcpu>
> Â <os>
> ÂÂÂ <type arch='i686'>hvm</type>
> Â </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] rhel5/rhel5_2.vmdk'/>
> ÂÂÂÂÂ <target dev='sda' bus='scsi'/>
> ÂÂÂÂÂ <address type='drive' controller='0' bus='0' unit='0'/>
> ÂÂÂ </disk>
> ÂÂÂ <controller type='scsi' index='0' model='lsilogic'/>
> ÂÂÂ <interface type='bridge'>
> ÂÂÂÂÂ <mac address='00:0c:29:51:f1:1c'/>
> ÂÂÂÂÂ <source bridge='VM Network'/>
> ÂÂÂ </interface>
> Â </devices>
> </domain>

This domain config looks good and should work assuming '[datastore1]
rhel5/rhel5_2.vmdk' exists. You can use virsh vol-create to create it
if it doesn't.

> question 2:
> vol-clone failed
>
> virsh # vol-clone --pool datastore1 rhel5/rhel5.vmdk rhel5/rhel5_2.vmdk
>
> error: Failed to clone vol from rhel5/rhel5.vmdk
>
> error: this function is not supported by the connection driver:
> virStorageVolCreateXMLFrom
>

virStorageVolCreateXMLFrom wasn't implemented for ESX(i) until now :)

I just implemented it and it'll probably be part of libvirt 0.8.7.

Matthias

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]