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

Re: A light VM for testing Xen.



Hey Jason, 

It's on  /etc/network/interfaces 

But, next time asking in this list, try first looking into the main references out there



Atenciosamente,
Charles Ferreira Gonçalves




On Tue, Dec 29, 2020 at 9:10 AM Jason Long <hack3rcon@xxxxxxxxx> wrote:
Any idea?






On Tuesday, December 29, 2020, 12:25:34 AM GMT+3:30, Jason Long <hack3rcon@xxxxxxxxx> wrote:





Thanks.
Write:

auto xenbr0
iface xenbr0 inet static
        bridge_ports none
        bridge_stp no
        address 10.0.0.1 # or  192.168.1.1
        netmask 255.255.255.0 # or 255.255.255.0
        network 10.0.0.0 # 192.168.1.0
        broadcast 10.0.0.255 # 192.168.1.255
...
In which file?






On Tuesday, December 29, 2020, 12:11:58 AM GMT+3:30, Charles Gonçalves <charles.fg@xxxxxxxxx> wrote:





Did you setup a bridge?


Assuming a debian like dist:

# Xen bridge  - you can also use the 192.168.0.0
auto xenbr0
iface xenbr0 inet static
        bridge_ports none
        bridge_stp no
        address 10.0.0.1 # or  192.168.1.1
        netmask 255.255.255.0 # or 255.255.255.0
        network 10.0.0.0 # 192.168.1.0
        broadcast 10.0.0.255 # 192.168.1.255
# if needed setup nameserver approprietaly
# dns-nameserver 193.136.212.1


then:

#sudo sysctl -w net.ipv4.ip_forward=1 also edit /etc/sysctl.conf
sudo sysctl -w net.ipv4.ip_forward=1

sudo iptables -A FORWARD --in-interface xenbr0 -j ACCEPT
sudo iptables --table nat -A POSTROUTING --out-interface XXXX -j MASQUERADE

sudo apt-get install iptables-persistent
sudo /etc/init.d/iptables-persistent save
sudo /etc/init.d/iptables-persistent reload

# Inside the Gest:
ifconfig eth0 10.0.0.2 up
route add default gw 10.0.0.1




Atenciosamente,
Charles Ferreira Gonçalves



On Mon, Dec 28, 2020 at 8:30 PM Jason Long <hack3rcon@xxxxxxxxx> wrote:
>
> Thank you.
> I used "xl create /etc/xen/test.cfg" and got below error:
>
> $ sudo xl create /etc/xen/test.cfg
> Parsing config from /etc/xen/test.cfg
> libxl: error: libxl_exec.c:117:libxl_report_child_exitstatus: /etc/xen/scripts/vif-bridge online [176788] exited with error status 1
> libxl: error: libxl_device.c:1286:device_hotplug_child_death_cb: script: Could not find bridge device xenbr0
> libxl: error: libxl_create.c:1519:domcreate_attach_devices: Domain 3:unable to add vif devices
> libxl: error: libxl_exec.c:117:libxl_report_child_exitstatus: /etc/xen/scripts/vif-bridge offline [176854] exited with error status 1
> libxl: error: libxl_device.c:1286:device_hotplug_child_death_cb: script: Could not find bridge device xenbr0
> libxl: error: libxl_domain.c:1034:libxl__destroy_domid: Domain 3:Non-existant domain
> libxl: error: libxl_domain.c:993:domain_destroy_callback: Domain 3:Unable to destroy guest
> libxl: error: libxl_domain.c:920:domain_destroy_cb: Domain 3:Destruction of domain failed
>
>
> I changed config as below:
>
> vif=['10.0.0.60,script=vif-route']
>
> And added below lines to "/etc/xen/xend-config.sxp" file:
> (network-script network-route)
> (vif-script vif-route)
>
> Then commented out below line in "xl.conf" file:
> vif.default.script="vif-route"
>
> But, I got below error:
>
> $ sudo xl create /etc/xen/test.cfg
> Parsing config from /etc/xen/test.cfg
> libxl: error: libxl_exec.c:117:libxl_report_child_exitstatus: /etc/xen/scripts/vif-route online [286618] exited with error status 1
> libxl: error: libxl_device.c:1286:device_hotplug_child_death_cb: script: /etc/xen/scripts/vif-route failed; error detected.
> libxl: error: libxl_create.c:1519:domcreate_attach_devices: Domain 5:unable to add vif devices
> libxl: error: libxl_exec.c:117:libxl_report_child_exitstatus: /etc/xen/scripts/vif-route offline [286702] exited with error status 1
> libxl: error: libxl_device.c:1286:device_hotplug_child_death_cb: script: /etc/xen/scripts/vif-route failed; error detected.
> libxl: error: libxl_domain.c:1034:libxl__destroy_domid: Domain 5:Non-existant domain
> libxl: error: libxl_domain.c:993:domain_destroy_callback: Domain 5:Unable to destroy guest
> libxl: error: libxl_domain.c:920:domain_destroy_cb: Domain 5:Destruction of domain failed
>
> How can I solve it?
>
>
>
> On Monday, December 28, 2020, 04:32:06 PM GMT+3:30, Charles Gonçalves <charles.fg@xxxxxxxxx> wrote:
>
>
>
>
>
> I think that you need to read the documentation about setup the bridge, and the xl tool... Those are prerequisite for the commands that I send to you
>
> On Mon, Dec 28, 2020, 12:20 Jason Long <hack3rcon@xxxxxxxxx> wrote:
> > Thank you.
> > I did that command and logs are:
> > https://paste.ubuntu.com/p/x2BpZfHSh7/
> > https://paste.ubuntu.com/p/nVk5tXb2zk/
> >
> > Is everything OK? How can I launch my VM?
> >
> >
> >
> >
> > On Monday, December 28, 2020, 12:30:50 AM GMT+3:30, Charles Gonçalves <charles.fg@xxxxxxxxx> wrote:
> >
> >
> >
> >
> >
> > You can use xen-tools to create a small server
> >
> > In a Debian based distro:
> >
> > sudo apt install -y lvm2 debootstrap libconfig-inifiles-perl libdata-validate-domain-perl libdata-validate-ip-perl libdata-validate-uri-perl libfile-slurp-perl libfile-which-perl libsort-versions-perl libterm-ui-perl libtext-template-perl openssh-client perl debian-archive-keyring rinse libtest-notabs-perl
> >
> > git clone https://github.com/xen-tools/xen-tools.git
> > cd xen-tools
> > make install
> >
> > xen-create-image --hostname=test \
> >  --ip=10.0.0.60 \
> >  --broadcast=10.0.0.255 \
> >  --gateway=10.0.0.1 \
> >  --netmask=255.255.255.0 \
> >  --memory=128mb \
> >  --dir=/var/tpcv/xen_images \
> >  --dist=trusty
> >
> >
> > Obviously you should replace the values for your network environment
> >
> >
> > On Sun, Dec 27, 2020, 20:23 Jason Long <hack3rcon@xxxxxxxxx> wrote:
> >> Hello,
> >> I want to test my Xen to be sure it's working properly. Any pre-build light VM?
> >>
> >> Thank you.
> >>
> >>
> >
> >

 


Rackspace

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