vmrc
vmrc copied to clipboard
service vm onestart myvm
Using 94be94602249d33239a2799301ce386c83dd7c69 and after having created a VM using a zvol I need to change to /usr/local/vmrc/vm to be able to "service vm onestart myvm". Is this to be expected?
I can see stat for "myvm" but not within /usr/local/vmrc/vm.
Hello,
On 10/19/14 2:47 PM, Holger Freyther wrote:
Using 94be946 https://github.com/michaeldexter/vmrc/commit/94be94602249d33239a2799301ce386c83dd7c69 and after having created a VM using a zvol I need to change to /usr/local/vmrc/vm to be able to "service vm onestart myvm". Is this to be expected?
I can see stat for "myvm" but not within /usr/local/vmrc/vm.
This should certainly not be the case. Are you logged in as root? Might your path be incorrect with regards to /usr/local/etc/rc.d/vm ?
Let me know what you find and thank you for trying vmrc.
Michael
Maybe I am doing things wrongly.
/usr/local/etc/vm.conf has host_vmdir="/usr/local/vmrc/vm/"
$ ls /usr/local/vmrc/vm/companybuild0/ companybuild0.conf
$ service vm onestart companybuild0 companybuild0 not found. Exiting.
the message comes from.
vm_start()
{
...
1) echo ; echo Starting $vm_names ; echo
[ -d $vm_names ] ||
{ echo $vm_names not found. Exiting. ; exit 1 ;}
So using /usr/local/etc/rc.d/vm onestart /usr/local/vmrc/vm/companybuild0 brings me a bit further but then fails with..
echo Reading the $host_vmdir/$1/${1}.conf config file
[ -f $host_vmdir/$1/${1}.conf ] && . $host_vmdir/$1/${1}.conf
[ $vm_os_type ] ||
{ echo $host_vmdir/$1/${1}.conf failed to source. Exiting ; exit 1 ; }
as now host_vmdir is prepended twice...
For someone not fluent in shell scripting I am a bit puzzled with the singular/plural of vm_names but I think you always want to use ${host_vmdir}/$vm_names.
as now host_vmdir is prepended twice...
Yes. I recall that and know I fixed it.
I will see if it made it up.
Thank you for reporting this.
Michael
On 10/21/14 11:31 AM, Holger Freyther wrote:
as now host_vmdir is prepended twice...
I do see this bug:
[ -d $vm_names ] ... and possibly [ -d $vm_name ]
should read:
[ -d $host_vmdir/$vm_names ] or [ -d $host_vmdir/$vm_name ]
(I am in the middle of a significant restructuring and hope to post that before individual fixes, which it will include)
Michael
Hello,
Note the v0.8 release. This fixes the issue and includes significant other improvements.
Testing appreciated!
All the best,
Michael Dexter
Hello,
Are you still having issues? I see that iso mode was not working as it did not accommodate "iso" or "oneiso" as arguments.
GitHub and the snapshot are updated.
Michael