LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-11-2009, 10:45 PM   #1
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Rep: Reputation: 55
What is the easiest way to increase the size of a Xen Image made from an image?


What is the easiest way to increase the size of a Xen Image made from an image?

TIA
 
Old 12-12-2009, 03:55 PM   #2
worm5252
Member
 
Registered: Oct 2004
Location: Atlanta
Distribution: CentOS, RHEL, HP-UX, OS X
Posts: 567

Rep: Reputation: 57
30 seconds on google mate, http://www.vinacis.net/content/view/32/32/

I am using Xen to create Virtual Machines, but how can I resize the virtual disk image?

Solution:

This solution is to increase your virtual disk size:

cd /var/lib/xen/images/vlinux1

#use dd to create a 1 GB file

dd if=/dev/zero of=Tempfile bs=1024 count=1000000

#append this file to virtual image file (in this case is hda)

cat Tmpfile >> hda

resize2fs -f hda
 
Old 12-14-2009, 09:51 PM   #3
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Original Poster
Rep: Reputation: 55
Quote:
Originally Posted by worm5252 View Post
30 seconds on google mate, http://www.vinacis.net/content/view/32/32/

I am using Xen to create Virtual Machines, but how can I resize the virtual disk image?

Solution:

This solution is to increase your virtual disk size:

cd /var/lib/xen/images/vlinux1

#use dd to create a 1 GB file

dd if=/dev/zero of=Tempfile bs=1024 count=1000000

#append this file to virtual image file (in this case is hda)

cat Tmpfile >> hda

resize2fs -f hda
Not much help, considering /var/lib/xen/images/ is empty.
 
Old 12-14-2009, 09:58 PM   #4
worm5252
Member
 
Registered: Oct 2004
Location: Atlanta
Distribution: CentOS, RHEL, HP-UX, OS X
Posts: 567

Rep: Reputation: 57
Instead of /var/lib/xen/images/ cd to the location of your xen images.
 
Old 12-14-2009, 10:11 PM   #5
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Original Poster
Rep: Reputation: 55
Quote:
Originally Posted by worm5252 View Post
Instead of /var/lib/xen/images/ cd to the location of your xen images.
I figured that much, but the last command still doesn't work:
Code:
[root@xen100 xen]# resize2fs -f testsrv1.img
resize2fs 1.39 (29-May-2006)
resize2fs: Bad magic number in super-block while trying to open testsrv1.img
Couldn't find valid filesystem superblock.
[root@xen100 xen]# resize2fs -f /dev/hda2
resize2fs 1.39 (29-May-2006)
open: No such file or directory while opening /dev/hda2
[root@xen100 xen]#
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Easiest way to Clone/image an Ubuntu drive rmcellig Linux - Newbie 30 09-11-2009 09:04 AM
Increase the Size of Xen VM using XM BLOCK-ATTACH lakshmi4linux Linux - Server 0 03-25-2009 02:14 AM
How to resize vfat disk image made with dd lindylex Linux - Software 4 03-05-2009 10:25 PM
LXer: Setup Intrepid Server PV DomU via xen-image-create&debootstrap at Xen 3.3 Intre LXer Syndicated Linux News 0 01-05-2009 01:20 PM
LXer: Setup Intrepid Server PV DomU via xen-image-create&debootstrap at Xen 3.3 Intre LXer Syndicated Linux News 0 01-05-2009 09:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration