
Hi Anton, I'm sorry for delay. I was on vacation.
Hi all.
When libvirt creates an OpenVZ machine, it does smth like # vzctl create $ctid --ostemplate `ostemplate` And we can't specify an --config `config` argument. In this case vzctl chooses a default config file (a value of CONFIG variable from /etc/vz/vz.conf).
But there are cases when we want to specify a config file directly, as in # vzctl create $ctid --ostemplate `ostemplate` --config `config`
I think, that we can try to use the same `ostemplate` name as --config value, if corresponding template exists, i.e., if there is a file /etc/vz/conf/ve-`ostemplate`.conf-sample, libvirt will run a command # vzctl create $ctid --ostemplate `ostemplate` --config `ostemplate` Otherwise, it will run it's default command # vzctl create $ctid --ostemplate `ostemplate` (the same arguments.)
Config /etc/vz/conf/ve-XXX.conf-sample define there are many parameters like memory, CPU etc. This parameters are not properties of <filesystem>. Daniel, usage of pre-defined configs in really usefull. Can we create additional tag inside <domain></domain>?
----------- Example of creating a machine with nondefault config:
1. Create /etc/vz/conf/ve-altlinux-test.conf-sample 2. Create /var/lib/vz/template/cache/altlinux-test.tar 3. Use libvirt with (hypothetical) XML: <domain type="openvz"> <name>100</name> <memory>1</memory> <os><type>exe</type></os> <devices> <filesystem type="template"> <source name="altlinux-test"/> <target dir="/"/> </filesystem> </devices> </domain>
----------- Example of creating a machine with default config:
1. Ensure there is no /etc/vz/conf/ve-altlinux-test.conf-sample 2. Create /var/lib/vz/template/cache/altlinux-test.tar 3. Use libvirt with (the same as above) XML file -----------
------------------------------------------------------------------------
-- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list