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

Re: [Xen-users] mount DomU root fs via. NFS

  • To: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
  • From: Jeenu Viswambharan <Jeenu.Viswambharan@xxxxxxx>
  • Date: Tue, 5 Aug 2014 16:32:00 +0100
  • Accept-language: en-US, en-GB
  • Acceptlanguage: en-US, en-GB
  • Cc: xen-users <xen-users@xxxxxxxxxxxxx>
  • Delivery-date: Tue, 05 Aug 2014 15:33:05 +0000
  • List-id: Xen user discussion <xen-users.lists.xen.org>
  • Thread-index: Ac+v+fl8KmYOGRiZSeGOx8du66vI9AAxODhg
  • Thread-topic: [Xen-users] mount DomU root fs via. NFS

On Mon, Aug 04, 2014 at 16:36:44, Ian Campbell wrote:
> On Mon, 2014-08-04 at 15:00 +0100, Jeenu Viswambharan wrote:
> > Dom0 gets IP address using DHCP (I've ip=dhcp in Dom0 command line). Can
> > vif be configured to get IP address via. DHCP too, rather than assigning
> > a static one?
> Sort of, but not how you probably mean...
> It is possible to run a dhcpd in dom0 which serves IP addresses to the
> VMs which are behind the NAT. The vif-nat script will frob the dhcp
> config to contain the ip address which you gave in the config and
> reload the server config on the fly, so that the guest gets given that
> address.
> What isn't possible is to use the existing DHCP server, since it
> doesn't know about your private network. Plus you would need to be
> able to write the answer to the DHCP request into the guest cfg file,
> or do something else clever with proxy dhcp or something...
> If you were to setup dhcpd in dom0 you'd need to be very careful about
> which interfaces it will send replies to, otherwise you'll have your
> IT department breaking down your door ;-)
> Personally I don't trust that stuff much, so I would use a static IP.

OK, I don't have a static IP allocated, but I managed to use the dhtest
tool [1] to temporarily lease a dynamic IP for testing purposes on my
network. I assume, for all intent and purposes, that can be treated as a
static IP.

The wiki page [2] suggests that I can use a random MAC addresses, so
I've dhtest generate a random MAC for me: 22:1e:4e:fc:6d:be; and that
gave me an IP address

With that, I've in my guest configuration:

  vif = [ "script=vif-nat,mac=22:1e:4e:fc:6d:be,ip=" ]
  extra = "... root=/dev/nfs nfsroot=nfs.ip.add.ress:/path/to/nfs/root 
ip= ..."

What I now see that xl fails to create the guest, and it reports the
following error (verbose logs attached).

  libxl: error: libxl_device.c:1084:device_hotplug_child_death_cb: script: ip 
addr add dev vif4.0 failed

The printed IP address seems spurious. Does the logs give
any idea as to what's going on?

Also, I don't know if it's the MAC address is causing it to fail.
Although randomly generated, it does seem to have compatible (locally
administered, multicast etc.) bits.

FWIW, the file /var/log/xen/xen-hotplug.log has:

  Error: an inet prefix is expected rather than "".


[1] https://github.com/sipwise/dhtest.git
[2] http://wiki.xen.org/wiki/Xen_Networking#MAC_addresses

-- IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium.  Thank you.

ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered 
in England & Wales, Company No:  2557590
ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, 
Registered in England & Wales, Company No:  2548782

Attachment: xl.log
Description: xl.log

Xen-users mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.