Tuesday, February 26, 2013

SmartOS: permanently set VNC port

vmadm update dece98e8-29d7-4394-8cf1-d0185e2258b7 vnc_port=35351

...
  "vnc": {
    "host": "192.168.0.40",
    "port": 35351,
    "display": 29451
  },
...


Now, you can configure remmina to connect to 192.168.0.40:35351

Friday, February 22, 2013

smartos vmunbundle exited with code 1

Smartos joyent_20130207T202554Z

vmadm send f59c8669-b709-42cb-98e8-a2f1fa1ee7bf |ssh destination.host vmadm receive

I get this error

vmunbundle exited with code 1

The problem was that, since I was doing some test, there was, on the destination, a zfs dataset for the same zone of a previous attemp.

Solution, on the destination,

zfs destroy zones/f59c8669-b709-42cb-98e8-a2f1fa1ee7bf

Friday, February 15, 2013

SmartOS, kvm, vnc and keyboard

SmartOS.
I have had problems with the keyboard using VNC to connect to a KVM guest.
Keyboard mapping I mean.
The solution working for me was:

vmadm update <uuid> qemu_extra_opts="-k it"

linux scp and umask

I use CentOS 5.x
The problem is that if I use scp or sftp to copy a file on such CentOS server, the umask is not taken in consideration.
Behavior of scp and sftp is different.

Btw, a solution is to use openssh 5, but I don't like to alter the distribution, since CentOS 5 install openssh 4.

Using google I've found different solution (pam? etc.) but no one works for me.

So, a way to make what I want is:

For sftp

vi /etc/ssh/sshd_config
...
# override default of no subsystems
# Subsystem       sftp    /usr/libexec/openssh/sftp-server
Subsystem sftp /bin/sh -c 'umask 0002; /usr/libexec/openssh/sftp-server'

and restart sshd


And for scp

vi /home/myuser/.bashrc




adding (0002 or what you want)

umask 0002

Tuesday, February 5, 2013

smartos update_disks

I want to change the disk model in a KVM machine on SmartOS.

vi upddisk.json

  {
   "update_disks": [
    {
     "path": "/dev/zvol/rdsk/zones/e888a82a-bca1-49fda6d7-988debb09703-disk0",
     "model": "ide"
    }
   ]
  }


vmadm update e888a82a-bca1-49fd-a6d7-988debb09703 -f upddisk.json

vmadm get  e888a82a-bca1-49fd-a6d7-988debb09703