Archive

Archive for the ‘LDom’ Category

vnet: [ID 214931 kern.info] vnet0: vnet_addmac: programming macaddr(2:8:20:ad:ea:21) is not supported

November 10, 2015 Leave a comment

I created VNIC withing LDom Guest (devdbvm) by dladm create-vnic -l net0 vnic3, it showed failures and

Nov 10 11:21:58 devdbvm vnet: [ID 214931 kern.info] vnet0: vnet_addmac: programming macaddr(2:8:20:ad:ea:21) is not supported

Solution:

  1. Stop the guest

root@jecdb02:~# ldm stop -f devdbvm
LDom devdbvm stopped

2. Set mac-address of vnet with 8 X alt-mac-addres with command
root@jecdb02:~#  ldm set-vnet alt-mac-addrs=auto,auto,auto,auto,auto,auto,auto,auto vnet0 devdbvm

3. Show the binding

ldm list-bindings devdbvm

vnet0            primary-vsw0@primary        0    network@0  00:14:4f:fa:f8:68        1                         1500
00:14:4f:fa:6a:04
00:14:4f:f8:76:eb
00:14:4f:fa:de:4d
00:14:4f:fb:aa:d2
00:14:4f:fa:da:e2
00:14:4f:fb:9a:40
00:14:4f:fb:d3:6b
00:14:4f:fb:63:f5

4. Start the VM

Categories: LDom

Assign VNET ID

August 8, 2011 Leave a comment

Today, I found that vnet mac-addresses are not matching between guest OS and ldm primary domain configuration. i.e.

At guest OS level, the vnet2 mac-address is “0:14:4f:f8:8a:74”

# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
vnet2: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.100.200 netmask ffffff00 broadcast 192.168.100.255
ether 0:14:4f:f8:8a:74

At Primary Domain, the vnet3 mac-address is “00:14:4f:f9:e9:19 “
# ldm list-bindings ldg2

NETWORK
NAME             SERVICE                     ID   DEVICE     MAC               MODE   PVID VID                  MTU   LINKPROP
vnet2            primary-vsw0                0               00:14:4f:f9:e9:19        1
vnet1            primary-vsw2                1               00:14:4f:f8:8a:74        1

===============================================================

Finally, I found that the ID is used to match the vnet interface at guest OS.

ID=0 –> vnet0, ID=1 –> vnet1, ID=2 –> vnet2

Therefore, I reassign the vnet to guest with ID to make sure the vnet mac-address consistent between guest OS and LDM primary domain

1. Assign the vnet to guest with id

# ldm add-vnet id=0 vnet0 primary-vsw1 ldg2

# ldm add-vnet id=1 vnet1 primary-vsw2 ldg2

# ldm add-vent id=2 vnet2 primary-vsw0 ldg2

# ldm list-bindings ldg2

NETWORK
NAME             SERVICE                     ID   DEVICE     MAC               MODE   PVID VID                  MTU   LINKPROP
vnet1            primary-vsw2                1               00:14:4f:f8:8a:74        1
vnet2            primary-vsw0                2               00:14:4f:f9:e9:19        1
vnet0            primary-vsw1                0               00:14:4f:f9:2b:c4        1

DISK

2. Bind the guest ldg2

# ldm bind ldg2
# ldm start ldg2
LDom ldg2 started

3. Verify the mac-address of guest.

Check them at Guest OS level

# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
vnet0: flags=1000842<BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
inet 0.0.0.0 netmask 0
ether 0:14:4f:f9:2b:c4
vnet1: flags=1000842<BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 4
inet 0.0.0.0 netmask 0
ether 0:14:4f:f8:8a:74
vnet2: flags=4001000842<BROADCAST,RUNNING,MULTICAST,IPv4,DUPLICATE> mtu 1500 index 2
inet 192.168.100.200 netmask ffffff00 broadcast 192.168.100.255
ether 0:14:4f:f9:e9:19

4. All mac-address are matching set at LDM primary primary

 

Categories: LDom

Change LDM guest vnet mac-addree

June 9, 2011 Leave a comment

1. Stop ldm guest

2. Unbind the ldm

