[libvirt-users] communicate with vm

Eric Blake eblake at redhat.com
Thu May 3 20:30:27 UTC 2012


On 05/02/2012 07:52 PM, me,apporc wrote:
> We need to create many virtual machines and assign an static ip for each of
> them.
> To do this,
> 1. we can use one dhcp server to assign ip for them, and bind the MAC to
> it's ip. But we got many many machines, so this is not easy to operate for
> admins.

Maybe not the easiest, but this really is the best approach - manage
your own dhcp server to assign ip addresses based on the mac addresses
you have assigned to each VM.

> 2. we can just create the vm and then let the client to config the ip from
> within the operating system. But the client don't want to, and sometimes in
> fact they should not be authorized to do that.
> 
> Are there any way else to do this? I mean is there some API for that we can
> use? or just mount the vm image file and change the network configuration
> file?
> If any API for that, can we change the config while the os in the vm is
> running?

libguestfs can be used to modify offline guest images; it can probably
be used to modify IP addresses for each guest before you start them up,
although for a formula for doing that, you may be better off asking on
the libguestfs lists.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20120503/a4c00e48/attachment.sig>


More information about the libvirt-users mailing list