[one-users] KVM Qemu does not mount DATABLOCK.

Leong Marco leong.chou.kin at usj.edu.mo
Fri Mar 4 07:43:57 PST 2011


Steven,

It works, Great Thanks.

I used virtio to all device.
 /dev/vda as OS image
/dev/vdb as swap
/dev/vdc as my Datablock.

As you have mentioned, it might be some kind of kernel issue which work with vde driver. Very appreciate for you help. 

Besides, is it possible to make the disk available at the time it create ?

Inside the VM, I see that those disk does not have valid partition, fdisk -l message as follows:


# fdisk -l

Disk /dev/vda: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/vda1   *           1          13      104391   83  Linux
/dev/vda2              14         261     1992060   8e  Linux LVM

Disk /dev/vdb: 1073 MB, 1073741824 bytes
16 heads, 63 sectors/track, 2080 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

Disk /dev/vdb doesn't contain a valid partition table

Disk /dev/vdc: 5368 MB, 5368709120 bytes
16 heads, 63 sectors/track, 10402 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

Disk /dev/vdc doesn't contain a valid partition table


Cheers,

Leong Marco
leong.chou.kin at usj.edu.mo



On Mar 4, 2011, at 11:21 PM, Steven Timm wrote:

> I've made something like this work, but I couldn't make the datablock as virtio.  If you call for a virtio datablock by default it comes up as /dev/vde, for which many kernels don't have the drivers.
> 
> So on mine, I declared OS image to be virtio / dev/vda,
> swap to be virtio /dev/vdb
> datablock to be ide /dev/hda
> iso disk to be ide /dev/hdc.
> 
> Steve Timm
> 
> 
> 
> On Fri, 4 Mar 2011, Leong Marco wrote:
> 
>> Hi all,
>> 
>> I have created a CentOS which is sized 2GB. I would like to add a DATABLOCK to it. However, the DATABLOCK cannot be found with fdisk -l (in the VM). It was able to mount the swap, but no the DATABLOCK.
>> 
>> Here is the config file that I have. Via
>> dumpxml in virsh:
>> <domain type='kvm' id='3'>
>> <name>one-103</name>
>> <uuid>61d4e005-8fd1-c0b5-43f4-1f75596a8451</uuid>
>> <memory>1048576</memory>
>> <currentMemory>1048576</currentMemory>
>> <vcpu>1</vcpu>
>> <os>
>>   <type arch='x86_64' machine='rhel5.4.0'>hvm</type>
>>   <boot dev='hd'/>
>> </os>
>> <features>
>>   <acpi/>
>> </features>
>> <clock offset='utc'/>
>> <on_poweroff>destroy</on_poweroff>
>> <on_reboot>restart</on_reboot>
>> <on_crash>destroy</on_crash>
>> <devices>
>>   <emulator>/usr/bin/kvm</emulator>
>>   <disk type='file' device='disk'>
>>     <driver name='qemu' type='raw'/>
>>     <source file='/srv/cloud/one/var/103/images/disk.0'/>
>>     <target dev='hda' bus='virtio'/>
>>   </disk>
>>   <disk type='file' device='disk'>
>>     <driver name='qemu' type='raw'/>
>>     <source file='/srv/cloud/one/var/103/images/disk.1'/>
>>     <target dev='hde' bus='virtio'/>
>>   </disk>
>>   <disk type='file' device='disk'>
>>     <driver name='qemu' type='raw'/>
>>     <source file='/srv/cloud/one/var/103/images/disk.2'/>
>>     <target dev='hdd' bus='ide'/>
>>   </disk>
>>   <interface type='bridge'>
>>     <mac address='02:00:ac:19:04:0c'/>
>>     <source bridge='br0'/>
>>     <target dev='vnet0'/>
>>   </interface>
>> </devices>
>> </domain>
>> 
>> The definition file.
>> 
>> CPU 	= 1
>> MEMORY	= 1024
>> NAME	= "Web Server"
>> 
>> OS = [ ARCH = x86_64, ROOT=hda ]
>> 
>> DISK = [ IMAGE = "base-centos-5.5-x86_64", bus = virtio, target = hda]
>> 
>> DISK = [IMAGE = "5gb-image", bus = virtio]
>> 
>> DISK = [TYPE = swap, SIZE= 1024,  target = hdd]
>> 
>> FEATURES = [ACPI = yes]
>> 
>> NIC = [	NETWORK = "Network", IP=172.25.4.12]
>> 
>> Please, could anyone help one this. Since I have to prepare several VM on next week for other students to play inside it.
>> 
>> 
>> Leong Marco
>> leong.chou.kin at usj.edu.mo
>> 
>> 
>> 
>> 
> 
> -- 
> ------------------------------------------------------------------
> Steven C. Timm, Ph.D  (630) 840-8525
> timm at fnal.gov  http://home.fnal.gov/~timm/
> Fermilab Computing Division, Scientific Computing Facilities,
> Grid Facilities Department, FermiGrid Services Group, Group Leader.
> Lead of FermiCloud project.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20110304/0ffc73c5/attachment-0003.htm>


More information about the Users mailing list