LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-13-2009, 07:17 AM   #1
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
Riddle Me This...?


I've read tutorials where you can use Qemu to create a VHD of whatever size-No, I'm not talking about Qemulator-I'm saying they were using the terminal, with something like- "qemu-img -f create mydisk.img 500m" or something like that...
I can't find the tutorial now, but does anyone know how this is done?
I checked the Qemu site, but couldn't really find anything.
Can a VHD you make using qemulator be moved from wherever it is and still work?
Thanks
 
Old 04-13-2009, 07:27 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
Do you mean something like this ?

To create the VHD
Code:
qemu-img create -f qcow windows.img 5G
To start qemu with the created VHD
Code:
qemu -localtime -cdrom /home/repo/data/iso/win2000.iso -m 384 -boot d windows.img
 
Old 04-13-2009, 07:31 AM   #3
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Original Poster
Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
That's great-where is that info found...?
Also-where will it creat this img-don't I have to give it a path?
What Linux systems have this Qemu? I have Qemulator and Qemu-Launcher-can I do it with them?
Thanks
 
Old 04-13-2009, 07:42 AM   #4
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
Quote:
Also-where will it creat this img-don't I have to give it a path?
In general I cd to where I want to create the VHD
Quote:
What Linux systems have this Qemu? I have Qemulator and Qemu-Launcher-can I do it with them?
All of them I think, just install qemu
Debian has it in the repo's, dunno for other distro's

Quote:
That's great-where is that info found...?
Don't remember, had it in my logbook I keep with this kind of thingies

Last edited by repo; 04-13-2009 at 07:44 AM.
 
Old 04-13-2009, 07:48 AM   #5
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Original Poster
Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
MMMMmmm...I read in the tutorial I can't find that you can make the VHD with a specific filesytems-like FAT32 or swap-is that true- or what is the inside of the VHD?
Is that done when you make the img or you somehow partition/format it?
Thanks again
 
Old 04-13-2009, 08:18 AM   #6
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Original Poster
Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
OK-tried what you said and the commands are incomplete-
Code:
qemu-img version 0.9.1, Copyright (c) 2004-2008 Fabrice Bellard
usage: qemu-img command [command options]
QEMU disk image utility

Command syntax:
  create [-e] [-6] [-s] [-b base_image] [-f fmt] filename [size]
  commit [-f fmt] filename
  convert [-c] [-e] [-6] [-s] [-f fmt] filename [filename2 [...]] [-O output_fmt] output_filename
  info [-f fmt] filename

Command parameters:
  'filename' is a disk image filename
  'base_image' is the read-only disk image which is used as base for a copy on
    write image; the copy on write image only stores the modified data
  'fmt' is the disk image format. It is guessed automatically in most cases
  'size' is the disk image size in kilobytes. Optional suffixes 'M' (megabyte)
    and 'G' (gigabyte) are supported
  'output_filename' is the destination disk image filename
  'output_fmt' is the destination format
  '-c' indicates that target image must be compressed (qcow format only)
  '-e' indicates that the target image must be encrypted (qcow format only)
  '-6' indicates that the target image must use compatibility level 6 (vmdk format only)
  '-s' indicates that the target image must use of type SCSI (vmdk format only)

Supported format: parallels qcow2 vvfat vpc bochs dmg cloop vmdk qcow cow host_device raw
Can you give me an exaample?
For the input name-can I use a folder?
 
Old 04-13-2009, 08:23 AM   #7
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
repo@cannabis:~$ cd temp
repo@cannabis:~/temp$ ls
repo@cannabis:~/temp$ qemu-img create -f qcow windows.img 5G
Formatting 'windows.img', fmt=qcow, size=5242880 kB
repo@cannabis:~/temp$ ls
windows.img
repo@cannabis:~/temp$
 
Old 04-13-2009, 08:36 AM   #8
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Original Poster
Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
Nope-it just give me the same readout as above^

Some command is still missing-input folder, etc?
 
Old 04-13-2009, 08:40 AM   #9
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
Could you post the exact command you are using ?
 
Old 04-13-2009, 08:52 AM   #10
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Original Poster
Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
The readout-

Code:
root@bz-desktop:/home/bz# cd /tmp
root@bz-desktop:/tmp# ls
gconfd-bz       pulse-bz         Tracker-bz.5918
keyring-MFmj4S  seahorse-XKZAP8  virtual-bz.CaEgke
orbit-bz        tmp.folaEc5646
root@bz-desktop:/tmp# qemu-img create -f qcow windows.img 5m
qemu-img version 0.9.1, Copyright (c) 2004-2008 Fabrice Bellard
usage: qemu-img command [command options]
QEMU disk image utility

Command syntax:
  create [-e] [-6] [-s] [-b base_image] [-f fmt] filename [size]
  commit [-f fmt] filename
  convert [-c] [-e] [-6] [-s] [-f fmt] filename [filename2 [...]] [-O output_fmt] output_filename
  info [-f fmt] filename

Command parameters:
  'filename' is a disk image filename
  'base_image' is the read-only disk image which is used as base for a copy on
    write image; the copy on write image only stores the modified data
  'fmt' is the disk image format. It is guessed automatically in most cases
  'size' is the disk image size in kilobytes. Optional suffixes 'M' (megabyte)
    and 'G' (gigabyte) are supported
  'output_filename' is the destination disk image filename
  'output_fmt' is the destination format
  '-c' indicates that target image must be compressed (qcow format only)
  '-e' indicates that the target image must be encrypted (qcow format only)
  '-6' indicates that the target image must use compatibility level 6 (vmdk format only)
  '-s' indicates that the target image must use of type SCSI (vmdk format only)

Supported format: parallels qcow2 vvfat vpc bochs dmg cloop vmdk qcow cow host_device raw
root@bz-desktop:/tmp#
You see-it needs more input as what to do-as with all things terminal-the proper commands and usage examples are vague, badly written and would require an astronaught to figure out.
The Linux world needs to drop the esoteric and presumptuous attitude that the avg joe could decipher that "man" page above.
One needs clear examples with the full understanding that I am a Newbie.
thanks
 
Old 04-13-2009, 08:54 AM   #11
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
try
Code:
qemu-img create -f qcow windows.img 5M
size' is the disk image size in kilobytes. Optional suffixes 'M' (megabyte)
and 'G' (gigabyte) are supported

Last edited by repo; 04-13-2009 at 08:56 AM.
 
Old 04-13-2009, 08:58 AM   #12
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Original Poster
Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
Code:
root@bz-desktop:/tmp# qemu-img create -f qcow windows.img 5m
That's the exact command I used above and from the qemu page-same result-it just lists the man page-which is no help
 
Old 04-13-2009, 09:00 AM   #13
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
replace
Code:
5m
with
Code:
5M
 
Old 04-13-2009, 09:10 AM   #14
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Original Poster
Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
OK-I got it working-Now can I install the iso it's running off of into the vhd ".img"??
If yes-do I partition and format it from within the iso I boot?
Thanks again repo
 
Old 04-13-2009, 09:16 AM   #15
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
now type
Code:
qemu -localtime -cdrom /path-to/dsl-4.4.10.iso -m 384 -boot d windows.img
this will start dsl-4.4.10.iso in qemu, using the created VHD
The VHD is just an image file, you cannot partition or format it, it is virtual.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
video4linux Riddle jazpaisley Linux - Newbie 17 07-13-2009 04:52 AM
need help with a riddle phntm31 General 10 09-29-2006 03:09 PM
Riddle me this on 2.6.10 aufomechanic Linux - General 2 02-09-2005 03:56 AM
A riddle: can you solve it? schatoor General 53 03-27-2004 07:42 AM
riddle for you all SlippySlappy General 9 10-07-2003 11:30 AM


All times are GMT -5. The time now is 09:12 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration