:), works like a charm. Thank you for saving my day. Thanks. On Fri, May 10, 2024 at 11:24 AM luckydog xf <luckydogxf@gmail.com> wrote:
Oh, my version is openstack 5.4.0. Let me check how to upgrade it.
On Fri, May 10, 2024 at 10:12 AM melanie witt <melwittt@gmail.com> wrote:
On 5/9/24 18:35, luckydog xf wrote:
Appreciated.
I read that link carefully, too. --- openstack server create test-windows --flavor 4 --nic net- id=7b57ee99-136f-4aa7-b3fe-a4958ec8c644 --block-device uuid=c4a54dff- eec0-4a97-
b77a-17c23c62dcf4,source_type=volume,destination_type=volume,disk_bus=ide,boot_index=0
usage: openstack server create [-h] [-f {json,shell,table,value,yaml}] [-c COLUMN] [--noindent] [--prefix PREFIX] [--max-width <integer>] [--fit-width] [--print-empty] (--image <image> | --image-property <key=value> | --volume <volume>) --flavor <flavor> [--security-group <security-group>] [--key-name <key-name>] [--property <key=value>] [--file <dest-filename=source-filename>] [--user-data <user-data>] [--description <description>] [--availability-zone <zone-name>] [--host <host>] [--hypervisor-hostname <hypervisor- hostname>] [--boot-from-volume <volume-size>] [--block-device-mapping <dev-name=mapping>] [--nic <net-id=net-uuid,v4-fixed-ip=ip- addr,v6-fixed-ip=ip-addr,port-id=port-uuid,auto,none>] [--network <network>] [--port <port>] [--hint <key=value>] [--config-drive <config-drive-volume>|True] [--min <count>] [--max <count>] [--wait] <server-name> openstack server create: error: one of the arguments --image --image- property --volume is required --- Turns out it requires an -image or --volume. However, when I provide this option, none of them works. ---- ubuntu@devinfra00a:~$ openstack server create test-windows --flavor 4 -- nic net-id=7b57ee99-136f-4aa7-b3fe-a4958ec8c644 --block-device uuid=c4a54dff-eec0-4a97-
b77a-17c23c62dcf4,source_type=volume,destination_type=volume,disk_bus=ide,boot_index=0 --image CentOS78
No volume with a name or ID of 'c4a54dff-eec0-4a97-
b77a-17c23c62dcf4,source_type=volume,destination_type=volume,disk_bus=ide,boot_index=0' exists.
ubuntu@devinfra00a:~$ ubuntu@devinfra00a:~$ ubuntu@devinfra00a:~$ openstack server create test-windows --flavor 4 -- nic net-id=7b57ee99-136f-4aa7-b3fe-a4958ec8c644 --block-device uuid=c4a54dff-eec0-4a97-
b77a-17c23c62dcf4,source_type=volume,destination_type=volume,disk_bus=ide,boot_index=0 --volume c4a54dff-eec0-4a97-b77a-17c23c62dcf4
No volume with a name or ID of 'c4a54dff-eec0-4a97-
b77a-17c23c62dcf4,source_type=volume,destination_type=volume,disk_bus=ide,boot_index=0' exists.
--- this is pretty frustrating.
I notice from your usage output it looks like the --block-device option is not there. You may have an older version? Some older versions of the client lacked some functionality. If you're able to use a newer version, it might help. Note that generally you can use newer versions of the client with older versions of openstack if needed.
What version of the client are you using? I used 6.4.0 and the command line I showed earlier worked for me on a devstack:
$ openstack --version openstack 6.4.0
$ openstack --os-cloud devstack volume create --size 1 --image edafe29a-4c51-4b0d-a3d0-5d073d3c8f69 --bootable test +---------------------+--------------------------------------+ | Field | Value | +---------------------+--------------------------------------+ | attachments | [] | | availability_zone | nova | | bootable | false | | consistencygroup_id | None | | created_at | 2024-05-09T17:44:59.578369 | | description | None | | encrypted | False | | id | a4ef4a82-6aad-4637-8759-e01bb706ef2f | | multiattach | False | | name | test | | properties | | | replication_status | None | | size | 1 | | snapshot_id | None | | source_volid | None | | status | creating | | type | lvmdriver-1 | | updated_at | None | | user_id | c9f914f8afae46ac80e7383bc9893d89 | +---------------------+--------------------------------------+
$ openstack --os-cloud devstack server create --flavor m1.tiny --network private --block-device uuid=a4ef4a82-6aad-4637-8759-e01bb706ef2f,source_type=volume,destination_type=volume,boot_index=0,disk_bus=ide
--wait testbfv
On Fri, May 10, 2024 at 2:22 AM melanie witt <melwittt@gmail.com <mailto:melwittt@gmail.com>> wrote:
On 5/9/24 02:31, luckydog xf wrote: > hi, list, > > I'm going to boot an instance from an existing volume, and it is a > Windows 2016 migrated from VMware. So the bus must be set to 'ide' mode, > otherwise it fails to boot up. > > Let's assume this volume UUID is xyz and it's bootable. I cloned it by > clonezilla from VMware ESXI. since virtio drive wasn't installed in > Windows, so it must be set to ide. > > So what's the right way to boot it from this volume and set it to IDE? > > I have tried lots of ways, like > > --- > > openstack server create test-windows --flavor 4 --nic net- > id=7b57ee99-136f-4aa7-b3fe-a4958ec8c644 --block-device > id=xxxx:disk_bus=ide > > and ... --block-device-mapping. > > But unfortunately, none of them work. > > And there are too many outdated docs like disk_bus=ide and bus=ide. Not > sure which one works. This is fairly frustrating. > > I'm still struggling with this issue and need your help. > > Thanks a lot.
I think it would be something like this at a minimum [1]:
openstack server create test-windows --flavor 4 --nic net-id=7b57ee99-136f-4aa7-b3fe-a4958ec8c644 --block-device
uuid=xxxx,source_type=volume,destination_type=volume,disk_bus=ide,boot_index=0
source_type is needed to interpret what uuid is referring to
destination_type not sure if it's required but it makes it clear
that
the boot disk is a volume rather than a local disk
boot_index=0 is needed to indicate it's a boot volume
-melwitt
[1] https://docs.openstack.org/python-openstackclient/latest/cli/ command-objects/server.html#server-create <https:// docs.openstack.org/python-openstackclient/latest/cli/command- objects/server.html#server-create>