Here is a another VM, this time its a Xen Gentoo VM running inside a VMware Gentoo VM, how about that 😉

VMware Base Gentoo Linux Configuration
Distribution: 2006.0
Linux Kernel: 2.6-15-r1
Installation Type: Desktop (KDE)
Networking: DHCP
User Name/password – none
Root Password: “optdlvrs”

Gentoo Xen VM inside the Base Gentoo Linux Configuration
Distribution: 2006.0
Linux Kernel: 2.6-15-r1
Installation Type: Desktop (KDE)
Networking: DHCP
User Name/password – none
Root Password: “optdlvrs”

VMware Base Virtual Machine Configuration
RAM: 256 MB (configurable by editing the gentoo.vmx file)
Disk: 10.0 GB (sorry I had to err on the side of plenty)
Networking: Bridged
VMware Tools: Loaded
Monitor Resolution: 1024×768

Gentoo Xen VM Configuration

RAM: 256 MB (configurable by editing the gentoo.vmx file)
Disk: 10.0 GB (sorry I had to err on the side of plenty)
Networking: Bridged
VMware Tools: Not Applicable
Monitor Resolution: 1024×768

Download Information
Available in the Downloads page.

Steps to get the VMs up and running:

Extract the gentoo-xen.tbz2 as follows
tar xjf gentoo-xen.tbz2
This creates the following files
• gentoo-s001.vmdk
• gentoo-s002.vmdk
• gentoo-s003.vmdk
• gentoo-s004.vmdk
• gentoo-s005.vmdk
• gentoo.vmdk
• gentoo.vmx

Optionally edit the vmx file to change the number of cpus. To prepare the
virtual disk which will be used by the Xen VM,
• In the VMware Workstation interface, click on Clone this virtual machine
• Select Clone from current state
• Select Create a full clone
• Name the clone and choose a suitable location for the cloned disk
• When the cloning process completes, Edit the settings of the **original** VM
• Click on Add
• Select Hard disk, Existing disk and browse to the **cloned** disk.
The VM is now ready to boot. Power on the VM as follows
vmware gentoo.vmx

Select the xen image when GRUB loads and login as root (password: optdlvrs)
Start the xend daemon
xend start

The command takes a while to complete so be patient. When you are returned
to the shell prompt , type
xm list

to see a list of running domains. You will see only domain0 running currently.
To start the first unprivileged xen guest domain, use the gentoo-xen-domU file
in the /root directory. This guest will use the cloned virtual disk (sdb to the
xen host) as it’s root disk (sda)
To start the Xen guest
xm create -c gentoo-xen-domU

The (xen) VM appears to hang when setting the hardware clock , wait for a few
minutes and the VM will continue to boot.
That’s it 🙂
BTW: This VM and the above test was graciously created by my good friend and colleague dominic. Hope you guys enjoy using it as much we enjoyed creating it.

Thanks!


