Tuesday, April 28, 2009

Temp internal network between primary and guest ldoms

This was useful as I could transfer a file directly without having to hop via any other hosts.

First step is to create the virtual switch and interfaces;
root@mycontrolldom # ldm add-vsw tmpsw primary
root@mycontrolldom # ldm add-vnet tmpvnic0 tmpsw primary
root@mycontrolldom # ldm add-vnet tmpvnic1 tmpsw myguestldom

Now plumb them up and give them an IP;
root@mycontrolldom # ifconfig vnet0 plumb
root@mycontrolldom # ifconfig vnet0 192.168.0.1 up
root@myguestldom # ifconfig vnet2 plumb
root@myguestldom # ifconfig vnet2 192.168.0.2 up

That's all there is to it. Now you can ping and scp across it.

Once finished, blow it all away with;

root@myguestldom # ifconfig vnet2 unplumb
root@mycontrolldom # ifconfig vnet0 unplumb
root@mycontrolldom # ldm rm-vnet tmpvnic0 primary
root@mycontrolldom # ldm rm-vnet tmpvnic1 myguestldom
root@mycontrolldom # ldm rm-vsw tmpsw

No comments:

Post a Comment