openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #11246
Re: Questions on VM Lifecycle
On Fri, May 4, 2012 at 1:34 PM, Vishvananda Ishaya
<vishvananda@xxxxxxxxx> wrote:
>
> On May 3, 2012, at 4:50 PM, Mark Moseley wrote:
>
>>
>> * What is the right way to stop/start a persistent instance? So far
>> I've been using 'nova boot' to start and 'nova delete' to stop. E.g.:
>>
>>> nova boot --flavor=1 --image c5cecc17-295c-4ebc-9019-2ccc222d3f52 --key_name=key3 --nic net-id=63743ee0-f8a1-45f8-888a-cce38d09cca2,v4-fixed-ip=192.168.1.2 --block_device_mapping vda=11 --block_device_mapping vdb=12 --nic=net-id=63743ee0-f8a1-45f8-888a-cce38d09cca2 myvm1
>
> You might try
>
> nova suspend/resume
>
> (does a hypervisor-level suspend where all memory is written to disk and the vm is stopped)
>
> or
>
> nova pause/unpause
>
> (stops emulation of the vm
>
> or
>
> api.openstack.org -- stop/start
>
> (this one is not exposed to novaclient, but it will shutdown the instance but not delete any files)
Yup, suspend/resume are exactly what I was looking for. I would've put
money down that I'd tried suspend and it'd left the kvm running. I
must've been trying pause/unpause (or just confusing it with virsh
suspend, which basically pauses the vm but leaves the process
running).
>> * Not really a question, but if I'm using persistent storage, it'd be
>> nice if I didn't have to specify "--image", since I'm not actually
>> using the image.
>
> the image should only be necessary for the initial boot
Hmm, I forget if it was saying this before, but when I try to boot
without --image (using the same nova boot invocation as above, but
without the "--image <image uuid>" part), I get:
ERROR: 'NoneType' object has no attribute 'isdigit'
I can dig into it more if it'd be helpful (opengrok has been amazingly
useful for working with nova source code). Though in light of your and
Mandar's suggestion to use 'nova suspend/resume', I shouldn't be
reusing 'nova boot' anyway, so I guess it's moot.
>> * Is there a way to add an interface, but without Nova trying to
>> configure it? That is, add an eth1 to the vm but do nothing else (yes,
>> I realize I'll have to muck with ebtables/iptables on the compute
>> node). Our imaging process will take care of the network
>> configuration, so it'd be one less thing to add to Nova's management
>> overhead. I can probably accomplish the same thing with a dummy
>> network on the VM's eth1, since it's not actually being injected.
>
> not now
Ok, good to know I'm not just overlooking something. Having the
ability to attach unconfigured-but-present devices, even beyond NICs,
might be useful.
>> * Any plans to add a mac= subarg to the "--nic" option in 'nova boot'?
>
> this was discussed at some point, but no active development that i know of
Ok, also good to know. Maybe I'll muck with it -- though my python is
just barely passable, so it'd be a rough first cut at best.
I also figured out my IP reuse issue: I added to /etc/nova/nova.conf
"--fixed_ip_disassociate_timeout=1". Any nasty side effects of setting
that?
References