open sourceprogrammingtechnotesvirtualization

openvz virt-install error: name can not be only numeric characters

If you’ve run into this error, it is because the version of Python-Virtinst that you have does not include a fix for a lot of the OpenVZ hypervisor code yet, here is the commit that I made to resolve the error, the latest Python-Virtinst code can be found at their mercurial repository.

It seems that the C code being developed for LibVirt has been making much more progress for OpenVZ support than the Virt-Install support. Currently, the only way that I’ve been able to get a CT created is by using virsh directly on the command line:

virsh -c openvz:///system define --file /etc/libvirt/qemu/systems/container_create.xml

Additionally when the CT is created, the container ID that is used is not the one specified in the xml:

For some reason the next available ID is the one automatically chosen and used, if for example I had one numbered 1003, it would create 1004 instead of 1017. I’ve yet to find the code that dictates the vzctl create functionality (in the C code driver at least).

I searched the entire libvirt repo and found nothing for vzctl create, though every other attribute is in the code, stop, start, destroy, set.

I am really curious now as to where that code is found, I’ve run strace on the container creation process and specifically see where it is running the vzctl create command.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.