Re: vmd: use -b option with an existing vm.conf entry

2018-02-13 Thread Matthias Schmidt
Hi Mike,

* Mike Larkin wrote:
> 
> Not sure if it's a "bug" per se, but this is behaving the way it should.
> 
> Now, whether or not that is really the best way is open for discussion.
> There was talk long ago about specifying some way of letting users
> supply override information for certain vm.conf parameters, but nobody
> ever implemented that.

Thanks for the explanation!

> A somewhat simpler way is to not use the -b option and instead boot
> bsd.rd from inside the VM at the boot> prompt. Of course that requires
> the ability to use seabios in vmm (necessitating a post-Nehalem CPU that
> has unrestricted guest capability).
> 
> If you don't want to do that (or can't due to an older CPU), yes, you're
> doing things the "right" way presently by editing that file and reloading.
> You could also just start a VM manually as root in that case by specifying a
> different name on the cmd line (and not have to edit the file):

That's a neat trick I'll definitely use the next time.

Cheers and thanks

Matthias



Re: vmd: use -b option with an existing vm.conf entry

2018-02-13 Thread Mike Larkin
On Tue, Feb 13, 2018 at 08:14:24PM +0100, Matthias Schmidt wrote:
> Hi,
> 
> while upgrading one of my vmm(4) VMs I noticed the following behaviour and
> wondering whether it's a bug or a feature.
> 
> I have the following test VM defined:
> 
> vm "obsd-1" {
> disable
> memory 1024M
> owner xhr
> boot "/bsd"
> disk "/home/xhr/VMs/obsd-vmm-1.img"
> interface {
> switch "local"
> }
> }
> 
> When I now want to upgrade the VM, I need to start the VM with bsd.rd as
> kernel.  However, I have to change the boot option in vm.conf to bsd.rd
> and cannot supply bsd.rd as argument to vmctl start:
> 
> $ vmctl start obsd-1 -c -b /tmp/bsd.rd
> vmctl: starting without disks
> vmctl: starting without network interfaces
> vmctl: start vm command failed: Operation already in progress
> 
> Wouldn't it be easier to just supply -b from the CLI and get the
> remaining info from vm.conf?  ATM I am changing vm.conf and reloading
> vmd as root.  Or am I overlooking sth here?
> 
> Cheers
> 
>   Matthias
> 

Not sure if it's a "bug" per se, but this is behaving the way it should.

Now, whether or not that is really the best way is open for discussion.
There was talk long ago about specifying some way of letting users
supply override information for certain vm.conf parameters, but nobody
ever implemented that.

A somewhat simpler way is to not use the -b option and instead boot
bsd.rd from inside the VM at the boot> prompt. Of course that requires
the ability to use seabios in vmm (necessitating a post-Nehalem CPU that
has unrestricted guest capability).

If you don't want to do that (or can't due to an older CPU), yes, you're
doing things the "right" way presently by editing that file and reloading.
You could also just start a VM manually as root in that case by specifying a
different name on the cmd line (and not have to edit the file):

vmctl start tempVM -b /bsd.rd -d /home/xhr/VMs/obsd-vmm-1.img .

-ml



vmd: use -b option with an existing vm.conf entry

2018-02-13 Thread Matthias Schmidt
Hi,

while upgrading one of my vmm(4) VMs I noticed the following behaviour and
wondering whether it's a bug or a feature.

I have the following test VM defined:

vm "obsd-1" {
disable
memory 1024M
owner xhr
boot "/bsd"
disk "/home/xhr/VMs/obsd-vmm-1.img"
interface {
switch "local"
}
}

When I now want to upgrade the VM, I need to start the VM with bsd.rd as
kernel.  However, I have to change the boot option in vm.conf to bsd.rd
and cannot supply bsd.rd as argument to vmctl start:

$ vmctl start obsd-1 -c -b /tmp/bsd.rd
vmctl: starting without disks
vmctl: starting without network interfaces
vmctl: start vm command failed: Operation already in progress

Wouldn't it be easier to just supply -b from the CLI and get the
remaining info from vm.conf?  ATM I am changing vm.conf and reloading
vmd as root.  Or am I overlooking sth here?

Cheers

Matthias