22 responses to “Gentoo Xen running in Gentoo VMware VM”

  1. hunter Avatar
    hunter

    Hi,

    can you post your .config for your running kernel. I have some problems to install
    the vmware-tools with the memory manager.
    If I tried to start the vmware-tools the memory manager faild anytime.

    THX
    Hunter

  2. nick anderson Avatar

    Cool images. I do get an error when I try to start domain1.

    xm create -c gentoo-xen-domU
    Using config file “gentoo-xen-domU”.
    Error: Device 2048 (vbd) could not be connected. Backend device not found.

    Any idea what is causing that?

  3. jay Avatar

    I never had this issue before, but found this from here, probably may help,

    “It turns out that the only problem was that the module for loopback filesystems was not loaded. In dom0, do a `modprobe loop` and you should be good to go. Note that failure to `modprobe loop` may cripple the system for the entire boot cycle, so reboot, `modprobe loop`, then try to boot your HVM domain.”

    http://mccune.ece.cmu.edu/wordpress/?page_id=145

  4. nick anderson Avatar

    That was the issue, I had figured it out but forgot to post back. Thanks for responding.

  5. nick anderson Avatar
    nick anderson

    Ive got another quick comment. If you are running vmware on a linux box by default the virtual interfaces cannot be set to promiscous mode. If you want all users to be able to set a virtual interface to promiscous mode run chmod a+rw /dev/vmnet0.

    Also yoiu will see the INIT: Id “cx” respawning too fast: disabled for 5 Minutes. To get rid of that inside yor domU all you need to do is edit the /etc/inittab and comment out the getty lines for all the consoles except the first one (so 2-5). Then run telinit q. That should reload your inittab and you should be rid of those annoying messages.

    Now if I could only get xen working right on my real machine 🙁

  6. ssphere Avatar
    ssphere

    Cool solution!! it can be called VinV VM inside VM
    i.e (Xen running inside VMware)

  7. Redneck Avatar
    Redneck

    Will try it once downloaded.

    Any suggestions too on my pc:

    need to run say XEN as base os controling network connections 2 1 for tor/privoxy ans 1 for game’s / bypass of privoxy / tor.

    Then to be able to install Gentoo as default os and windows for the games where windows can use tor/privoxy and also bypass for internet gameplay.

    Would have done this myself but Xen was not like VmWare so I was a bit lost and as for info was too hardcore technical some time ago maybe they fixed that now.

    VmWare and games + win OS = not a solution yet maybe Xen can be.

  8. David Gress Avatar

    Is there a trick to this? Everytime I try to download the torrent onfo I get a “page cannot be displayed” error, or “The connection was refused when attempting to connect” error.

  9. jay Avatar

    Sorry guys, The VPS Server which hosts my bit torrent tracker is down for some reason. I’m stuck at office with no outbound ssl. will need to go home to get this fixed.

    Sorry for the hassle 🙁

    -Jay

  10. jay Avatar

    Okay, I got this from my Hosting guys,

    “Hello Jay,

    vz18 crashed due to a RAID problem, after bringing it back up, we have
    identified corruption which is affecting the starting of VEs. Due to
    this, we will be running a fsck on the node.

    If you have any questions, please contact us.

    Best regards,

    &*&%&VPS Support”

    Guess the tracker has not been able to start up back on reboot. Will need to fix this 🙁

  11. jay Avatar

    Hi,

    The tracker issue is fixed now and can start downloading again. Sorry for the hassle 😉

  12. Michael Avatar
    Michael

    Hello,
    Im excited to try your gentoo/xen vm, but apparently the tracker problems are back. I can’t connect to download the torrent.
    Hope its available again soon.

  13. Raycho Avatar

    http://www.cs.wisc.edu/~vladimir/gentoo.html
    There is a Gentoo VMWare image there and the download speed is good.

  14. Thamer Avatar
    Thamer

    thanks.

  15. John Avatar
    John

    Hi,

    I seem to be having the same problem as Nick Anderson (Post #2).

    When I try to use ‘modprobe loop’ I get back “FATAL: Module loop not found.”

    Any other advice on how to solve this?

    Thanks,
    John

  16. jason Avatar
    jason

    Hi,

    John did you ever figure this out, because I am stuck at the same place you are…

    Thanks,
    Jason

  17. jay Avatar

    Hi John/Jason,

    Paraphrasing from http://www.dit.upm.es/vnumlwiki/index.php/Xen-test-debian..

    # If you get the following error when trying to create a domU (note that it’s similar to the former bullet, but different):

    Error: Device 2049 (vbd) could not be connected. Backend device not found.

    you maybe have not load the loop module. Use ‘lsmod | grep loop’ to check it. In that case, load loop (‘modprobe loop’) and try again.

    Also this option is an persistent one, so if you try once and it fails you have to reboot the host before trying again.

    let us know, if it helps.

    thanks.

  18. jason Avatar
    jason

    The problem is that when trying to use modprobe loop, I get a an error:
    “FATAL: Module loop not found.”

    The module is not loaded, but it is also not found, so it cannot be loaded. (this is true after reboot as well)
    How do I find it so that I can load it?

    thanks,
    Jason

  19. jay Avatar

    Hi Jason,

    Which OS are you running on the vm on..
    Am not sure if it has been configured to mount the loop device.. see here on how to configure your machine to load the loop device..

    basically you need to add
    “options loop max_loop=255”
    to /etc/modprobe.d/loop file
    and
    “loop” to /etc/modules file and reboot before running the xend to load these modules.

    http://thpinfo.com/2006/debian-linux-etch-xen

  20. jason Avatar
    jason

    Thanks Jay,

    I am running Gentoo (the one provided on the downloads link from this page).

    What is the Gentoo equivalent of the Debian instructions (i.e. there is no /etc/modprobe.d folder or an /etc/modules file, but there is a /etc/modules.d/ folder and a /etc/modprobe.conf file)

    Jason

  21. corneille Avatar
    corneille

    please what’s the username and password. those on web pages don’t work

Leave a Reply to hunterCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.