Port-xen archive

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

Re: NetBSD Xen guest freezes system + vif MAC address confusion (NetBSD 9.99.97 / Xen 4.15.2)



	hello.  The MAC address confusion is explainable.  The MAC address on the virtual domain
(domu) cannot match the MAC address on the corresponding interface that's created on the dom0
to service the domu.  To solve this problem, the xen backend driver increments the fourth octet
of the domu's assigned MAC address to generate a unique MAC address for the dom0.  FreeBSD, by
contrast, zeros out the entire MAC address on the backend.  I like the NetBSD approach much
better, because it means both the dom0 and domu sides of each connection have a unique MAC
address.  Even better, by looking at the dom0 MAC addresses by using brconfig(8), it's easy to
match the addresses  with their respective domu domains.

	As to the hanging, I'm less sure about that, but it might be that you're not assigning
enough memory to the dom0.  Unless I'm mistaken, it looks like you're only allocating 512Mb to
the dom0.  That seems like a very very small amount for the dom0 to do its work.  What happens
if you allocate 1G of  memory?

-thanks
-Brian
On May 27, 10:12am, Matthias Petermann wrote:
} Subject: NetBSD Xen guest freezes system + vif MAC address confusion (NetB
} 
} Hello all,
} 
} currently I am not able to instantiate a NetBSD Xen guest on NetBSD 9.99 
} (side fact: I also have problems with a Windows guest, but it is not 
} that important at the moment).
} 
} The problem occurs in the following environment:
} 
}   - Xen Kernel 4.15.2 and matching Xen Tools from pkgsrc 2022Q1 (built 
} 29.04.2022)
}   - NetBSD/Xen 9.99.97 (build 25.05.2022)
} 
} The host is booted with this boot.cfg (if this matters):
} 
} ```
}      menu=Boot Xen:load /netbsd-XEN3_DOM0.gz console=pc;multiboot 
} /xen.gz dom0_mem=512M vga=keep console=vga
} ```
} 
} The guest config looks like this:
} 
} ```
}      name = "net"
}      type="pv"
}      kernel = "/netbsd-INSTALL_XEN3_DOMU.gz"
}      #kernel = "/netbsd-XEN3_DOMU.gz"
}      memory = 2048
}      vcpus = 2
}      vif = [ 'mac=00:16:3E:01:00:01,bridge=bridge0' ]
}      disk = [
}         'file:/data/vhd/net.img,hda,rw',
}         'file:/data/vhd/net-export.img,hdb,rw'
}      ]
} ```
} 
} When I try to instantiate the guest, I get the following output on the 
} controlling terminal:
} 
} ```
} ganymed$ doas xl create net
} Parsing config from net
} libxl: error: libxl_device.c:1109:device_backend_callback: Domain 
} 1:unable to add device with path /local/domain/0/backend/vif/1/0
} libxl: error: libxl_create.c:1862:domcreate_attach_devices: Domain 
} 1:unable to add vif devices
} ```
} 
} At the same time the following message appears on the system console:
} 
} ```
} [   184.680057] xbd backend: attach device vnd0d (size 1048576000) for 
} domain 1
} [   184.910057] xbd backend: attach device vnd1d (size 33554432) for 
} domain 1
} [   195.260077] xvif1i0: Ethernet address 00:16:3e:02:00:01
} [   195.320059] xbd backend: detach device vnd1d for domain 1
} [   195.350051] xbd backend: detach device vnd0d for domain 1
} [   195.450054] xvif1i0: disconnecting
} ```
} 
} After the messages appear on the system console, the system does not 
} respond to any input either via SSH or on the local console. It seems to 
} be frozen. I can still activate the kernel debugger with 
} Control+Alt+Escape.
} 
} What surprises me: the 4th digit of the MAC address in the system log 
} seems to be 1 higher than specified in the guest configuration. I have 
} checked this again because I initially assumed a configuration error. Is 
} this somehow explainable or might this already be a indication of the 
} root cause?
} 


Home | Main Index | Thread Index | Old Index