Port-xen archive

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

RE: How to set up a NAT networking for xen 4.2.5 domu without xend-config.sxp



Ah, there it is, thanks. But it doesn't work for me.

First of all, I set up a hvm domu with the bridge mode, it works fine. Here it is:

--------------------------------------------------------------------------------------------------
#kernel = '/usr/pkg/lib/xen/boot/hvmloader'
builder = 'hvm'
memory = '4096'
vcpus = 2
#device_model = '/usr/pkg/libexec/qemu-dm'

disk = [ 'file:/data/xen/xenDomU/DomU1-Win7/win7_1.img,ioemu:hda,w',
	 'phy:/dev/cd0a,hdc:cdrom,r']

name = "DomU1-Win7"
vif = [ 'type=ioemu,bridge=bridge0' ]
acpi = 1
apic = 1
boot = 'dc'
vnc = 1
serial = 'pty'
usbdevice = 'tablet'
-----------------------------------------------------------------------------------------

Then I set the vifscript=vif-ip in the xl.conf:

-----------------------------------------------------------------------------------------------
## Global XL config file ##

# automatically balloon down dom0 when xen doesn't have enough free
# memory to create a domain
#autoballoon=1

# full path of the lockfile used by xl during domain creation
#lockfile="/var/lock/xl"

# default vif script 
#vifscript="vif-bridge"
vifscript="/usr/pkg/etc/xen/scripts/vif-ip"

# default output format used by "xl list -l"
#output_format="json"

# first block device to be used for temporary VM disk mounts
#blkdev_start="xvda"

# default option to run hotplug scripts from xl
# if disabled the old behaviour will be used, and hotplug scripts will be
# launched by udev.
#run_hotplug_scripts=1
-----------------------------------------------------------------------------------------------------

And change the vif value in the domu configuration file:

-------------------------------------------------------------------------------------
#kernel = '/usr/pkg/lib/xen/boot/hvmloader'
builder = 'hvm'
memory = '4096'
vcpus = 2
#device_model = '/usr/pkg/libexec/qemu-dm'

disk = [ 'file:/data/xen/xenDomU/DomU1-Win7/win7_1.img,ioemu:hda,w',
	 'phy:/dev/cd0a,hdc:cdrom,r']

name = "DomU1-Win7"
#vif = [ 'type=ioemu,bridge=bridge0' ]
vif = ['ip=10.0.0.2/24']
acpi = 1
apic = 1
boot = 'dc'
vnc = 1
serial = 'pty'
usbdevice = 'tablet'
----------------------------------------------------------------------------------------------

The domu doesn't work any more. Here are outputs when I run xl create:

Libxl: error: libxl_dm.c:12223:device_model_spawn_outcome: domain 7 device model:spawn failed (rc=-3)
Daemon running with PID 1244
Xenconsole: Could not read tty from store: No such file or directory
Libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: console child [0] exited with error status 2


#xl list
Name                                        ID   Mem VCPUs	State	Time(s)
Domain-0                                     0  1024     1     r-----      53.7
DomU1-Win7                                   6  4087     1     ------       0.0

But I can see that the xvif interface is created successfully

#ifconfig -a
urtwn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	ssid default nwkey 65536:"",0xc1520e70c1adff6b9ea83fb3b2fc31b5,"",""
	powersave off
	bssid 00:23:89:01:dd:10 chan 11
	address: 44:94:fc:f2:f4:c0
	media: IEEE802.11 autoselect (OFDM54 mode 11g)
	status: active
	inet 192.168.0.104 netmask 0xffffff00 broadcast 192.168.0.255
	inet6 fe80::4694:fcff:fef2:f4c0%urtwn0 prefixlen 64 scopeid 0x1
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33648
	inet 127.0.0.1 netmask 0xff000000
	inet6 ::1 prefixlen 128
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
xvif6i0: flags=8823<UP,BROADCAST,NOTRAILERS,SIMPLEX,MULTICAST> mtu 1500
	capabilities=2800<TCP4CSUM_Tx,UDP4CSUM_Tx>
	enabled=0
	address: 00:16:3e:79:de:fb
	inet 10.0.0.2 netmask 0xffffff00 broadcast 10.0.0.255
	inet6 fe80::216:3eff:fe79:defb%xvif6i0 prefixlen 64 scopeid 0x3

There should be something wrong when I change the networking to NAT.


Best regards 

John Fu


-----Original Message-----
From: Manuel Bouyer [mailto:bouyer%antioche.eu.org@localhost] 
Sent: Wednesday, November 19, 2014 7:11 PM
To: Fu, Zeyi (付泽义)
Cc: 'port-xen%netbsd.org@localhost'
Subject: Re: How to set up a NAT networking for xen 4.2.5 domu without xend-config.sxp

On Wed, Nov 19, 2014 at 02:40:19AM +0000, Fu, Zeyi (???) wrote:
> Hi there,
> 
> I have a xen 4.2.5 dom0, since xend is deprecated, I am now using xl instead.  Is the xend-config.sxp file still available without xend?  Could anybody guide me that how to  set up a NAT networking without xend-config.sxp ?  Thank you very much.

there is /usr/pkg/etc/xen/xl.conf, doens't this work for you ?

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index