Help needed for getting started with libvmi

141 views
Skip to first unread message

Manohar Reddy

unread,
Feb 13, 2018, 11:24:48 AM2/13/18
to vmitools
Hi everyone,

I am currently following https://libvmi.wordpress.com/ this tutorial for setting up libvmi with xen.

Everything succeeds untill `sudo make install`

After than there is a line which tells.

“ubuntu-hvm” is the VM name that we have created. To find the offsets what you can do is copy the directory libvmi/tools/linux-offset-finder/ into the Domain U (Guest OS).

How do I copy this directory to domU. 

Thanks,
Manohar.


Tamas K Lengyel

unread,
Feb 13, 2018, 1:02:35 PM2/13/18
to vmit...@googlegroups.com
You can usually use SCP (ie. SSH) or any other mechanism you like
(FTP, NFS, etc.)
> --
> You received this message because you are subscribed to the Google Groups
> "vmitools" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to vmitools+u...@googlegroups.com.
> To post to this group, send email to vmit...@googlegroups.com.
> Visit this group at https://groups.google.com/group/vmitools.
> For more options, visit https://groups.google.com/d/optout.

Manohar Reddy

unread,
Mar 1, 2018, 1:51:43 PM3/1/18
to vmitools
Hi All, I've been facing this problem since the last 4 day. I've read Xen_Networking Wiki article and I am able to understand xen bridging model. But no luck. So I am posting my problem here.
 
To use ssh I will have to setup bridging in xen domu. But I am not able to find a proper guide to set it up. At the best the I could find this article
as the best resource https://www.sparksupport.com/blog/xen-bridging

In dom0, my current `ip addr` show s
```
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp7s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master xenbr0 state UP group default qlen 1000
    link/ether b8:2a:72:b5:f9:c9 brd ff:ff:ff:ff:ff:ff
3: wlp6s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether b0:10:41:02:11:77 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.105/24 brd 192.168.0.255 scope global dynamic wlp6s0
       valid_lft 6098sec preferred_lft 6098sec
    inet6 fe80::e3f:e945:63a1:ef35/64 scope link 
       valid_lft forever preferred_lft forever
4: xenbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether b8:2a:72:b5:f9:c9 brd ff:ff:ff:ff:ff:ff
    inet 169.254.11.255/16 brd 169.254.255.255 scope link xenbr0:avahi
       valid_lft forever preferred_lft forever
    inet6 fe80::ba2a:72ff:feb5:f9c9/64 scope link 
       valid_lft forever preferred_lft forever
```
Question1: According to the article, peth0 and vif0 must be there, mine doesn't show. Is that problem?

Now in my DomU, the output of `ip addr` shows

```
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever 
```

Question2: But eth0 is also expected here. How should I set up eth0 here?

So ideally, when eth0 is ready, I can be able ssh into domU. Correct?

Attachments: ubuntu-hvm.cfg(domU config file)
Thanks,
Manohar. 
ubuntu-hvm.cfg

Tamas K Lengyel

unread,
Mar 1, 2018, 1:59:02 PM3/1/18
to vmit...@googlegroups.com
You might find this Wiki more helpful:
https://wiki.debian.org/BridgeNetworkConnections. The blog you are
following makes you mess with Xen network scripts, which for a basic
setup, you really don't have to do at all. You just create a bridge,
point your domain config to use that bridge for the domain, and you
are pretty much done.

Manohar Reddy

unread,
Mar 1, 2018, 3:14:54 PM3/1/18
to vmitools
Thank you very much Tamas, After following the blog, I got an error when creating VM

My currently brctl show 
bridge name bridge id STP enabled interfaces
xenbr0 8000.b82a72b5f9c9 no enp7s0

my ubuntu-hvm.cfg is ( I mentioned bridge in vif) 

```
builder = "hvm"
name = "ubuntuhvm"
vif = ['bridge=xenbr0'] 
memory = "512"
vcpus = 1
disk = ['phy:/dev/vg0/ubuntuhvm,hda,w','file:/home/manohar/Downloads/ubuntu-16.04.3-server-amd64.iso,hdc:cdrom,r']
sdl=0
vnc = 1
vncpasswd='asdf'
stdvga=0
serial='pty'
tsc_mode="default"
```
with the above configuration when I do `xl create /etc/xen/ubuntu-hvm.cfg` I get the following error:

```
Parsing config from /etc/xen/ubuntu-hvm.cfg
got a tsc mode string: "default"
libxl: error: libxl_dm.c:2191:device_model_spawn_outcome: domain 1 device model: spawn failed (rc=-3)
libxl: error: libxl_create.c:1535:domcreate_devmodel_started: device model did not start: -3
libxl: error: libxl_dm.c:2305:kill_device_model: Device Model already exited
libxl: error: libxl.c:1572:libxl__destroy_domid: non-existant domain 1
libxl: error: libxl.c:1531:domain_destroy_callback: unable to destroy guest with domid 1
libxl: error: libxl.c:1460:domain_destroy_cb: destruction of domain 1 failed
```

I guess if I am able to get rid of this error, then everything will be fine.

Thanks,
Manohar.

Tamas K Lengyel

unread,
Mar 1, 2018, 3:17:45 PM3/1/18
to vmit...@googlegroups.com
That usually happens if one of the devices you specify in your config
is unavailable, either the disk or the bridge. So double-check that
the bridge interface is "up" and the disk is there.

Patrick Colp

unread,
Mar 1, 2018, 3:58:42 PM3/1/18
to vmit...@googlegroups.com
Based on your dom0 `ip addr` output it looks like your wireless device
(wlp6s0) is the one connected to the internet and your wired device
(enp7s0) is not. If you want your domU's to have internet, then you
probably want to setup your bridge with wlp6s0 instead of enp7s0.

