-
-
Save sjorge/ed6231c38ed45f7ae8b2ed2613baa97c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@carbon ~]# uname -a | |
SunOS carbon 5.11 joyent_20180510T130120Z i86pc i386 i86pc | |
## IDE/SCSI/virtio should work for KVM | |
[root@carbon /tmp]# vmadm create -f kvm_ide.json | |
Successfully created VM fe2d7897-8824-4d62-c86d-8aae960df561 | |
[root@carbon /tmp]# vmadm create -f kvm_scsi.json | |
Successfully created VM def42183-1409-6e0f-910f-d978a6841b19 | |
[root@carbon /tmp]# vmadm create -f kvm_virtio.json | |
Successfully created VM f3a0ad2c-2c32-e60e-d60c-a5c0496d3b00 | |
## AHCI should not work for KVM | |
[root@carbon /tmp]# vmadm create -f kvm_ahci.json | |
"achi" is not a valid disk model for kvm brand. Valid are: virtio,scsi,ide | |
## AHCI should not work on update for KVM | |
[root@carbon /tmp]# echo '{"update_disks": [{"path": "/dev/zvol/rdsk/zones/fe2d7897-8824-4d62-c86d-8aae960df561-disk0", "model": "ahci"}]}' | vmadm update fe2d7897-8824-4d62-c86d-8aae960df561 | |
"ahci" is not a valid disk model for kvm brand. Valid are: virtio,scsi,ide | |
## IDE/SCSI/virtio should work on update for KVM | |
[root@carbon /tmp]# echo '{"update_disks": [{"path": "/dev/zvol/rdsk/zones/fe2d7897-8824-4d62-c86d-8aae960df561-disk0", "model": "virtio"}]}' | vmadm update fe2d7897-8824-4d62-c86d-8aae960df561 | |
Successfully updated VM fe2d7897-8824-4d62-c86d-8aae960df561 | |
[root@carbon /tmp]# echo '{"update_disks": [{"path": "/dev/zvol/rdsk/zones/fe2d7897-8824-4d62-c86d-8aae960df561-disk0", "model": "scsi"}]}' | vmadm update fe2d7897-8824-4d62-c86d-8aae960df561 | |
Successfully updated VM fe2d7897-8824-4d62-c86d-8aae960df561 | |
[root@carbon /tmp]# echo '{"update_disks": [{"path": "/dev/zvol/rdsk/zones/fe2d7897-8824-4d62-c86d-8aae960df561-disk0", "model": "ide"}]}' | vmadm update fe2d7897-8824-4d62-c86d-8aae960df561 | |
Successfully updated VM fe2d7897-8824-4d62-c86d-8aae960df561 | |
## dump the disk info | |
[root@carbon /tmp]# for u in fe2d7897-8824-4d62-c86d-8aae960df561 def42183-1409-6e0f-910f-d978a6841b19 f3a0ad2c-2c32-e60e-d60c-a5c0496d3b00; do vmadm get $u | json disks; done | |
[ | |
{ | |
"path": "/dev/zvol/rdsk/zones/fe2d7897-8824-4d62-c86d-8aae960df561-disk0", | |
"boot": false, | |
"model": "ide", | |
"media": "disk", | |
"zfs_filesystem": "zones/fe2d7897-8824-4d62-c86d-8aae960df561-disk0", | |
"zpool": "zones", | |
"size": 1024, | |
"compression": "lz4", | |
"refreservation": 1024, | |
"block_size": 8192 | |
} | |
] | |
[ | |
{ | |
"path": "/dev/zvol/rdsk/zones/def42183-1409-6e0f-910f-d978a6841b19-disk0", | |
"boot": false, | |
"model": "scsi", | |
"media": "disk", | |
"zfs_filesystem": "zones/def42183-1409-6e0f-910f-d978a6841b19-disk0", | |
"zpool": "zones", | |
"size": 1024, | |
"compression": "lz4", | |
"refreservation": 1024, | |
"block_size": 8192 | |
} | |
] | |
[ | |
{ | |
"path": "/dev/zvol/rdsk/zones/f3a0ad2c-2c32-e60e-d60c-a5c0496d3b00-disk0", | |
"boot": false, | |
"model": "virtio", | |
"media": "disk", | |
"zfs_filesystem": "zones/f3a0ad2c-2c32-e60e-d60c-a5c0496d3b00-disk0", | |
"zpool": "zones", | |
"size": 1024, | |
"compression": "lz4", | |
"refreservation": 1024, | |
"block_size": 8192 | |
} | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"autoboot": "false", | |
"alias": "kvm_ide", | |
"brand": "kvm", | |
"ram": "1023", | |
"vcpus": "1", | |
"nics": [ | |
{ | |
"nic_tag": "trunk", | |
"vlan_id": 10, | |
"ips": [ "dhcp", "addrconf" ], | |
"model": "virtio", | |
"allow_dhcp_spoofing": true, | |
"allow_ip_spoofing": true, | |
"allow_mac_spoofing": true, | |
"allow_restricted_traffic": true | |
} | |
], | |
"disks": [ | |
{ | |
"size": 1024, | |
"model": "ide", | |
"compression": "lz4" | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"autoboot": "false", | |
"alias": "kvm_scsi", | |
"brand": "kvm", | |
"ram": "1023", | |
"vcpus": "1", | |
"nics": [ | |
{ | |
"nic_tag": "trunk", | |
"vlan_id": 10, | |
"ips": [ "dhcp", "addrconf" ], | |
"model": "virtio", | |
"allow_dhcp_spoofing": true, | |
"allow_ip_spoofing": true, | |
"allow_mac_spoofing": true, | |
"allow_restricted_traffic": true | |
} | |
], | |
"disks": [ | |
{ | |
"size": 1024, | |
"model": "scsi", | |
"compression": "lz4" | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"autoboot": "false", | |
"alias": "kvm_virtio", | |
"brand": "kvm", | |
"ram": "1023", | |
"vcpus": "1", | |
"nics": [ | |
{ | |
"nic_tag": "trunk", | |
"vlan_id": 10, | |
"ips": [ "dhcp", "addrconf" ], | |
"model": "virtio", | |
"allow_dhcp_spoofing": true, | |
"allow_ip_spoofing": true, | |
"allow_mac_spoofing": true, | |
"allow_restricted_traffic": true | |
} | |
], | |
"disks": [ | |
{ | |
"size": 1024, | |
"model": "virtio", | |
"compression": "lz4" | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"autoboot": "false", | |
"alias": "kvm_ahci", | |
"brand": "kvm", | |
"ram": "1023", | |
"vcpus": "1", | |
"nics": [ | |
{ | |
"nic_tag": "trunk", | |
"vlan_id": 10, | |
"ips": [ "dhcp", "addrconf" ], | |
"model": "virtio", | |
"allow_dhcp_spoofing": true, | |
"allow_ip_spoofing": true, | |
"allow_mac_spoofing": true, | |
"allow_restricted_traffic": true | |
} | |
], | |
"disks": [ | |
{ | |
"size": 1024, | |
"model": "achi", | |
"compression": "lz4" | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## IDE/SCSI should fail for bhyve | |
[root@carbon /tmp]# vmadm create -f bhyve_ide.json | |
"ide" is not a valid disk model for bhyve brand. Valid are: virtio,ahci | |
[root@carbon /tmp]# vmadm create -f bhyve_scsi.json | |
"scsi" is not a valid disk model for bhyve brand. Valid are: virtio,ahci | |
## AHCI/virtio should work for bhyve | |
[root@carbon /tmp]# vmadm create -f bhyve_virtio.json | |
Successfully created VM ab24a21c-9cac-6a84-f7e9-d88c0d26cb3e | |
[root@carbon /tmp]# vmadm create -f bhyve_ahci.json | |
Successfully created VM 648069c5-ef57-c5d7-c13e-9cbfef0f4ba2 | |
## IDE/SCSI should fail on update for bhyve | |
[root@carbon /tmp]# echo '{"update_disks": [{"path": "/dev/zvol/rdsk/zones/ab24a21c-9cac-6a84-f7e9-d88c0d26cb3e/disk0", "model": "ide"}]}' | vmadm update ab24a21c-9cac-6a84-f7e9-d88c0d26cb3e | |
"ide" is not a valid disk model for bhyve brand. Valid are: virtio,ahci | |
[root@carbon /tmp]# echo '{"update_disks": [{"path": "/dev/zvol/rdsk/zones/ab24a21c-9cac-6a84-f7e9-d88c0d26cb3e/disk0", "model": "scsi"}]}' | vmadm update ab24a21c-9cac-6a84-f7e9-d88c0d26cb3e | |
"scsi" is not a valid disk model for bhyve brand. Valid are: virtio,ahci | |
## AHCI/virtio should work on update for bhyve | |
[root@carbon /tmp]# echo '{"update_disks": [{"path": "/dev/zvol/rdsk/zones/ab24a21c-9cac-6a84-f7e9-d88c0d26cb3e/disk0", "model": "ahci"}]}' | vmadm update ab24a21c-9cac-6a84-f7e9-d88c0d26cb3e | |
Successfully updated VM ab24a21c-9cac-6a84-f7e9-d88c0d26cb3e | |
[root@carbon /tmp]# echo '{"update_disks": [{"path": "/dev/zvol/rdsk/zones/ab24a21c-9cac-6a84-f7e9-d88c0d26cb3e/disk0", "model": "virtio"}]}' | vmadm update ab24a21c-9cac-6a84-f7e9-d88c0d26cb3e | |
Successfully updated VM ab24a21c-9cac-6a84-f7e9-d88c0d26cb3e | |
## dump the disk info | |
[root@carbon /tmp]# for u in ab24a21c-9cac-6a84-f7e9-d88c0d26cb3e 648069c5-ef57-c5d7-c13e-9cbfef0f4ba2; do vmadm get $u | json disks; done | |
[ | |
{ | |
"path": "/dev/zvol/rdsk/zones/ab24a21c-9cac-6a84-f7e9-d88c0d26cb3e/disk0", | |
"boot": false, | |
"model": "virtio", | |
"media": "disk", | |
"zfs_filesystem": "zones/ab24a21c-9cac-6a84-f7e9-d88c0d26cb3e/disk0", | |
"zpool": "zones", | |
"size": 1024, | |
"compression": "lz4", | |
"refreservation": 1058, | |
"block_size": 8192 | |
} | |
] | |
[ | |
{ | |
"path": "/dev/zvol/rdsk/zones/648069c5-ef57-c5d7-c13e-9cbfef0f4ba2/disk0", | |
"boot": false, | |
"model": "ahci", | |
"media": "disk", | |
"zfs_filesystem": "zones/648069c5-ef57-c5d7-c13e-9cbfef0f4ba2/disk0", | |
"zpool": "zones", | |
"size": 1024, | |
"compression": "lz4", | |
"refreservation": 1058, | |
"block_size": 8192 | |
} | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"autoboot": "false", | |
"alias": "bhyve_ide", | |
"brand": "bhyve", | |
"ram": "1023", | |
"vcpus": "1", | |
"nics": [ | |
{ | |
"nic_tag": "trunk", | |
"vlan_id": 10, | |
"ips": [ "dhcp", "addrconf" ], | |
"model": "virtio", | |
"allow_dhcp_spoofing": true, | |
"allow_ip_spoofing": true, | |
"allow_mac_spoofing": true, | |
"allow_restricted_traffic": true | |
} | |
], | |
"disks": [ | |
{ | |
"size": 1024, | |
"model": "ide", | |
"compression": "lz4" | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"autoboot": "false", | |
"alias": "bhyve_scsi", | |
"brand": "bhyve", | |
"ram": "1023", | |
"vcpus": "1", | |
"nics": [ | |
{ | |
"nic_tag": "trunk", | |
"vlan_id": 10, | |
"ips": [ "dhcp", "addrconf" ], | |
"model": "virtio", | |
"allow_dhcp_spoofing": true, | |
"allow_ip_spoofing": true, | |
"allow_mac_spoofing": true, | |
"allow_restricted_traffic": true | |
} | |
], | |
"disks": [ | |
{ | |
"size": 1024, | |
"model": "scsi", | |
"compression": "lz4" | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"autoboot": "false", | |
"alias": "bhyve_virtio", | |
"brand": "bhyve", | |
"ram": "1023", | |
"vcpus": "1", | |
"nics": [ | |
{ | |
"nic_tag": "trunk", | |
"vlan_id": 10, | |
"ips": [ "dhcp", "addrconf" ], | |
"model": "virtio", | |
"allow_dhcp_spoofing": true, | |
"allow_ip_spoofing": true, | |
"allow_mac_spoofing": true, | |
"allow_restricted_traffic": true | |
} | |
], | |
"disks": [ | |
{ | |
"size": 1024, | |
"model": "virtio", | |
"compression": "lz4" | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"autoboot": "false", | |
"alias": "bhyve_ahci", | |
"brand": "bhyve", | |
"ram": "1023", | |
"vcpus": "1", | |
"nics": [ | |
{ | |
"nic_tag": "trunk", | |
"vlan_id": 10, | |
"ips": [ "dhcp", "addrconf" ], | |
"model": "virtio", | |
"allow_dhcp_spoofing": true, | |
"allow_ip_spoofing": true, | |
"allow_mac_spoofing": true, | |
"allow_restricted_traffic": true | |
} | |
], | |
"disks": [ | |
{ | |
"size": 1024, | |
"model": "ahci", | |
"compression": "lz4" | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@carbon /tmp]# uname -a | |
SunOS carbon 5.11 joyent_20180511T121447Z i86pc i386 i86pc | |
[root@carbon /tmp]# vmadm create -f kvm_virtio.json | |
Successfully created VM 27c8abef-6861-e2a1-f195-943b693ce4e8 | |
[root@carbon /tmp]# cd /zones/27c8abef-6861-e2a1-f195-943b693ce4e8/root | |
[root@carbon /zones/27c8abef-6861-e2a1-f195-943b693ce4e8/root]# wget --no-check-certificate -q https://downloads.sourceforge.net/gparted/gparted-live-0.31.0-1-amd64.iso | |
[root@carbon /tmp]# cd /tmp | |
[root@carbon /tmp]# vmadm start 27c8abef-6861-e2a1-f195-943b693ce4e8 cdrom=/gparted-live-0.31.0-1-amd64.iso,ahci order=cd,once=d | |
Unable to start VM 27c8abef-6861-e2a1-f195-943b693ce4e8: "ahci" is not a valid disk model for kvm brand. Valid are: virtio,scsi,ide | |
[root@carbon /tmp]# vmadm start 27c8abef-6861-e2a1-f195-943b693ce4e8 cdrom=/gparted-live-0.31.0-1-amd64.iso,ide order=cd,once=d | |
Successfully started VM 27c8abef-6861-e2a1-f195-943b693ce4e8 | |
[root@carbon /zones/27c8abef-6861-e2a1-f195-943b693ce4e8/root]# pgrep qemu | |
11329 | |
7065 | |
[root@carbon /zones/27c8abef-6861-e2a1-f195-943b693ce4e8/root]# pargs 11329 | |
11329: /smartdc/bin/qemu-system-x86_64 -m 1023 -name 27c8abef-6861-e2a1-f195-943b693ce | |
argv[0]: /smartdc/bin/qemu-system-x86_64 | |
argv[1]: -m | |
argv[2]: 1023 | |
argv[3]: -name | |
argv[4]: 27c8abef-6861-e2a1-f195-943b693ce4e8 | |
argv[5]: -uuid | |
argv[6]: 27c8abef-6861-e2a1-f195-943b693ce4e8 | |
argv[7]: -cpu | |
argv[8]: qemu64 | |
argv[9]: -drive | |
argv[10]: file=/dev/zvol/rdsk/zones/27c8abef-6861-e2a1-f195-943b693ce4e8-disk0,if=virtio,index=0,media=disk | |
argv[11]: -drive | |
argv[12]: file=/gparted-live-0.31.0-1-amd64.iso,if=ide,index=1,media=cdrom | |
argv[13]: -boot | |
argv[14]: order=cd,once=d | |
argv[15]: -device | |
argv[16]: virtio-net-pci,mac=72:b6:b4:f6:b7:8f,tx=timer,x-txtimer=200000,x-txburst=128,vlan=0 | |
argv[17]: -net | |
argv[18]: vnic,name=net0,vlan=0,ifname=net0 | |
argv[19]: -smbios | |
argv[20]: type=1,manufacturer=Joyent,product=SmartDC HVM,version=7.20180511T121447Z,serial=27c8abef-6861-e2a1-f195-943b693ce4e8,uuid=27c8abef-6861-e2a1-f195-943b693ce4e8,sku=001,family=Virtual Machine | |
argv[21]: -pidfile | |
argv[22]: /tmp/vm.pid | |
argv[23]: -vga | |
argv[24]: std | |
argv[25]: -chardev | |
argv[26]: socket,id=qmp,path=/tmp/vm.qmp,server,nowait | |
argv[27]: -qmp | |
argv[28]: chardev:qmp | |
argv[29]: -chardev | |
argv[30]: socket,id=serial0,path=/tmp/vm.console,server,nowait | |
argv[31]: -serial | |
argv[32]: chardev:serial0 | |
argv[33]: -chardev | |
argv[34]: socket,id=serial1,path=/tmp/vm.ttyb,server,nowait | |
argv[35]: -serial | |
argv[36]: chardev:serial1 | |
argv[37]: -vnc | |
argv[38]: unix:/tmp/vm.vnc | |
argv[39]: -parallel | |
argv[40]: none | |
argv[41]: -usb | |
argv[42]: -usbdevice | |
argv[43]: tablet | |
argv[44]: -k | |
argv[45]: en-us |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment