Mailing List Archive

A light VM for testing Xen.
Hello,
I want to test my Xen to be sure it's working properly. Any pre-build light VM?

Thank you.
Re: A light VM for testing Xen. [ In reply to ]
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@yahoo.com> wrote:

> Hello,
> I want to test my Xen to be sure it's working properly. Any pre-build
> light VM?
>
> Thank you.
>
>
Re: A light VM for testing Xen. [ In reply to ]
How about Alpine?

https://wiki.alpinelinux.org/wiki/Create_Alpine_Linux_PV_DomU

On 12/28/2020 5:22 AM, Jason Long wrote:
> Hello,
> I want to test my Xen to be sure it's working properly. Any pre-build light VM?
>
> Thank you.
>
Re: A light VM for testing Xen. [ In reply to ]
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@gmail.com> 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@yahoo.com> wrote:
> Hello,
> I want to test my Xen to be sure it's working properly. Any pre-build light VM?
>
> Thank you.
>
>
Re: A light VM for testing Xen. [ In reply to ]
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@yahoo.com> 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@gmail.com> 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@yahoo.com> wrote:
> > Hello,
> > I want to test my Xen to be sure it's working properly. Any pre-build
> light VM?
> >
> > Thank you.
> >
> >
>
>
Re: A light VM for testing Xen. [ In reply to ]
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@gmail.com> 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@yahoo.com> 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@gmail.com> 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@yahoo.com> wrote:
>> Hello,
>> I want to test my Xen to be sure it's working properly. Any pre-build light VM?
>>
>> Thank you.
>>
>>
>
>
Re: A light VM for testing Xen. [ In reply to ]
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@yahoo.com> 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@gmail.com> 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@yahoo.com> 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@gmail.com> 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@yahoo.com> wrote:
> >> Hello,
> >> I want to test my Xen to be sure it's working properly. Any pre-build light VM?
> >>
> >> Thank you.
> >>
> >>
> >
> >
Re: A light VM for testing Xen. [ In reply to ]
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@gmail.com> 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@yahoo.com> 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@gmail.com> 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@yahoo.com> 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@gmail.com> 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@yahoo.com> wrote:
> >> Hello,
> >> I want to test my Xen to be sure it's working properly. Any pre-build light VM?
> >>
> >> Thank you.
> >>
> >>
> >
> >
Re: A light VM for testing Xen. [ In reply to ]
Any idea?






On Tuesday, December 29, 2020, 12:25:34 AM GMT+3:30, Jason Long <hack3rcon@yahoo.com> 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@gmail.com> 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@yahoo.com> 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@gmail.com> 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@yahoo.com> 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@gmail.com> 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@yahoo.com> wrote:
> >> Hello,
> >> I want to test my Xen to be sure it's working properly. Any pre-build light VM?
> >>
> >> Thank you.
> >>
> >>
> >
> >
Re: A light VM for testing Xen. [ In reply to ]
Hey Jason,

It's on /etc/network/interfaces

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

https://wiki.xenproject.org/wiki/Xen_Project_Beginners_Guide
https://help.ubuntu.com/community/Xen


Atenciosamente,
*Charles Ferreira Gonçalves *




On Tue, Dec 29, 2020 at 9:10 AM Jason Long <hack3rcon@yahoo.com> wrote:

> Any idea?
>
>
>
>
>
>
> On Tuesday, December 29, 2020, 12:25:34 AM GMT+3:30, Jason Long <
> hack3rcon@yahoo.com> 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@gmail.com> 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@yahoo.com> 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@gmail.com> 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@yahoo.com> 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@gmail.com> 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@yahoo.com> wrote:
> > >> Hello,
> > >> I want to test my Xen to be sure it's working properly. Any pre-build
> light VM?
> > >>
> > >> Thank you.
> > >>
> > >>
> > >
> > >
>
Re: A light VM for testing Xen. [ In reply to ]
Thank you Charles.

I did:

$ sudo iptables --table nat -A POSTROUTING --out-interface enp0s3 -j MASQUERADE
$ sudo xl create /etc/xen/test.cfg
Parsing config from /etc/xen/test.cfg
$ sudo xl list
Name                                        ID   Mem VCPUs    State    Time(s)
Domain-0                                     0   875     2     r-----     735.4
test                                         2   128     1     -b----       3.5

And I can ping the IP address:

$ ping 10.0.0.60
PING 10.0.0.60 (10.0.0.60) 56(84) bytes of data.
64 bytes from 10.0.0.60: icmp_seq=1 ttl=64 time=0.555 ms
64 bytes from 10.0.0.60: icmp_seq=2 ttl=64 time=0.470 ms

After launched the VM:

$ sudo ifconfig
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.0.2.15  netmask 255.255.255.0  broadcast 10.0.2.255
        inet6 fe80::8ffb:e4c9:5210:321d  prefixlen 64  scopeid 0x20<link>
        ether 08:00:27:fb:61:95  txqueuelen 1000  (Ethernet)
        RX packets 4284  bytes 1137645 (1.1 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2911  bytes 348994 (348.9 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 195  bytes 19277 (19.2 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 195  bytes 19277 (19.2 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


vif4.0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether fe:ff:ff:ff:ff:ff  txqueuelen 32  (Ethernet)
        RX packets 8  bytes 536 (536.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 5  bytes 716 (716.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


xenbr0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.0.0.1  netmask 255.255.255.0  broadcast 10.0.0.255
        inet6 fe80::943e:b1ff:fe57:3da7  prefixlen 64  scopeid 0x20<link>
        ether fe:ff:ff:ff:ff:ff  txqueuelen 1000  (Ethernet)
        RX packets 29  bytes 1872 (1.8 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 71  bytes 10052 (10.0 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


But VM can't boot:
https://paste.ubuntu.com/p/HbNhbxX59Z/

Why?




On Tuesday, December 29, 2020, 01:44:47 PM GMT+3:30, Charles Gonçalves <charles.fg@gmail.com> wrote:





Hey Jason, 

It's on  /etc/network/interfaces 

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

https://wiki.xenproject.org/wiki/Xen_Project_Beginners_Guide
https://help.ubuntu.com/community/Xen


Atenciosamente,
Charles Ferreira Gonçalves




On Tue, Dec 29, 2020 at 9:10 AM Jason Long <hack3rcon@yahoo.com> wrote:
> Any idea?
>
>
>
>
>
>
> On Tuesday, December 29, 2020, 12:25:34 AM GMT+3:30, Jason Long <hack3rcon@yahoo.com> 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@gmail.com> 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@yahoo.com> 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@gmail.com> 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@yahoo.com> 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@gmail.com> 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@yahoo.com> wrote:
>> >> Hello,
>> >> I want to test my Xen to be sure it's working properly. Any pre-build light VM?
>> >>
>> >> Thank you.
>> >>
>> >>
>> >
>> >
>
Re: A light VM for testing Xen. [ In reply to ]
Hello,

On Tue, Dec 29, 2020 at 10:51:02AM +0000, Jason Long wrote:
> But VM can't boot:
> https://paste.ubuntu.com/p/HbNhbxX59Z/

It did boot; you can see messages from the guest kernel there. But it
looks like the VM you booted could not find its root filesystem.
Show us your guest config file for this domU.

Cheers,
Andy
Re: A light VM for testing Xen. [ In reply to ]
Thanks.
Configuration is:


bootloader = 'pygrub'
vcpus       = '1'
memory      = '128'
#
#  Disk device(s).
#
root        = '/dev/xvda2 ro'
disk        = [.
                  'file:/var/tpcv/xen_images/domains/test/disk.img,xvda2,w',
                  'file:/var/tpcv/xen_images/domains/test/swap.img,xvda1,w',
              ]
#
#  Hostname
#
name        = 'test'

#
#  Networking
#
vif         = [ 'ip=10.0.0.60,mac=00:16:3E:5C:D7:79' ]


#
#  Behaviour
#
on_poweroff = 'destroy'
on_reboot   = 'restart'
on_crash    = 'restart'








On Tuesday, December 29, 2020, 04:01:33 PM GMT+3:30, Andy Smith <andy@strugglers.net> wrote:





Hello,

On Tue, Dec 29, 2020 at 10:51:02AM +0000, Jason Long wrote:
> But VM can't boot:
> https://paste.ubuntu.com/p/HbNhbxX59Z/


It did boot; you can see messages from the guest kernel there. But it
looks like the VM you booted could not find its root filesystem.
Show us your guest config file for this domU.

Cheers,
Andy
Re: A light VM for testing Xen. [ In reply to ]
Hello,
Is anything wrong?






On Tuesday, December 29, 2020, 04:48:20 PM GMT+3:30, Jason Long <hack3rcon@yahoo.com> wrote:





Thanks.
Configuration is:


bootloader = 'pygrub'
vcpus       = '1'
memory      = '128'
#
#  Disk device(s).
#
root        = '/dev/xvda2 ro'
disk        = [.
                  'file:/var/tpcv/xen_images/domains/test/disk.img,xvda2,w',
                  'file:/var/tpcv/xen_images/domains/test/swap.img,xvda1,w',
              ]
#
#  Hostname
#
name        = 'test'

#
#  Networking
#
vif         = [ 'ip=10.0.0.60,mac=00:16:3E:5C:D7:79' ]


#
#  Behaviour
#
on_poweroff = 'destroy'
on_reboot   = 'restart'
on_crash    = 'restart'








On Tuesday, December 29, 2020, 04:01:33 PM GMT+3:30, Andy Smith <andy@strugglers.net> wrote:





Hello,

On Tue, Dec 29, 2020 at 10:51:02AM +0000, Jason Long wrote:
> But VM can't boot:
> https://paste.ubuntu.com/p/HbNhbxX59Z/


It did boot; you can see messages from the guest kernel there. But it
looks like the VM you booted could not find its root filesystem.
Show us your guest config file for this domU.

Cheers,
Andy
Re: A light VM for testing Xen. [ In reply to ]
Searching for GRUB installation directory ... found: /boot/grub
Cannot determine root device. Assuming /dev/hda1
This error is probably caused by an invalid /etc/fstab


Can you describe your environment?

On Tue, Dec 29, 2020, 20:17 Jason Long <hack3rcon@yahoo.com> wrote:

> Hello,
> Is anything wrong?
>
>
>
>
>
>
> On Tuesday, December 29, 2020, 04:48:20 PM GMT+3:30, Jason Long <
> hack3rcon@yahoo.com> wrote:
>
>
>
>
>
> Thanks.
> Configuration is:
>
>
> bootloader = 'pygrub'
> vcpus = '1'
> memory = '128'
> #
> # Disk device(s).
> #
> root = '/dev/xvda2 ro'
> disk = [
>
> 'file:/var/tpcv/xen_images/domains/test/disk.img,xvda2,w',
>
> 'file:/var/tpcv/xen_images/domains/test/swap.img,xvda1,w',
> ]
> #
> # Hostname
> #
> name = 'test'
>
> #
> # Networking
> #
> vif = [ 'ip=10.0.0.60,mac=00:16:3E:5C:D7:79' ]
>
>
> #
> # Behaviour
> #
> on_poweroff = 'destroy'
> on_reboot = 'restart'
> on_crash = 'restart'
>
>
>
>
>
>
>
>
> On Tuesday, December 29, 2020, 04:01:33 PM GMT+3:30, Andy Smith <
> andy@strugglers.net> wrote:
>
>
>
>
>
> Hello,
>
> On Tue, Dec 29, 2020 at 10:51:02AM +0000, Jason Long wrote:
> > But VM can't boot:
> > https://paste.ubuntu.com/p/HbNhbxX59Z/
>
>
> It did boot; you can see messages from the guest kernel there. But it
> looks like the VM you booted could not find its root filesystem.
> Show us your guest config file for this domU.
>
> Cheers,
> Andy
>
>
>
>
Re: A light VM for testing Xen. [ In reply to ]
Thank you.
I'm using Lubuntu:

$ uname -a
Linux Xen 5.8.0-25-generic #26-Ubuntu SMP Thu Oct 15 10:30:38 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

And:

$ cat /etc/fstab 
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=4d7a5a50-9288-424d-a383-2f6888b908a1 /              ext4    defaults   0 1


Anything wrong?





On Wednesday, December 30, 2020, 11:12:02 AM GMT+3:30, Charles Gonçalves <charles.fg@gmail.com> wrote:





Searching for GRUB installation directory ... found: /boot/grub
Cannot determine root device.  Assuming /dev/hda1
This error is probably caused by an invalid /etc/fstab


Can you describe your environment?

On Tue, Dec 29, 2020, 20:17 Jason Long <hack3rcon@yahoo.com> wrote:
> Hello,
> Is anything wrong?
>
>
>
>
>
>
> On Tuesday, December 29, 2020, 04:48:20 PM GMT+3:30, Jason Long <hack3rcon@yahoo.com> wrote:
>
>
>
>
>
> Thanks.
> Configuration is:
>
>
> bootloader = 'pygrub'
> vcpus       = '1'
> memory      = '128'
> #
> #  Disk device(s).
> #
> root        = '/dev/xvda2 ro'
> disk        = [.
>                   'file:/var/tpcv/xen_images/domains/test/disk.img,xvda2,w',
>                   'file:/var/tpcv/xen_images/domains/test/swap.img,xvda1,w',
>               ]
> #
> #  Hostname
> #
> name        = 'test'
>
> #
> #  Networking
> #
> vif         = [ 'ip=10.0.0.60,mac=00:16:3E:5C:D7:79' ]
>
>
> #
> #  Behaviour
> #
> on_poweroff = 'destroy'
> on_reboot   = 'restart'
> on_crash    = 'restart'
>
>
>
>
>
>
>
>
> On Tuesday, December 29, 2020, 04:01:33 PM GMT+3:30, Andy Smith <andy@strugglers.net> wrote:
>
>
>
>
>
> Hello,
>
> On Tue, Dec 29, 2020 at 10:51:02AM +0000, Jason Long wrote:
>> But VM can't boot:
>> https://paste.ubuntu.com/p/HbNhbxX59Z/
>
>
> It did boot; you can see messages from the guest kernel there. But it
> looks like the VM you booted could not find its root filesystem.
> Show us your guest config file for this domU.
>
> Cheers,
> Andy
>
>
>
>
Re: A light VM for testing Xen. [ In reply to ]
Hi,

On Wed, Dec 30, 2020 at 11:49:54AM +0000, Jason Long wrote:
> $ cat /etc/fstab?
> # /etc/fstab: static file system information.
> #
> # Use 'blkid' to print the universally unique identifier for a device; this may
> # be used with UUID= as a more robust way to name devices that works even if
> # disks are added and removed. See fstab(5).
> #
> # <file system>? ? ? ? ? ? ?<mount point>? <type>? <options>? <dump>? <pass>
> UUID=4d7a5a50-9288-424d-a383-2f6888b908a1 /? ? ? ? ? ? ? ext4? ? defaults? ?0 1

From the previous log you posted, the kernel had booted so I think
that pygrub was able to correctly find the guest's kernel and
initramfs.

The guest's kernel also did find its root filesystem (note how it
configured a bunch of things that it would have needed access to
/etc for) but then bailed out at the end saying "errors were found
while checking the disk drive for /." I think that message comes
from the init system.

So I *think* your guest config file is okay (I'd give it a bit more
RAM though), it's finding its root filesystem okay, but maybe your
/etc/fstab above is wrong.

If if I were you I'd check that the filesystem with UUID
4d7a5a50-9288-424d-a383-2f6888b908a1 is actually there, i.e. that
that is its UUID.

For an easier life and to prove the theory I might ensure that
/dev/xvda2 is used for the root in your /etc/fstab. If that worked
then I would try to find out why the UUID was wrong.

I'm not familiar with Lubuntu but it looks like possibly you could
also press "I" to ignore and it might just carry on booting.

Cheers,
Andy
Re: A light VM for testing Xen. [ In reply to ]
Also, may I ask why you chose to start with a Linux distribution
from 2014, that is already EOL for standard support (security
support only now), Upstart init system and 3.x kernel?

This is ancient and IMHO not a good test bed for trying out anything
new.

Cheers,
Andy
Re: A light VM for testing Xen. [ In reply to ]
Thank you.
More information about UUID is:

$ sudo blkid 
/dev/sda1: UUID="4d7a5a50-9288-424d-a383-2f6888b908a1" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="bcad374b-01"
/dev/sdb1: UUID="dvzaw6-MJeq-sm7f-f3uo-GQbq-UEn4-2R51dx" TYPE="LVM2_member" PARTUUID="0ed18b03-01"

I changed the VM setting to:

vcpus       = '2'
memory      = '2048'

But not matter and when I entered "I", "S" or "M" key then nothing happened.

I'm using Lubuntu because it is lightweight.

https://paste.ubuntu.com/p/RnNBfWhGtF/



On Wednesday, December 30, 2020, 04:09:36 PM GMT+3:30, Andy Smith <andy@strugglers.net> wrote:





Hi,

On Wed, Dec 30, 2020 at 11:49:54AM +0000, Jason Long wrote:
> $ cat /etc/fstab 
> # /etc/fstab: static file system information.
> #
> # Use 'blkid' to print the universally unique identifier for a device; this may
> # be used with UUID= as a more robust way to name devices that works even if
> # disks are added and removed. See fstab(5).
> #
> # <file system>             <mount point>  <type>  <options>  <dump>  <pass>
> UUID=4d7a5a50-9288-424d-a383-2f6888b908a1 /              ext4    defaults   0 1

From the previous log you posted, the kernel had booted so I think
that pygrub was able to correctly find the guest's kernel and
initramfs.

The guest's kernel also did find its root filesystem (note how it
configured a bunch of things that it would have needed access to
/etc for) but then bailed out at the end saying "errors were found
while checking the disk drive for /." I think that message comes
from the init system.

So I *think* your guest config file is okay (I'd give it a bit more
RAM though), it's finding its root filesystem okay, but maybe your
/etc/fstab above is wrong.

If if I were you I'd check that the filesystem with UUID
4d7a5a50-9288-424d-a383-2f6888b908a1 is actually there, i.e. that
that is its UUID.

For an easier life and to prove the theory I might ensure that
/dev/xvda2 is used for the root in your /etc/fstab. If that worked
then I would try to find out why the UUID was wrong.

I'm not familiar with Lubuntu but it looks like possibly you could
also press "I" to ignore and it might just carry on booting.


Cheers,
Andy
Re: A light VM for testing Xen. [ In reply to ]
Hello,

On Wed, Dec 30, 2020 at 07:54:11PM +0000, Jason Long wrote:
> But not matter and when I entered "I", "S" or "M" key then nothing happened.

Sorry, I don't know what "Serious errors were found while checking
the disk drive for /" means here exactly. I think when you solve
that issue you will be alright.

A few lines earlier it did mention it had mounted root from xvda2,
so that bit is okay:

Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
[ 2.529989] EXT4-fs (xvda2): mounted filesystem with ordered data mode. Opts: (null)

> I'm using Lubuntu because it is lightweight.

I don't understand why you picked the 14.x version of Lubuntu from
2014 though, when the 18.x LTS version exists.

Cheers,
Andy
Re: A light VM for testing Xen. [ In reply to ]
Hello,
I used "xen-tools" for created the VM. Xen-tools doesn't provide new Linux distro?






On Thursday, December 31, 2020, 02:20:08 AM GMT+3:30, Andy Smith <andy@strugglers.net> wrote:





Hello,

On Wed, Dec 30, 2020 at 07:54:11PM +0000, Jason Long wrote:
> But not matter and when I entered "I", "S" or "M" key then nothing happened.

Sorry, I don't know what "Serious errors were found while checking
the disk drive for /" means here exactly. I think when you solve
that issue you will be alright.

A few lines earlier it did mention it had mounted root from xvda2,
so that bit is okay:

Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
[    2.529989] EXT4-fs (xvda2): mounted filesystem with ordered data mode. Opts: (null)

> I'm using Lubuntu because it is lightweight.

I don't understand why you picked the 14.x version of Lubuntu from
2014 though, when the 18.x LTS version exists.


Cheers,
Andy
Re: A light VM for testing Xen. [ In reply to ]
Yes it provides ...

Have you tried to mount the images manually and check if it was configured
properly?

Atenciosamente,
*Charles Ferreira Gonçalves *




On Thu, Dec 31, 2020 at 10:45 AM Jason Long <hack3rcon@yahoo.com> wrote:

> Hello,
> I used "xen-tools" for created the VM. Xen-tools doesn't provide new Linux
> distro?
>
>
>
>
>
>
> On Thursday, December 31, 2020, 02:20:08 AM GMT+3:30, Andy Smith <
> andy@strugglers.net> wrote:
>
>
>
>
>
> Hello,
>
> On Wed, Dec 30, 2020 at 07:54:11PM +0000, Jason Long wrote:
> > But not matter and when I entered "I", "S" or "M" key then nothing
> happened.
>
> Sorry, I don't know what "Serious errors were found while checking
> the disk drive for /" means here exactly. I think when you solve
> that issue you will be alright.
>
> A few lines earlier it did mention it had mounted root from xvda2,
> so that bit is okay:
>
> Begin: Mounting root file system ... Begin: Running /scripts/local-top ...
> done.
> Begin: Running /scripts/local-premount ... done.
> [ 2.529989] EXT4-fs (xvda2): mounted filesystem with ordered data mode.
> Opts: (null)
>
> > I'm using Lubuntu because it is lightweight.
>
> I don't understand why you picked the 14.x version of Lubuntu from
> 2014 though, when the 18.x LTS version exists.
>
>
> Cheers,
> Andy
>
>
>