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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux