[libvirt-users] Suggestions on building VM disks from scratch

Dale Amon amon at vnl.com
Tue Apr 3 22:54:42 UTC 2012


Eric:

Perhaps you can help. I'm at the point of
screaming frustration.

First, I had to search for a machine on which
I could install guestfish and virt-rescue. None
of the production machines were safe for this
as the closest I could come was either adding
a backports line to an apt sources file on a
squeeze machine or upgrading an Ubuntu machine
to the not-yet-ready for prime time Precise.

I finally realized one machine *was*, for strange
hysterical reasons, already on the Precise
release. So I selected the package.

This took an hour or more because the not ready
for prime time Precise wanted to remove diffutils
and warned you that you should not. After a bunch
of research I figured it would work, because a
new one was coming in immediately... and it did.
Mostly. It took about a dozen iterations to get
everything settled again.

Then I created my blank 'disk' file and tried to
run virt-rescue on it. It crashed out with an 
error from febootstrap. After finding nothing terribly
useful or current on this in searching, I tried
guestfish instead. After some fiddling I got it
to attach my blank disk. However I cannot find a
reasonable way to partition it with the part-add which
seems to want me to count sectors. All I want is
a 9G linux and a 2G swap. It also lacks access to
rsync. I'd hoped for something like Knoppix for VM's.

So, I found the guy's web site in another google 
search. Wrote up a nice long explanation of what
I need to do and what pointers he might have to
get up the learning curve on his application or
whether there was something better for my purpose...
and when I hit the post button, Wordpress asked
me to login. I did so. It then put me back on
the same page with my long well thought out 
comment gone.

I am trying seriously not to throw my laptop through
a window at this point. Really.

Have you worked at all with either? You pointed me
to them a few days ago, so I'm hoping you have. All
I want is to:

	create a blank disk (dd works fine)
	put a partition table on it
	create an X GB root linux partition and a Y GB swap
	do the mkfs and mkswap
	rsync a backup image onto the 9GB partition
	write the mbr from grub so that the disk is a bootable VM.
	boot it from virsh

I've managed through a number of arcane commands to ge as
far as the grub problem. Perhaps I can do everything manually
and only use guestfish for the last step with the grub. It
would be nice if there were a better way to do it.

I am sure someone will pipe in "this is the wrong list". After
the day I have had on this so far, with dead end after
dead end, as Rhett Butler said to Scarlett: "Frankly m'am, I
don't give a damn."

Any one have some ideas? This really should be something that
is easy to do.







More information about the libvirt-users mailing list