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

Re: Porting xen on rpi4



Hi Bertrand,

Thanks for your response!

I builded the guest image on yocto kirkstone source which has FSTYPE ext3. Guest image generated is xen-guest-image-minimal-raspberrypi4-64.ext3.
Below is the content of guest.cfg file

   kernel = "/home/root/Image" 
   cmdline = "console=hvc0 earlyprintk=xen sync_console root=/dev/xvda" 
   memory = "256" 
   name = "guest1" 
   vcpus = 1 
   serial="pty" 
   disk = [ 'phy:/dev/loop0,xvda,w' ] 
   vif=[ 'mac=00:11:22:66:88:22,bridge=xenbr0,type=netfront', ]

I am trying to mount xen-guest-image-minimal-raspberrypi4-64.ext3 to a virtual device & then will run the guest VM by command "xl create -c guest.cfg". But facing issue while trying to mount. 

Regards,
Vipul Kumar

On Wed, Aug 24, 2022 at 8:06 PM Bertrand Marquis <Bertrand.Marquis@xxxxxxx> wrote:
Hi Vipul,

> On 24 Aug 2022, at 15:16, Vipul Suneja <vsuneja63@xxxxxxxxx> wrote:
>
> Hi,
>
> I am porting xen hypervisor on rpi4 with yocto kirkstone sources. Followed the basic steps to build xen-image-minimal & xen-guest-image-minimal. I could flash sd card with xen minimal image & could see dom0 up. I copied "Image", "xen-guest-image-minimal" .ext3 file & guest.cfg to "/home/root". After that created a bridge with below step:
>
> killall -SIGUSR2 udhcpc
> brctl addbr xenbr0
> brctl addif xenbr0 eth0
> killall udhcpc
> udhcpc -R -b -p /var/run/udhcpc.xenbr0.pid -i xenbr0
>
> Could see the xenbr0 interface up.
> After that while mounting the guest file system it shows no such file or directory but the file is already there.
>
> [23:40:15] <Guest9046> root@raspberrypi4-64:~# ls -l
> [23:40:15] <Guest9046> -rw-r--r--    1 root     root      24652288 Mar  9 12:36 Image
> [23:40:15] <Guest9046> -rw-r--r--    1 root     root           247 Mar  9 12:37 guest1.cfg
> [23:40:15] <Guest9046> -rw-r--r--    1 root     root     868220928 Mar  9 12:39 xen-guest-image-minimal-raspberrypi4-64.ext3
> [23:40:15] <Guest9046> root@raspberrypi4-64:~# chmod 0777 xen-guest-image-minimal-raspberrypi4-64.ext3
> [23:40:15] <Guest9046> root@raspberrypi4-64:~# ls -l
> [23:40:15] <Guest9046> -rw-r--r--    1 root     root      24652288 Mar  9 12:36 Image
> [23:40:15] <Guest9046> -rw-r--r--    1 root     root           247 Mar  9 12:37 guest1.cfg
> [23:40:15] <Guest9046> -rwxrwxrwx    1 root     root     868220928 Mar  9 12:39 xen-guest-image-minimal-raspberrypi4-64.ext3
> [23:40:15] <Guest9046> root@raspberrypi4-64:~# losetup /dev/loop0 xen-guest-image-minimal-raspberrypi4-64.ext3
> [23:40:15] <Guest9046> losetup: xen-guest-image-minimal-raspberrypi4-64.ext3: No such file or directory
> [23:40:15] <Guest9046> root@raspberrypi4-64:~# losetup /dev/loop0 /home/root/xen-guest-image-minimal-raspberrypi4-64.ext3
> [23:40:15] <Guest9046> losetup: /home/root/xen-guest-image-minimal-raspberrypi4-64.ext3: No such file or directory
> [23:40:15] <Guest9046> root@raspberrypi4-64:~#
> [23:40:15] <Guest9046> root@raspberrypi4-64:~#
> [23:40:15] <Guest9046> root@raspberrypi4-64:~#
> [23:40:15] <Guest9046> root@raspberrypi4-64:~# losetup /dev/loop0 /home/root/xen-guest-image-minimal-raspberrypi4-64.ext3
> [23:40:15] <Guest9046> losetup: /home/root/xen-guest-image-minimal-raspberrypi4-64.ext3: No such file or directory

Why do you want to mount the file system ?

Anyway this is not related to Xen, I guess you could start without xen and still not manage to mount the file like that (linux configuration issue ?)

What is the content of you guest.cfg
How do you want to pass the guest root file system ?

Yocto should actually generate an img file and you could use it by having something like this in your guest.cfg:
disk=["file:/home/root/guest1.img,xvda,w”]

Cheers
Bertrand

>
> Any input on this issue will be really helpful, expecting your response.
>
> Thanks & Regards,
> Vipul Kumar


 


Rackspace

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