Configure VMs inner parameters (IP, GATEWAY) directly from VirtualBricks

Registered by Francesco Apollonio

we can find a way to change the VMs configuration when the machine is turnedoff. An idea can be opening the image file and editing /etc/network/interfaces to change the ip and gateway.

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
None
Definition:
Obsolete
Series goal:
None
Implementation:
Unknown
Milestone target:
None
Completed by
Francesco Apollonio

Related branches

Sprints

Whiteboard

The interfaces file is only valid with debian or debian-based guest.

To cope with this problem, I usually configure network by putting the following in some startup file (like /etc/rc.local)

OMAC=`ifconfig eth0 | grep eth0 | sed -e "s/^.*HWaddr //g" | cut -d ":" -f 6`
MAC=`echo $OMAC |sed -e "s/^0//g"`
ifconfig eth0 192.168.30.$MAC

So the address part of the ip is taken from the last field in mac address (which can be specified in the GUI)

Another way to configure a whole network of clients using the same image is the old-good dhcp.. maybe with a fixed-macaddr leases mechanism.

------------
Francesco: or maybe we can append to the kernel a string with -append qemu parameter.

-----

Francesco: it's better to not merge the two layers, I'm closing this blueprint.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.