ldm unbind ldg1

3. Change mac-address of vnet

# ldm set-vnet mac-addr=0:14:4f:f9:65:4e vnet0 ldg1
# ldm set-vnet mac-addr=0:14:4f:fa:76:1d vnet1 ldg1
# ldm bind ldg1
# ldm list-bindings ldg1

4. Start the guest

Categories: LDom

cannot destroy ‘ldmpool/ldg1/disk0@version1’: snapshot has dependent clones

June 1, 2011 Leave a comment

This is caused by cloning on the snapshot. When trying to destroy the snapshot,  we get the message “cannot destroy ‘ldmpool/ldg1/disk0@version1’: snapshot has dependent clones” prompt. The following I show what happened on a snapshot backup

# zfs list
NAME                          USED  AVAIL  REFER  MOUNTPOINT
ldmpool                      83.8G   160G    32K  /ldmpool
ldmpool/ldg                  38.8G   160G    21K  /ldmpool/ldg
ldmpool/ldg/disk0            38.8G   193G  5.50G  –
ldmpool/ldg/disk0@version1    280M      –  4.87G  –
ldmpool/ldg/disk0@version2   31.7M      –  5.49G  –
ldmpool/ldg1                 35.5G   160G    21K  /ldmpool/ldg1
ldmpool/ldg1/disk0           35.5G   191G  4.60G  –
ldmpool/ldg1/disk0@version1   551K      –  4.60G  – <- snapshot of ldmpool/ldg1/disk0
ldmpool/ldg2                 16.2M   160G    21K  /ldmpool/ldg2
ldmpool/ldg2/disk0           16.2M   160G  4.60G  – <- this image cloned from ldmpool/ldg1/disk0@version1
# zfs destroy ldmpool/ldg1/disk0@version1 <- destroy the snapshot
cannot destroy ‘ldmpool/ldg1/disk0@version1’: snapshot has dependent clones
use ‘-R’ to destroy the following datasets:
ldmpool/ldg2/disk0
# zfs destroy -R ldmpool/ldg1/disk0@version1 <- destroy with -R option. After that the snapshot and dependent clone ldmpool/ldg2/disk0 are removed

# zfs list
NAME                         USED  AVAIL  REFER  MOUNTPOINT
ldmpool                     79.2G   165G    32K  /ldmpool
ldmpool/ldg                 38.8G   165G    21K  /ldmpool/ldg
ldmpool/ldg/disk0           38.8G   198G  5.50G  –
ldmpool/ldg/disk0@version1   280M      –  4.87G  –
ldmpool/ldg/disk0@version2  31.7M      –  5.49G  –
ldmpool/ldg1                30.9G   165G    21K  /ldmpool/ldg1
ldmpool/ldg1/disk0          30.9G   191G  4.60G  –
ldmpool/ldg2                  21K   165G    21K  /ldmpool/ldg2
ldmpool/yckcasz01           1.55G   165G    21K  /ldmpool/yckcasz01

In conclusion, removing a snapshot with dependent clones, we have to take care since the “destroy -R” will automatically remove all dependents clones as well

Categories: LDom, ZFS

cannot remove device links for ‘ldmpool/ldg2/disk0’: dataset is busy

June 1, 2011 Leave a comment

Symptoms

1. I have made a snapshot for LDM guest ldg2 as the following

# zfs snapshot ldmpool/ldg2/disk0@version1

2. After some changes are done on the guest ldg2, I want to rollback to the snapshot. Then I stop ldg2 and apply the rollback by the command

#  zfs rollback ldmpool/ldg2/disk0@version1
cannot remove device links for ‘ldmpool/ldg2/disk0’: dataset is busy

Fix

Finally, I removed ldmpool/ldg2/disk0 from I/O domain, start the rollback and re-add the vdisk to ldg2. The details is shown as following

# ldm remove-vdisk disk0 ldg2
# ldm remove-vdsdev ldg2_disk0@primary-vds0
# zfs rollback ldmpool/ldg2/disk0@version1 <– rollback successfully
# ldm add-vdsdev /dev/zvol/dsk/ldmpool/ldg2/disk0 ldg2_disk0@primary-vds0
# ldm add-vdisk disk0 ldg2_disk0@primary-vds0 ldg2
# ldm list ldg2
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  UPTIME
ldg2             bound      ——  5008    4     4G

 

Categories: LDom

Add VLAN into LDM vswitch (primary-vsw1)

May 31, 2011 Leave a comment

1. Login control domain

2. List current primary domain setting to show

# ldm list-bindings primary

NAME             MAC               NET-DEV   ID   DEVICE     LINKPROP   DEFAULT-VLAN-ID PVID VID                  MTU   MODE
primary-vsw1     00:14:4f:f8:72:6f e1000g1   1    switch@1              1               999  2,100                1500
PEER                        MAC               PVID VID                  MTU   LINKPROP
vnet1@gsvmdb01              00:14:4f:f8:48:bc 999  2                    1500
vnet1@testvmdb              00:14:4f:fa:0b:f9 2    100                  1500
vnet1@sgvmdb01              00:14:4f:fa:f0:88 999  2                    1500
vnet1@tvmdb01               00:14:4f:fa:e7:b7 2    100                  1500
vnet1@vivmdb                00:14:4f:f8:d8:7f 1                         1500

3. Add VLAN 199

# ldm set-vswitch vid=2,199,100 primary-vsw1

4. Set guest vivmdb vnet1 in VLAN 199

# ldm set-vnet pvid=999 vid=199 vswitch=primary-vsw1 vnet1 vivmdb

5. Verify the setting of VLAN

# ldm list-bindings primary

NAME             MAC               NET-DEV   ID   DEVICE     LINKPROP   DEFAULT-VLAN-ID PVID VID                  MTU   MODE
primary-vsw1     00:14:4f:f8:72:6f e1000g1   1    switch@1              1               999  2,199,100            1500
PEER                        MAC               PVID VID                  MTU   LINKPROP
vnet1@gsvmdb01              00:14:4f:f8:48:bc 999  2                    1500
vnet1@testvmdb              00:14:4f:fa:0b:f9 2    100                  1500
vnet1@sgvmdb01              00:14:4f:fa:f0:88 999  2                    1500
vnet1@tvmdb01               00:14:4f:fa:e7:b7 2    100                  1500
vnet1@vivmdb                00:14:4f:f8:d8:7f 999  199                  1500 <– this shows vnet1 of vivmdb set to VLAN199

6. Plumb VLAN Connect (vsw199001)  at primary domain

# ifconfig vsw199001 172.31.199.1/24 up

7. Login guest domain vivmdb

# telnet localhost 5004

8. Plumb VLAN interface (vnet199001) at guest domain

# ifconfig vnet199001 plumb
# ifconfig vnet199001 172.31.199.3/24 up
# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
vnet0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.77.193 netmask ffffff00 broadcast 192.168.77.255
ether 0:14:4f:f9:2d:4c
vnet199001: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 4
inet 172.31.199.3 netmask ffffff00 broadcast 172.31.199.255
ether 0:14:4f:f8:d8:7f

# ping 172.31.199.1
172.31.199.1 is alive

 

Categories: LDom

Change LDom Guest to non auto boot

April 14, 2011 Leave a comment

1. Change the auto-boot? to false

# ldm set-variable “auto-boot?=false” testvmdb

2. Restart the guest

# ldm stop testvmdb
LDom testvmdb stopped
# ldm start testvmdb
LDom testvmdb started

3. Check guest status

# ldm list
NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  UPTIME
primary          active     -n-cv-  SP      4     4224M    2.1%  127d
gsvmdb01         active     -n—-  5000    4     6G        83%  13d 5h 58m
sgvmdb01         active     -n—-  5002    4     8G       3.8%  49d 38m
testvmdb         active     -t—-  5001    4     4G        25%  4s
tvmdb01          active     -n—-  5003    4     4G       2.6%  42d 1h 7m

4. Login  the guest

# telnet localhost 5001
Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.

Connecting to console “testvmdb” in group “testvmdb” ….
Press ~? for control options ..

{0} ok

Categories: LDom