WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] how to create a vm from a file system

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] how to create a vm from a file system
From: Joel Nylund <jnylund@xxxxxxxxx>
Date: Thu, 14 Feb 2008 13:40:14 -0500
Delivery-date: Thu, 14 Feb 2008 12:50:31 -0800
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:Message-Id:From:To:In-Reply-To:Content-Type:Content-Transfer-Encoding:Mime-Version:Subject:Date:References:X-Mailer; b=Kr1OMIPvCSohbNWW3a41iApkq9uEyQFKUve1r1Mp3JWbArwnEu+oxbImsGaaYpjhnxVWUdCzRjBDA4esrci4SWBZH/3NkPSabw4uAkhe+FcseI0eM58U5m0t1qSnMhUCMoWIeDOZltFlnrmLZn3l6c+xbDFv4I/vRrRnL7ZZ0kE= ;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <47B3803D.7020102@xxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <E17ADC22-2B8A-45E4-8E80-E82FFD376F28@xxxxxxxxx> <add59a3f0802131520l103e3676i47d53c34a5bd7e5@xxxxxxxxxxxxxx> <47B3803D.7020102@xxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Hi, I have looked through the manual now, but I still dont get it.

Lets say I have a standard fedora setup running xen kernel & xen

I have a the filesystem I want the vm to use (files given to me from a previously used vm ) starting with its root starting at (/root/vms/ jnylund2)

My hard drive devices are:
 Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14       30401   244091610   8e  Linux LVM

I created a config file with the following:

# Kernel image file.
kernel = "vmlinuz-2.6.20-1.3002.fc6xen"
memory =512
name = "jnylund2"
vif = [ '' ]
disk = [ 'phy:sda2,sda2,w' ]
dhcp="dhcp"
hostname= "vm%d" % vmid
#root = "/root/vms/jnylund2"
root = "/dev/sda1 ro"
#extra = "4"

When I try to run:
[root@mymachine vms]# xm create -c j2-conf vmid=1
Using config file "./j2-conf".
Error: int argument required

It doesn't work, and I also dont understand where im supposed to tell it to use /root/vms/jnylund2 as the root of the virtual machines file system.

thanks
Joel




On Feb 13, 2008, at 6:41 PM, Nico Kadel-Garcia wrote:

weiming wrote:
just untar to a partition or virtual file system.
It is covered in the xen manual

weiming
Oh, wait. You have to build the file system first, edit /etc/mtab and /etc/fstab appropriately, make sure your kernel has the appropriate modules to access the Xen virtual hardware for network and hard drive controllers, and be prepared to reset all your SELinux settings.

It's not as easy as many manuals make it out to be. It's often easiest to actually delete the kernel, and do a Fedora upgrade or install on top of the existing OS with the virt-install tool.

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users