Categories
Errors Linux Software VM

Xen: PTY allocation request failed

$ ssh vm3.rootspirit.com -l root
[email protected]'s password:
PTY allocation request failed on channel 0
stdin: is not a tty
Solution:

Kill the DomU (xm console *might* work, but somehow rarely works for me).

mkdir /tmp/disk
mount /path/to/disk.img /tmp/disk
chroot /tmp/disk /bin/bash

=> in chroot env

nano -w /etc/fstab

And add (though this is probably not needed):

none            /dev/pts      devpts    defaults        0   0

And install udev:

apt-get install udev

Clean up, and restart DomU

exit
umount /tmp/disk
xm create /path/to/xen/vm.cfg

Should do the trick. 🙂

Categories
Errors Linux Software VM

Xen: Failed to find an unused loop device

I had to start a new Xen domU this afternoon,

xm create vm#.domain

But this resulted in following error:

Error: Device 5632 (vbd) could not be connected.
Failed to find an unused loop device

Solution:

Create /etc/modprobe.d/local-loop.conf with this content:

options loop max_loop=64

Turn off all DomUs, yes, bummer. You’ll need to reload the loop module which won’t work if Xen is still using them. xm list should only display Domain-0.

modprobe -r loop && modprobe loop

And restart all DomUs. You can now create 32 (64/2 ~= # of DomUs; increase if you need more) DomUs.

You can check (before & after) the difference in loop back devices: ls -ls /dev | grep loop | wc -l

Categories
Apple Linux VM

Parallels + Ubuntu

I finally got a reply from the Parallels support team. After using the alternate Parallels installer it finally works again! Even after rebooting Mac! joy

Before trying to run Vista/Bootcamp through Parallels again, I’m waiting till the end of my exams (Thursday). Don’t want to blow up my Windows install again when I’m in desperate need of it. 😉

As usual with Parallels, creating/installing a new OS isn’t easy. Wether it crashes or you get a bunch of errors, you’re always up for a day full of fun!

Ubuntu on Parallels (1)

Here is how I managed to install Ubuntu on Parallels:

  • First of all, make sure you’re running the latest version of Parallels, especially if you’re using Leopard.
  • Step 2, download the alternate Ubuntu installer. If you do not use the alternate installer, you’ll end up with ‘Display server errors’ before being able to install Ubuntu. You can download Ubuntu here. Select the approriate version (probably Desktop, latest version), and check “Check here if you need the alternate desktop CD. This CD does not include the Live CD, instead it uses a text-based installer“.
  • Step 3, create a new virtual machine, with OS Linux/Ubuntu.

Parallels: Create a VMParallels: Create a VM (2)

  • And follow the steps. I’ve added some more screenshots below. You can leave everything by default, that’s as you wish.

Parallels: Create a VM (3)Parallels: Create a VM (4)Parallels: Create a VM (5)Parallels: Create a VM (6)Parallels: Create a VM (7)Parallels: Create a VM (8)

  • As CD-drive, select the Ubuntu (alternate) installer .iso-file.

Parallels: Create a VM (9)

  • Click Finish and Start — the Ubuntu installer will boot.
  • You’ll end up in Ubuntu’s welcome screen. Select your keyboard layout (hit F3) and select (text) install
  • Here too, follow the steps on the screen. It will ask for your language, country, and will propose a manual or automatic disk partition. I’ve selected automatic — it creates a big ext3 root partition, and a swap partition.
    The installer then asks if you agree with the partition table. Select Yes or No. (I’ve selected No – changed my root partition from ext3 to reiserfs, as I’m a big reiserfs fan.) When selecting Yes — the table will be created and Ubuntu will start installing.
  • After it’s installed, Ubuntu will reboot. This is where you’ll get your first error; ACPI: Unable to locate RSDP. This is a known error; you can safey ignore it.
  • Ubuntu will continue to boot, and then pop up this error: The display server has been shut down about 6 times in the last 90 seconds, and will freeze. To fix this error, shut down and restart (or reset) the VM, and hit the ESC-key. Grub’s bootloader menu will pop up if everything is right.
  • Select the 2nd option (recovery). Ubuntu will boot up in text-mode-only and you should be logged in as root (if you’re not, add ‘sudo’ in front of the commands below).
  • In Parallels, click (on top of your screen) “Actions” -> “Install Parallels Tools…” and type in following commands in the shell:
    • mount /media/cdrom
    • cd /media/cdrom
    • ./parallels-tools.run
    • reboot
  • After Ubuntu has rebooted (in normal mode), you shouldn’t receive any more errors, and you can enjoy Ubuntu on your mac!

Ubuntu on Parallels (2)

Categories
Apple Errors VM Windows

Bootcamp

For a few courses I’m following at school, I need to be able to run Windows.

As I’m owning a Macbook Pro (with Leopard) that shouldn’t have to be any problem using Bootcamp.

I created a 5 Gb partition and installed WinXP a few weeks ago. So far all fine.

As I don’t really like to reboot into XP (I can’t access my mails, don’t have my IRC client, all my Camino tabs are closed, …) I tried Parallels.

Parallels, at first, was a real disappointment. It crashed my Mac OS X several times. It was only, just a few days later, when they released a patch to solve all Leopard issues, that I started to enjoy it.

Running all my programs from Parallels (instead of rebooting), I never noticed my Bootcamp WinXP was actually broken. As exams were approaching (I’m not allowed to run a virtualization of Windows, because my school’s key and network loggers won’t work like intended, not that I care that much, but they do 😉 ), I rebooted for the first time in weeks to my Bootcamp XP, and noticed the famous hal.dll error (or Google it, you’ll see why it’s famous).

I repaired my Windows XP install (as explained in Parallels’ knowledge base), and that indeed fixed the problem… of Bootcamp… My parallels was now broken (hal.dll error for Parallels, instead of Bootcamp). Trying to recreate a new Parallels virtual disk for bootcamp, or even reinstall the program, … All failed. (There should be bootflags to edit, and force Parallels to use a different hal.dll, well, read about it here, it’s no longer useful for me.)

Googling and searching their forums, no luck, no one had a fixed solution. Only ‘try this’ and ‘try that’. (To follow the above howto I’ve posted, you need to be able to (re)install Parallels, and by the time I found that howto I wasn’t even able to do that; Parallels froze during installation.) I e-mailed the Parallels support team with my problem, and the form said they’d reply within 3 working days… It has been over 2 weeks, and I’m still waiting.

I then noticed that my Mac/Apple keyboard driver weren’t working in Bootcamp-XP, some chars like #, @, > and so forth weren’t working (or at least the layout didn’t match with my Apple keyboard). I tried to reinstall the Bootcamp drivers (located on my Leopard DVD), they all failed to install (no error message…). Being quite fed up with it, I decided to reinstall XP (without formatting, just overwriting my Windows dir). And here too, the drivers failed to install, with no specific error message… Took the required backups, formatted, and had the wild idea to install Vista.

Booted from the Vista install DVD, and came to the conclusion I needed at least 7 Gb disk space to install Vista (having a 5 Gb partition, this wouldn’t work). Back in os X I deleted the Windows partition, and tried to recreate a new (10 Gb) one.

And… This error came up: “Your disk cannot be partitioned because some files cannot be moved” (other link). I now started to panic, as I had less then a week to fix this problem. Following a few try-this-and-try-that’s, I removed a few big files from my disk (someone even said to remove Office 2004, but I wasn’t about to do that), I tried to repair my disk (from the Leopard DVD), I tried smaller partitions, even 5 Gb wouldn’t work, and then, when all hope was almost lost, I tried one last thing; ‘Zero Out Data‘. This will overwrite all deleted files (well, marked for deletion by your disk, but still written on it, so this data can theoretically be recovered) with zero’s.

Disk Utility - Zero Out Data

And this too, has to be done from the Mac OS X install CD/DVD.

After, well, about 40 minutes Disk Utility was done, I rebooted right into Leopard, and retried to create a 5 Gb partition… And guess what?! It worked!

I deleted that partition again (5 Gb being to small), and recreated a 15 Gb partition, and this too worked with no problems.

I now happily run Vista on my Macbook Pro, and so far I can’t complain.

The only thing I haven’t been able to fix is Parallels, I can’t even reinstall it (it freezes during install). But heck with it, I’ve lost enough sweat already to fix Bootcamp.