Patrick
>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__wiki.debian.org_BridgeNetworkConnections&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=kvQSvM03ev_ddOnU76SpsLjkKIboktTazc7MC3XRN94&m=xp8xCEXlH8h4xRLLBLGtYQvu-UH5VC1LYgRU0SBkyjA&s=u5ZmXlsKhPTnrel3koKbwykBYPylScbodvLHdxQ840g&e=. The blog you are
>>> following makes you mess with Xen network scripts, which for a basic
>>> setup, you really don't have to do at all. You just create a bridge,
>>> point your domain config to use that bridge for the domain, and you
>>> are pretty much done.
>>>
>>> On Thu, Mar 1, 2018 at 11:41 AM, Manohar Reddy <b.ma...@gmail.com> wrote:
>>>> Hi All, I've been facing this problem since the last 4 day. I've read
>>>> Xen_Networking Wiki article and I am able to understand xen bridging
>>>> model.
>>>> But no luck. So I am posting my problem here.
>>>>
>>>> To use ssh I will have to setup bridging in xen domu. But I am not able
>>>> to
>>>> find a proper guide to set it up. At the best the I could find this
>>>> article
>>>> as the best resource https://urldefense.proofpoint.com/v2/url?u=https-3A__www.sparksupport.com_blog_xen-2Dbridging&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=kvQSvM03ev_ddOnU76SpsLjkKIboktTazc7MC3XRN94&m=xp8xCEXlH8h4xRLLBLGtYQvu-UH5VC1LYgRU0SBkyjA&s=iaMrlI_AHejywjVEEX65bnEzbYCVMdmKk9WYqNjw3a0&e=
>>>>>> I am currently following https://urldefense.proofpoint.com/v2/url?u=https-3A__libvmi.wordpress.com_&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=kvQSvM03ev_ddOnU76SpsLjkKIboktTazc7MC3XRN94&m=xp8xCEXlH8h4xRLLBLGtYQvu-UH5VC1LYgRU0SBkyjA&s=n1WJaMTMbt51SCs6T1AGOs1T4TTMHZd3f1sSkDLoIwg&e= this tutorial
>>>>>> for
>>>>>> setting up libvmi with xen.
>>>>>>
>>>>>> Everything succeeds untill `sudo make install`
>>>>>>
>>>>>> After than there is a line which tells.
>>>>>>
>>>>>> “ubuntu-hvm” is the VM name that we have created. To find the offsets
>>>>>> what
>>>>>> you can do is copy the directory libvmi/tools/linux-offset-finder/
>>>>>> into
>>>>>> the
>>>>>> Domain U (Guest OS).
>>>>>>
>>>>>> How do I copy this directory to domU.
>>>>>>
>>>>>> Thanks,
>>>>>> Manohar.
>>>>>>
>>>>>>
>>>>>> --
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups
>>>>>> "vmitools" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>> send
>>>>>> an
>>>>>> email to vmitools+u...@googlegroups.com.
>>>>>> To post to this group, send email to vmit...@googlegroups.com.
>>>>>> Visit this group at https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_group_vmitools&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=kvQSvM03ev_ddOnU76SpsLjkKIboktTazc7MC3XRN94&m=xp8xCEXlH8h4xRLLBLGtYQvu-UH5VC1LYgRU0SBkyjA&s=ZpD5ArNJ9bG5PtbUdmC_gbLcD5mV7fEp-ieF-eVTSG4&e=.
>>>>>> For more options, visit https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_optout&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=kvQSvM03ev_ddOnU76SpsLjkKIboktTazc7MC3XRN94&m=xp8xCEXlH8h4xRLLBLGtYQvu-UH5VC1LYgRU0SBkyjA&s=ZhVf6pdxvTYUb5TFKf5UrA0OXclcHey--_8A5YnBiQc&e=.
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups
>>>> "vmitools" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an
>>>> email to vmitools+u...@googlegroups.com.
>>>> To post to this group, send email to vmit...@googlegroups.com.
>>>> Visit this group at https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_group_vmitools&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=kvQSvM03ev_ddOnU76SpsLjkKIboktTazc7MC3XRN94&m=xp8xCEXlH8h4xRLLBLGtYQvu-UH5VC1LYgRU0SBkyjA&s=ZpD5ArNJ9bG5PtbUdmC_gbLcD5mV7fEp-ieF-eVTSG4&e=.
>>>> For more options, visit https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_optout&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=kvQSvM03ev_ddOnU76SpsLjkKIboktTazc7MC3XRN94&m=xp8xCEXlH8h4xRLLBLGtYQvu-UH5VC1LYgRU0SBkyjA&s=ZhVf6pdxvTYUb5TFKf5UrA0OXclcHey--_8A5YnBiQc&e=.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "vmitools" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to vmitools+u...@googlegroups.com.
>> To post to this group, send email to vmit...@googlegroups.com.
>> Visit this group at https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_group_vmitools&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=kvQSvM03ev_ddOnU76SpsLjkKIboktTazc7MC3XRN94&m=xp8xCEXlH8h4xRLLBLGtYQvu-UH5VC1LYgRU0SBkyjA&s=ZpD5ArNJ9bG5PtbUdmC_gbLcD5mV7fEp-ieF-eVTSG4&e=.
>> For more options, visit https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_optout&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=kvQSvM03ev_ddOnU76SpsLjkKIboktTazc7MC3XRN94&m=xp8xCEXlH8h4xRLLBLGtYQvu-UH5VC1LYgRU0SBkyjA&s=ZhVf6pdxvTYUb5TFKf5UrA0OXclcHey--_8A5YnBiQc&e=.
>

Reply all
Reply to author
Forward
0 new messages