[Libguestfs] [PATCH 1/2] fish: Add --network option.

Mohua Li moli at redhat.com
Tue Feb 19 02:02:17 UTC 2013


On Mon, Feb 18, 2013 at 05:54:20PM +0000, Richard W.M. Jones wrote:
> On Mon, Feb 18, 2013 at 04:28:48PM +0800, Mohua Li wrote:
> > Hi Rich,
> > 
> > I'm checking this option, as i didn't find PATCH2/2 for this thread, i'm wondering how can i check the network
> > address of the appliance? i just found the following in libvirt xml file,
> > 
> > ue="/var/tmp"/>\n    <qemu:arg value="-netdev"/>\n    <qemu:arg value="user,id=usernet,net=169.254.0.0/16"/>\n    <qemu:arg value="-device"/>\n    <qemu:arg value="virtio-net-pci,netdev=
> 
> What the --network option does is it sets up a user network.  This is
> implemented in qemu in userspace (using a thing called SLiRP) and it
> doesn't give the appliance a separate network address.
> 
> https://en.wikipedia.org/wiki/Slirp
> 
> Also it has some limitations:
> 
> http://libguestfs.org/virt-rescue.1.html#network
> 
> Nevertheless from guestfish you can test the network using debug
> commands.  For example:
> 
>  $ guestfish --network -a /dev/null 
>  
>  Welcome to guestfish, the libguestfs filesystem interactive shell for
>  editing virtual machine filesystems.
>  
>  Type: 'help' for help on commands
>        'man' to read the manual
>        'quit' to quit the shell
>  
>  ><fs> run
>  ><fs> debug sh 'exec 3<>/dev/tcp/redhat.com/80; echo "GET /" >&3; cat <&3'
>  [the redhat.com home page HTML should be printed here]

thanks for the info, i will have a try.

> 
> Rich.
> 
> -- 
> Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
> virt-top is 'top' for virtual machines.  Tiny program with many
> powerful monitoring features, net stats, disk stats, logging, etc.
> http://people.redhat.com/~rjones/virt-top

-- 
我只担心一件事,我怕我配不上我所遭受的苦难
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20130219/abc837fc/attachment.sig>


More information about the Libguestfs mailing list