Re: libvirt + rbd questions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dajka:
    Yes, you are right. Thanks for your reply . I changed a computer
to  do the same thing , it worked. And I compared the packages , but
found nothing different yet . There must be something I am still
missing.

On Fri, Aug 25, 2017 at 3:25 PM, Dajka Tamás <viper@xxxxxxxxxxx> wrote:
> Hi,
>
> is qemu-img working for you ont he VM Host machine?
>
> Did you create the vol? What does 'rbd ls' say?
>
> Did you feed the secret (and the key created with ceph auth) to virsh?
>
> Cheers,
>
>         Tom
> p.s.: you maybe need anyother package for qemu-rbd support - I did so on
> latest Debain (stretch)
>
> -----Original Message-----
> From: ceph-users [mailto:ceph-users-bounces@xxxxxxxxxxxxxx] On Behalf Of Z
> Will
> Sent: Friday, August 25, 2017 8:49 AM
> To: Ceph-User <ceph-users@xxxxxxxx>
> Subject:  libvirt + rbd questions
>
> Hi all:
>     I have tried to install a vm using rbd as disk, following the steps from
> ceph doc, but met some problems. the packages environment is following:
>
> CentOS Linux release 7.2.1511 (Core)
> libvirt-2.0.0-10.el7_3.9.x86_64
> libvirt-python-2.0.0-2.el7.x86_64
> virt-manager-common-1.4.0-2.el7.noarch
> qemu-2.0.0-1.el7.6.x86_64
>
> and the procedure  is :
> create a pool
> <pool type='rbd'>
> <name>rbd2</name>
> <capacity unit='bytes'>48283717632</capacity>
> <allocation unit='bytes'>133</allocation> <available
> unit='bytes'>46990565376</available>
> <source>
> <host name='10.202.127.11' port='6789'/> <name>rbd</name> <auth type='ceph'
> username='admin'> <secret uuid='f75248a0-ac7e-4c0e-a90a-2d8d00833132'/>
> </auth>
> </source>
> </pool>
>
> create a vol t2
>
> run the following cmd
>
> virt-install -n puppy2 --vcpu 1 -c /etc/ceph/tahr64-6.0.5.iso --disk
> vol=rbd2/t2  --memory 1024 --vnc  --vnclisten=0.0.0.0 -v
>
> it failed , the error is :
> WARNING  No operating system detected, VM performance may suffer.
> Specify an OS with --os-variant for optimal results.
> WARNING  Unable to connect to graphical console: virt-viewer not installed.
> Please install the 'virt-viewer' package.
> WARNING  No console to launch for the guest, defaulting to --wait -1
>
> Starting install...
> ERROR    internal error: qemu unexpectedly closed the monitor:
> (process:663223): GLib-WARNING **: gmem.c:482: custom memory allocation
> vtable not supported 2017-08-25T06:33:59.392000Z qemu-system-x86_64: -drive
> file=rbd:rbd/t2:auth_supported=none:mon_host=10.202.127.11\:6789,format=raw,
> if=none,id=drive-ide0-0-0:
> could not open disk image
> rbd:rbd/t2:auth_supported=none:mon_host=10.202.127.11\:6789: Unknown
> protocol Domain installation does not appear to have been successful.
> If it was, you can restart your domain by running:
>   virsh --connect qemu:///system start puppy2 otherwise, please restart your
> installation.
>
>
> google it , change the /usr/share/virt-manager/virtinst/guest.py file , like
> this
>
>     def _build_xml(self):
>         install_xml = self._get_install_xml(install=True)
>         final_xml = self._get_install_xml(install=False)
>
>         auth_secret = '''
>         <auth username='admin'>
>             <secret type='ceph'
> uuid='f75248a0-ac7e-4c0e-a90a-2d8d00833132'/>
>         </auth>
>         '''
>         import re
>         rgx_auth = re.compile('(?<=<disk type="network"
> )([^>]*?">).*?(?= *?)', re.S)
>
>         install_xml = rgx_auth.sub('\\1' + auth_secret, install_xml)
>
>         final_xml = rgx_auth.sub('\\1' + auth_secret, final_xml)
>         logging.debug("Generated install XML: %s",
>             (install_xml and ("\n" + install_xml) or "None required"))
>         logging.debug("Generated boot XML: \n%s", final_xml)
>
>         return install_xml, final_xml
>
> and run
>
> virt-install -n puppy2 --vcpu 1 -c /etc/ceph/tahr64-6.0.5.iso --disk
> vol=rbd2/t2  --memory 1024 --vnc  --vnclisten=0.0.0.0 -v --print-xml
>
>     <disk type="network" device="disk">
>         <auth username='admin'>
>             <secret type='ceph'
> uuid='f75248a0-ac7e-4c0e-a90a-2d8d00833132'/>
>         </auth>
>
>       <driver name="qemu" type="raw"/>
>       <source protocol="rbd" name="rbd/t2">
>         <host name="10.202.127.11" port="6789"/>
>       </source>
>       <target dev="hda" bus="ide"/>
>     </disk>
>
> looks ok
>
> and run again
> virt-install -n puppy2 --vcpu 1 -c /etc/ceph/tahr64-6.0.5.iso --disk
> vol=rbd2/t2  --memory 1024 --vnc  --vnclisten=0.0.0.0 -v
>
> still error
> WARNING  No operating system detected, VM performance may suffer.
> Specify an OS with --os-variant for optimal results.
> WARNING  Unable to connect to graphical console: virt-viewer not installed.
> Please install the 'virt-viewer' package.
> WARNING  No console to launch for the guest, defaulting to --wait -1
>
> Starting install...
> ERROR    internal error: qemu unexpectedly closed the monitor:
> (process:663621): GLib-WARNING **: gmem.c:482: custom memory allocation
> vtable not supported 2017-08-25T06:42:09.429057Z qemu-system-x86_64: -drive
> file=rbd:rbd/puppy2:id=admin:key=AQCeuf5YUac6NxAAU3CCcwnaI5z7pgUww4Gyrg==:au
> th_supported=cephx\;none:mon_host=10.202.127.11\:6789,format=raw,if=none,id=
> drive-ide0-0-0:
> could not open disk image
> rbd:rbd/puppy2:id=admin:key=AQCeuf5YUac6NxAAU3CCcwnaI5z7pgUww4Gyrg==:auth_su
> pported=cephx\;none:mon_host=10.202.127.11\:6789:
> Unknown protocol
> Domain installation does not appear to have been successful.
> If it was, you can restart your domain by running:
>   virsh --connect qemu:///system start puppy otherwise, please restart your
> installation.
>
>
>
> I tried to just create rbd as disk and attach it to the existed VM, it is OK
> , so I don't think it is the packages version problem. Has anyone met this
> problem ? Or where am I wrong in the above procedure ?
> _______________________________________________
> ceph-users mailing list
> ceph-users@xxxxxxxxxxxxxx
> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
>
> _______________________________________________
> ceph-users mailing list
> ceph-users@xxxxxxxxxxxxxx
> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com




[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux