Re: varch - Virtual machine builder for ArchLinux

Ok, version 0.8.2 is out, I fixed a number of small bugs as well as a bug in some of the lvm aif files.This version also allows for an "external kernel", this means that the kernel and initcpio will be coppied out of the image so that they can be booted from externally if desired.I still need to do the aif hacking to enable installing packages from the AUR and a few other things with aif, but I felt that these updates validated a release.

I too am seeing this exception. As far as i can tell it comes down to the use of "subprocess.getoutput()" at line 67 of image.py.

subprocess.getoutput() is not available before python 3.1, whereas I have 2.6 installed from extra. Now my issue, as a python newbie, is to get both 2.6 and 3.1 installed and varch installed and running under 3.1....

Re: varch - Virtual machine builder for ArchLinux

Hmm, that is very odd, you are certinally using python 3.1 based on the error output, so that is not the problem.

It looks like the creation of the block device is failing, this means that there is most likely an error condition which I am not checking for or a required component is missing.

I will have more time in a few hours to audit what is going on, the exception is occurring very early in the process, then the catch all to clean up the environment is picking up the exception, if you want to see the original exception you can disable the top level try/except block in /usr/lib/python3.1/site-packages/varch/__init__.py to see the first exception.

But like I said, I will take a closer look at the code in a few hours when I have time. Thanks for the find!

Re: varch - Virtual machine builder for ArchLinux

Undone by my laziness again. I was using 2.6 when I recieved the original error, and copied and trimmed aeosynth's error in the quote, when pasting in my own error would have been more accurate and effective. Here's what i see under 2.6:

I have gotten 3.1 running now and varch installed under python3.1/site-packages/varch and it's working well, though i haven't extensively tested the images it's creating. Under 3.1 i happily get:

############################################################################
# Creating virtual machine image #
############################################################################
#Checking that the aif configuration will be safe for the underlying system#
############################################################################
# Executing AIF #
############################################################################
Welcome to Arch Linux Installation Framework
Automatic procedure running profile /tmp/working.aif ...
Note that despite our careful coding and proper testing there may still be bugs in this software.
When you are doing this installation on a system where some data must be preserved, we suggest you make a backup first
Partitioning /dev/mapper/loop0
Disabling all swapspace...
Phase 1: Creating filesystems & blockdevices
Making ext2 filesystem on /dev/mapper/loop0p1
WARNING: process_filesystem error
Error creating filesystem ext2 on /dev/mapper/loop0p1.
Making swap filesystem on /dev/mapper/loop0p2
Making ext4 filesystem on /dev/mapper/loop0p3
Phase 2: Mounting filesystems
Mounting /dev/mapper/loop0p1 (ext2) on /boot
Swaponning /dev/mapper/loop0p2
Mounting /dev/mapper/loop0p3 (ext4) on /
WARNING: Disk processing
Could not process_filesystems
Rolling back filesystems...
Phase 1: Umounting all specified mountpoints
(Maybe) Umounting /dev/mapper/loop0p3
(Maybe) Swapoffing /dev/mapper/loop0p2
(Maybe) Umounting /dev/mapper/loop0p1
Phase 2: destructing relevant blockdevices
Skipping destruction of /dev/mapper/loop0p1 (raw) because one of the filesystems on it contains data you want to keep
Skipping destruction of /dev/mapper/loop0p2 (raw) because one of the filesystems on it contains data you want to keep
Skipping destruction of /dev/mapper/loop0p3 (raw) because one of the filesystems on it contains data you want to keep
Rollback succeeded
ERROR: Something failed while processing the filesystem. A rollback was executed, which ended successfully
############################################################################
# Setting up the bootloader #
############################################################################
############################################################################
# Cleaning up the build environment #
############################################################################
Unmounting build environment
restoring swap state

I think that my issue derived from the dependancy on 'python' rather than 'python3'.

Thanks for the tool, I was sadly contemplating running a couple of virt servers under centos until I discovered your varch. You've saved my honour and reputation!

Re: varch - Virtual machine builder for ArchLinux

Thats good to hear! I am glad I can help!Yes, I use varch every day in a number of datacenters to farm out vms, so I feel very good about it, if you have any feature requests let me know!

And yes, since Arch has moved the python package to be python3 I wrote varch to be dependant on python3. The use of "python" as a dep is saying "python3" Vach will not run on python 2.

You are getting some errors in your filesystem creation when running AIF, I have never seen these before but there is a potential bug in the partitioning that I need to dedicate a few days to fixing, but it has never caused me any problems. Please keep me posted with your experience so I can make varch better!

Re: varch - Virtual machine builder for ArchLinux

Ha. Did I mention laziness? I had a co-worker install the system from an old cd and didn't check back to see if he had run updates. I lose the game. I will let you know if I continue to get those errors after an update.

Re: varch - Virtual machine builder for ArchLinux

Thanks hexenring, let me know if there is anything at all I can do to make it better, I have been focusing on some much larger projects for the last few weeks but I love varch, it is my baby I need to give it a few solid days and polish a few things up that are in my issues section on google code. My hope is that eventually I can get it smooth enough to make it an official Arch application.

Re: varch - Virtual machine builder for ArchLinux

Hi wuischke,Unfortunately, right now Varch only supports Grub 1, right now varch has to manually install grub on the virtual machine image and the support for grub 2 has not been written yet. I will look into writing Grub 2 support for Varch. Thanks for the find!

Re: varch - Virtual machine builder for ArchLinux

I just realised that the grub1 dependency is actually for aif, not for varch. Since grub2 and grub apparently conflict this is more complicated than I thought. This requires hacking aif to support grub2 in addition to writing the grub2 code for varch.

I'll have a look at the aif code tomorrow, but unless it's very easy to add grub2 support in addition to grub1, I lay this project on ice. I can't use grub1 on my laptop (SSD with GPT), but I can get hold of a grub1 machine without problems.

Re: varch - Virtual machine builder for ArchLinux

I'm afraid I don't know very much but this sounded intriguing and I thought I'd give it a try. And since I try most things inside a virtual machine, I ran "varch -f vdi -s 3G -i varch" inside one just after installing varch. I got the following: