cloudstack-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Milamber <milam...@apache.org>
Subject Re: 4.2 KVM vnc connect need password?
Date Fri, 15 Nov 2013 15:08:55 GMT
Hello,

My way to get the VNC password (new feature since CloudStack 4.2):

On CloudStack DB:
select vnc_password from cloud.vm_instance where instance_name = ' 
i-2-88-VM' or name = 'InstanceName';"

where (only 1 argument is require)
i-2-88-VM is the code name
or
InstanceName the display name

The result is a string like this:
aMKCd85oae4AbBxfKtDqgwalJdWO4mXXXXXXXX=


After, on cloud manager (one line):
java -cp /usr/share/cloudstack-common/lib/jasypt-1.9.0.jar 
org.jasypt.intf.cli.JasyptPBEStringDecryptionCLI 
input="aMKCd85oae4AbBxfKtDqgwalJdWO4mXXXXXXX=" 
password="YOUR_CLOUD_PASSWORD"

YOUR_PASSWORD is the password use with cloudstack-setup-databases 
command during installation.

The output show the password like this:
5ab5f34cd87d224c


A simple script shell can be create to automate these commands.

Milamber


P.S. If another (simple) way exists, please share it.



Le 15/11/2013 04:28, ma y a ecrit :
> <domain type='kvm' id='1'>
>    <name>i-2-148-VM</name>
>    <uuid>d7584c96-3dca-4e46-9736-9708464ae3d6</uuid>
>    <description>CentOS 5.5 (64-bit)</description>
>    <memory unit='KiB'>1048576</memory>
>    <currentMemory unit='KiB'>208896</currentMemory>
>    <vcpu placement='static'>1</vcpu>
>    <cputune>
>      <shares>200</shares>
>    </cputune>
>    <os>
>      <type arch='x86_64' machine='rhel6.4.0'>hvm</type>
>      <boot dev='cdrom'/>
>      <boot dev='hd'/>
>    </os>
>    <features>
>      <acpi/>
>      <apic/>
>      <pae/>
>    </features>
>    <cpu mode='host-model'>
>      <model fallback='allow'/>
>    </cpu>
>   <clock offset='utc'/>
>    <on_poweroff>destroy</on_poweroff>
>    <on_reboot>restart</on_reboot>
>    <on_crash>destroy</on_crash>
>    <devices>
>      <emulator>/usr/libexec/qemu-kvm</emulator>
>      <disk type='block' device='disk'>
>        <driver name='qemu' type='raw' cache='none'/>
>        <source dev='/dev/kvmvg01/dabe7f9d-59e5-4116-bb8d-f43dd6202f0b'/>
>        <target dev='vda' bus='virtio'/>
>        <alias name='virtio-disk0'/>
>        <address type='pci' domain='0x0000' bus='0x00' slot='0x04'
> function='0x0'/>
>      </disk>
>      <disk type='block' device='disk'>
>        <driver name='qemu' type='raw' cache='none'/>
>        <source dev='/dev/kvmvg01/a1ce67a7-1171-4a27-9798-582db6bed4c8'/>
>        <target dev='vdb' bus='virtio'/>
>        <alias name='virtio-disk1'/>
>        <address type='pci' domain='0x0000' bus='0x00' slot='0x05'
> function='0x0'/>
>      </disk>
>      <disk type='file' device='cdrom'>
> <driver name='qemu' type='raw' cache='none'/>
>        <target dev='hdc' bus='ide'/>
>        <readonly/>
>        <alias name='ide0-1-0'/>
>        <address type='drive' controller='0' bus='1' target='0' unit='0'/>
>      </disk>
>      <controller type='ide' index='0'>
>        <alias name='ide0'/>
>        <address type='pci' domain='0x0000' bus='0x00' slot='0x01'
> function='0x1'/>
>      </controller>
>      <controller type='usb' index='0'>
>        <alias name='usb0'/>
>        <address type='pci' domain='0x0000' bus='0x00' slot='0x01'
> function='0x2'/>
>      </controller>
>      <interface type='bridge'>
>        <mac address='02:00:4b:d1:00:2a'/>
>        <source bridge='brem3-2209'/>
>        <target dev='vnet0'/>
>        <model type='virtio'/>
>        <bandwidth>
>          <inbound average='25600' peak='25600'/>
> <outbound average='25600' peak='25600'/>
>        </bandwidth>
>        <alias name='net0'/>
>        <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
> function='0x0'/>
>      </interface>
>      <serial type='pty'>
>        <source path='/dev/pts/0'/>
>        <target port='0'/>
>        <alias name='serial0'/>
>      </serial>
>      <console type='pty' tty='/dev/pts/0'>
>        <source path='/dev/pts/0'/>
>        <target type='serial' port='0'/>
>        <alias name='serial0'/>
>      </console>
>      <input type='tablet' bus='usb'>
>        <alias name='input0'/>
>      </input>
>      <input type='mouse' bus='ps2'/>
>      <graphics type='vnc' port='5900' autoport='yes' listen='0.0.0.0'>
>        <listen type='address' address='0.0.0.0'/>
>      </graphics>
> <video>
>        <model type='cirrus' vram='9216' heads='1'/>
>        <alias name='video0'/>
>        <address type='pci' domain='0x0000' bus='0x00' slot='0x02'
> function='0x0'/>
>      </video>
>      <memballoon model='virtio'>
>        <alias name='balloon0'/>
>        <address type='pci' domain='0x0000' bus='0x00' slot='0x06'
> function='0x0'/>
>      </memballoon>
>    </devices>
>    <seclabel type='none'/>
> </domain>
>
> As you can see,there is no "password" option about vnc.
>
>
> 2013/11/15 卢惠勇 <luhuiyong@conew.com>
>
>>   login the  Hypervisor and run "virsh dumpxml s-1-VM",replace "s-1-VM" with
>> your vm name .you can find the vnc password
>>
>>
>> 2013/11/15 ma y <breeze7086@gmail.com>
>>
>>> Hi,everyone.
>>> My environment :Cloudstack4.2 + centos6.4(KVM).
>>> When i use vnc viwer connect a VM,type "192.168.1.100:0",it shows need a
>>> password to continue.
>>> Is that a new feature for KVM vnc ?  How can i use vnc viwer to connect
>> it
>>> and what that "password" is .
>>> thk you !
>>>
>>
>>
>> --
>>
>> ------------------------------
>> 金山网络运维部-卢惠勇
>> 分机:2477
>> 手机:15018838589
>> qq:313024095
>>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message