Re: Invoking guest os script, without guest having network connectivity?

2012-11-26 Thread Stefan Hajnoczi
On Sat, Nov 24, 2012 at 06:40:39PM +0200, Shlomi Tsadok wrote:
 I'm looking for a way to configure the guest networking(including IP)
 dynamically, using a custom script, right after VM creation.
 
 Is there a similar feature in KVM/Libvirt as the Invoke-VMScript in of
 VMware's PowerCLI?
 It allows you to run a script in the guest OS, even before the guest
 has networking connectivity (the host talks to the vmtools agent
 that's  installed in the guest).

The QEMU guest agent (qemu-ga) has features that may allow you to do
this.  I'm not familiar enough with it to give details, here are some
alternatives:

If you provide a kernel + initramfs externally (outside the guest disk
image) you can add files to the initramfs.  This allows you to customize
boot up.

Alternatively you can use PXE booting to achieve the same thing.

Finally, you could edit the disk image using libguestfs or qemu-nbd
before booting it for the first time.  This gives you a chance to
customize configuration and startup files.

Stefan
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Invoking guest os script, without guest having network connectivity?

2012-11-24 Thread Shlomi Tsadok
I'm looking for a way to configure the guest networking(including IP)
dynamically, using a custom script, right after VM creation.

Is there a similar feature in KVM/Libvirt as the Invoke-VMScript in of
VMware's PowerCLI?
It allows you to run a script in the guest OS, even before the guest
has networking connectivity (the host talks to the vmtools agent
that's  installed in the guest).

Thanks,
Shlomi
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html