Hi, Is virsh able to access the VMX config of a virtual machine running on a esxi host? I would like to take backups of my virtual machine configs and the doku section "Converting from VMware VMX config to domain XML config" (http://libvirt.org/drvesx.html) comes close to this - but does not tell how to get access to the vmx file. I would prefer a solution where ssh access to the esxi host can stay disabled. best regards, frank -- Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief! Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail
2010/9/17 frank dirks <frankdirks at gmx.net>:> Hi, > > Is virsh able to access the VMX config of a virtual machine running on a > esxi host? > > > I would like to take backups of my virtual machine configs and the > doku section > "Converting from VMware VMX config to domain XML config" > (http://libvirt.org/drvesx.html) comes close to this - but does not tell how > to get access to the vmx file. I would prefer a solution where ssh access to > the esxi host can stay disabled. > > best regards, frankvirsh (and libvirt) don't expose the .vmx files, so there is no way to access them directly trough libvirt. You could get the domain XML config and convert it to .vmx format using domxml-to-native, but that doesn't give you the original .vmx file. The .vmx files are stored in the datastore attached to the ESX(i) server. You don't need SSH to access the datastore content, An example, you can access the .vmx file of the virtual machine <vm> on <esxi-server> stored in <datastore> using this URL: https://<esxi-server>/folder/<vm>/<vm>.vmx?dcPath=ha-datacenter&dsName=<datastore> You can also open https://<esxi-server>/folder/ in your web browser and navigate through the content. Matthias
Hi, ...> > However, it sounds like that's not working for you. > > That could be a bug. Would you be ok with trying it again, then pasting > the error message here for us to see? >- virsh -c esx://esx1.local/?no_verify=1 dominfo vmtest.local --> works OK - virsh -c esx://esx1.local/?no_verify=1 dumpxml vmtest.local gives the error message: error memory conf:90: expecting an assignment (+ debug logs attached to this mail) regards, frank -- GMX DSL SOMMER-SPECIAL: Surf & Phone Flat 16.000 f?r nur 19,99 Euro/mtl.!* http://portal.gmx.net/de/go/dsl -------------- next part -------------- A non-text attachment was scrubbed... Name: virsh.log Type: text/x-log Size: 5229 bytes Desc: not available URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20100921/688053b4/attachment.bin>
Hi, you are right - the problem is specific to only that one vmx file - for other virtual machines dumpxml is working, as i found out. i am using esxi 4.1.0 and virsh 0.8.4. the machine was created using vsphere client, and was cloned and renamed afterwards - maybe that was the problem ... regards, frank> > Hm, that's strange. The .vmx config seems to be malformed. > > What libvirt version and what ESXi version do you use? > > How did you create the vmtest.local guest and can you start it? > > Could you show us the original .vmx config file? You can get if by > opening https://esx1.local/folder/ in a web browser and clicking > through the directory tree until you get to vmtest.local.vmx. > > Matthias-- Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief! Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail -------------- next part -------------- A non-text attachment was scrubbed... Name: vmtest.vmx Type: application/octet-stream Size: 3578 bytes Desc: not available URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20100922/9b5e6e05/attachment.obj>